Beiträge von fedpol

    Julian, can you please convert following DFM's to text format. They are now in binary format and it makes it impossible to compare different revisions of those files. Thanks.

    Demos/SpellCheck/AddictSpell/AdWPTDemoU.dfm
    Demos/Tasks/Annotation/Unit1.dfm
    Demos/Tasks/Bookmarks/BookTest.dfm
    Demos/Tasks/EditFields/EdFieldUnit1.dfm
    Demos/Tasks/FillPage/FillPageUnit1.dfm
    Demos/Tasks/Localisation/LocalTest.dfm
    Demos/Tasks/MailM4/HintFormU.dfm
    Demos/Tasks/PrinterSetup/PrinterSetU.dfm
    Demos/Tasks/RTFVariables/RTFVar1.dfm
    Source/WPInfD2.dfm
    Source/WPInfDlg.dfm
    Source/WPXMLEditor.dfm

    The text in following document is incorrectly wrapped. It should not paint partial and/or full characters beyond the right margin line.

    Here is a screenshot
    http://img340.imageshack.us/my.php?image=bug92bq0.png

    In the function TWPCustomRichText.OnToolBarIconSelection the function OpenDialog is called in several places. It can happen that during OpenDialog an event is raised, in which case the action is stuck in the checked state. For instance, if an exception is raised during a file save, then there will be a check mark in the menu next to the "save" item. If you then select this item, the check will disappear but the action will not be executed. Selecting it a second time will execute the action again.

    I think it is better to replace

    Code
    OpenDialog(xxx);desel := TRUE;Typ := wptNone;


    with

    Code
    desel := TRUE;Typ := wptNone;OpenDialog(xxx);


    or

    Code
    try
        OpenDialog(xxx);
    finally
        desel := TRUE;
        Typ := wptNone;
    end;


    It would also be better to remove the try/except from WPI_CO_Open because if something goes wrong during the opening of a file, WPTools will eat the exception and the user/program will never know.

    I have an image that is relative to page. When I drag/drop this image from the top of page 2 to the bottom of page 1 then the image "disappears".


    The second call to ScreenToRTFPage changes RTFPageNr from 0 to 1 and causes the image to be placed at the bottom of page 2 instead of page 1.

    You can no longer click between the two last chars of a paragraph. It used to work in 5.23.5 and earlier.

    In function TParagraph.LinePosFromX

    Code
    if Result<CharCount then www := CharPos[Result+1].xoff


    should be

    Code
    if (Result + 1) < CharCount then www := CharPos[Result+1].xoff

    1. Load the document with Wordpad5 demo.
    2. Click on the image (to select it).
    3. Notice the location of the blue pin. (first paragraph)
    4. Drag the image a few pixels up.
    5. Click on the image (to select it).
    6. Notice the new location of the blue pin. (last paragraph)

    This is strange because "Mode" is wpobjRelativeToPage (16), not wpobjRelativeToParagraph (8).

    I have an RTF document created with Word 97 which contains text and an image with wrapping style set to "Top & bottom". When I load this document into WPTools then instead of seeing "text 1 + image + text 2" I see "blank + image + text 1 + text 2". WPTools translated the wrapping to wpobjRelativeToParagraph (mode) and wpwrUseWholeLine (wrap). The problem here is wpwrUseWholeLine which, according to the *cough* help file, blocks the complete line and the space before it. This means that existing RTF documents that use "Top & bottom" image wrapping can not be displayed correctly by WPTools.

    I would like to see this implemented (correctly).

    Why not immediately close the current paragraph and start a new one when "\sect" is encountered? After all, "\sect" means "end of section and pararaph". If you delay the creation of the paragraph, like you do now, you will never be able handle it correctly and this bug will never go away.

    I tested it with the original document (not the "hello world" example from my initial post) and your fix does not have any effect. I think your fix expects a "}" after "\sect" which is not always the case.

    Here is an example without the "}" after "\sect" and Word 97 displays it ok.

    Zitat

    {\rtf1\ansi a\par b\par c\sect d\par e\par f\par}