Bug when saving styles in .wpt format

  • I have verified the following bug with both my own application and the sample word processor in the demo system.

    If you create a simple document with a couple of styles that use the "Next Style" feature and save in .wpt format, the "Next Style" value gets ignored when the document is loaded.

    The TWPTOOLSReader.Parse procedure does see the next style and in the lines:

    s := aTag.NormalizedParamString('next', ''); //V5.20.1
    if s<>'' then //V5.20.1
    TextStyleEle.NextStyleName := s; //V5.20.1

    the value of NextStyleName is corectly assigned. However if you then try to check the styles with the style dialog, the Next Style is missing.

    I hope you can provide a quick fix as I really need this to work.

    Mike

  • I can reproduce the bug with 5.20.6


    If you change that Merged parameter from false to true then it might work for you. Better to wait for an official repsonse though.

    • Offizieller Beitrag

    Please locate

    s := aTag.NormalizedParamString('next', ''); //V5.20.7
    if s<>'' then //V5.20.1
    TextStyleEle.NextStyleName := s; //V5.20.1

    (line 1166 in WPIOWPTools.pas)

    and move it to the end of the if statment, line 1188 in WPIOWPTools

    Julian