Beiträge von genicore

    > It should work if the pasted text uses a deeper level (>1)
    Ok, if I just increase the level (ignoring the fact that I have to shift the properties of the numberstyles in the group upwards) to some unused level everything looks ok... until the user decides to press the SelPriorLevel button...

    Why on earth can one group mess with the numbering of another group?


    Regards
    patrik.nyborg(a)genicore.se

    First: This has _nothing_ to do with nested paragraphs.
    Second: I guess I could start patching more aggresivly. But if I interpret you correctly (optimized=works correctly for) subparagraph handling is poor which will require modifications all over the place. Adding the fact that it's really hard to debug (I have to move the methods of interest to the beginning of WPRteDefs.pas to be able to set a breakpoint - http://wpcubed.com/forum/viewtopi…d24788fd11fd305), this feels like the beginning of the end.


    patrik.nyborg(a)genicore.se

    Is it possible to save the current numbering values for all levels before the paste and restore them afterwards?

    > It should work if the pasted text uses a deeper level (>1)
    Is it possible to transform the incoming number information on the fly to accomplish this?


    Regards
    patrik.nyborg(a)genicore.se

    WPTools version 6.13

    Assume:

    Now, if I paste some numbering content from Word into p2, the numbering in p3 is restarted. So, is there something I'm missing here?


    Regards
    patrik.nyborg(a)genicore.se

    WPTools version 6.13

    Assume:

    Code
    <p> [wpNoOverwrite, wpNoInsertPar, wpNoInsertChar, wpNoDeletePar, wpNoDeleteChar]
      <p/> [wpNoInsertPar, wpNoDeletePar]
    </p>

    Assume:
    <childpar>->CharCount = 0
    aCursor.active_paragraph = <childpar>
    aCursor.active_posinpar = 0

    If I try to enter some text, IsProtected is called with the parent paragraph as argument! Checking SetChar in TWPRTFEnginePaint.InputString reveals that for some reason the current paragraph can not be used to check protection if CharCount = 0. What's happening here? If this is a WONTFIX, are there any suprises if I just remove those while-do loops?

    Regards
    patrik.nyborg(a)genicore.se

    Basically what I'm suggesting is something like this:


    Regards
    patrik.nyborg(a)genicore.se

    WPTools version 6.13

    Assume:
    - ppProtectSelectedTextToo on
    - Paragraph with TWPProtectedMode << wpNoDeletePar

    If I select some text _within_ the paragraph above and press Delete, the text is not deleted. Shouldn't TWPRTFDataCursor.ClearTextInbetween only check for wpNoDeletePar if a paragraph actually is going to be deleted (basically par_s != par_e)?


    Regards
    patrik.nyborg(a)genicore.se

    WPTools version 6.13

    Setting {.$DEFINE ALLOWUNDO} in WPINC.INC gives these compile-time errors:


    Regards
    patrik.nyborg(a)genicore.se

    WPTools 6.13

    ChangeApplied method
    "This procedure is called after the text has been changed."

    If CutToClipboard/PasteFromClipboard returns early (that is if no action is performed),
    ChangeApplied is sometimes stilled called which contradicts the documentation.


    TWPCustomRtfEdit.WMCut - ChangeApplied is never called!
    TWPCustomRtfEdit.KeyPress/cut - ChangeApplied always called.
    TWPCustomRichText.OnToolBarIconSelection/cut - ChangeApplied always called.
    TWPCustomRtfEdit.WMPaste - ChangeApplied only called if something actually has changed. Yeah!
    TWPCustomRtfEdit.KeyPress/paste - called three times if something actually has changed, otherwise called twice.
    TWPCustomRichText.OnToolBarIconSelection/paste - called two times if something actually has changed, otherwise called once.


    Regards
    patrik.nyborg(a)genicore.se

    WPTools 6.13

    We are using deeply nested paragraphs (some hidden). This makes for example navigation using VK_DOWN kind of lame as the cursor doesn't seems to move at all when encountering say three consecutive hidden paragraphs. Any plans to just skip over hidden paragraphs during navigation or is this something I have to fix myself?


    Regards
    patrik.nyborg(a)genicore.se

    Update: this happens only for wpoPageNumber, if I use wpoNumPages everything works fine. If I replace the logic for 'PAGE' in TWPRTFEnginePaint.MeasureObject with only ResString := '1'; the layout is no longer broken (a quick trace in the original code showed that ResString was set to the empty string for the first two calls).

    Regards
    patrik.nyborg(a)genicore.se

    The following highlights the problem better (the top of the pagenumber is rendered inside the previous paragraph):

    Code
    void createContent(Wpctrrich::TWPRichText* aEditor) {
      aEditor->WritingAttr()->Clear();
      TParagraph* p1(aEditor->FirstPar);
      p1->Insert(0, "jjjjj", Cardinal(0));
      TParagraph* p2(p1->AppendNewPar(true));
      p2->InsertNewObject(0, wpobjTextObject, false, false, Cardinal(0))->Name = WPTextFieldNames[wpoPageNumber];
    }

    Regards
    patrik.nyborg(a)genicore.se

    Hi!

    1-2) Yes I'm aware of that but thanks anyway.

    3) The font used is Arial.
    If you run the example and move the cursor around, it's looks strange before (looks like subscript + fontsize=1) and after the pagenumber; are you not seeing this if you run the code?

    4) Sorry about that, autofields = text object with Name in WPTextFieldNames


    Regards
    patrik.nyborg(a)genicore.se

    WPTools 6.13

    Please have a look at the following code (obviously we don't have code like this but sometimes we clears the document and rebuilds it using some dynamic definitions).

    If you only do the first line (createContent) everything looks fine. If all lines are executed the style becomes broken (more so if the autofield is placed inside a cell with border and alignment for example). This problem only seems to occur for autofields. So, is there something I'm missing here (kinda urgent as the same problem occurs during printing which makes this a showstopper)?

    Regards
    patrik.nyborg(a)genicore.se

    WPTools 6.13

    This works fine, the '+' is showing:

    Code
    Editor->InputEditField("name", "+value");

    This doesn't work, the '+' is not showing (the EmbeddedText does however contain the '+'):

    Code
    TParagraph* table(Editor->FirstPar->AppendNewPar(false));
    table->ParagraphType = wpIsTable;
    TParagraph* row(table->AppendNewRow(true));
    TParagraph* cell(row->AppendNewCell(true));
    Editor->ActiveParagraph = cell;
    Editor->InputEditField("name", "+value");

    So, what's happening here?

    Regards
    patrik.nyborg(a)genicore.se[/code]

    WPTools 6.13

    Assume:

    Code
    TWPTextStyle* style(Editor->ParStyles()->AddStyle("test"));style->ASet(WPAT_CharFontSize, 48 * 100);style->ASetAddCharStyle(WPSTY_BOLD);TParagraph* p(Editor->FirstPar);p->SetStyle("test");/* code here */

    The following works fine (inputfield format = size + bold):

    Code
    p->Insert(0, "hi", Cardinal(0));Editor->CPPosition += 2;Editor->InputEditField("name", "value");

    The following does not work (inputfield format = bold):

    Code
    Editor->InputEditField("name", "value");


    So, is there something I'm missing?


    Regards
    patrik.nyborg(a)genicore.se[/code]