ReformatAll: Internal error in reformat routine.

  • Hello,

    we're currently having trouble with some RTF texts containing single chars with a special symbol font. ReformatAll sometimes raises the exception "Internal error in reformat routine. Please save your text!". It's currently unknown why this sometimes happens and sometimes not (for the same text), it may depend on page sizes.

    Commenting out the exception in WPRTEDefs seems to help but we're unsure about the side effects. The condition for the exception is FCanCheckNewPage.

    There are only two lines where FCanCheckNewPage may get set to false:
    The first one is below "if (findmode = wpNoSpaceAtAll) and not FCanCheckNewPage and (w > 1) and (h > 1) then" which wouldn't be entered if FCanCheckNewPage wouldn't already be false (dead code?). The second one is "FCanCheckNewPage := aTextObject = nil;". In our error case, aTextObject is assigned here and points to a wpobjTextObject with the symbol font mentioned above.

    Any idea on how to fix or avoid the problem would be appreciated.

    Thanks

    - Bjoern Henke -