Page 1 of 1

Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 6:37 am
by wolf1860
Delphi:10.2
TRichView:17(16.17)
SRichview:8
The save as docx function worked perfect with old version , now lost the header and footer.Everything is ok when displaying in the SrichViewEdit.

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 10:52 am
by Sergey Tkachenko
I cannot reproduce this problem.
Make sure that rvrtfSaveHeaderFooter is included in SclRView.RTFOptions

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 1:11 pm
by wolf1860
I am sure TSclRView.RTFOptions include [rvrtfSaveHeaderFooter], and I am sure my software worked fine before I rebuilt it with the new version.
Thank u!

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 3:12 pm
by Sergey Tkachenko
Can you reproduce this problem in our demos?
For example, I run ScaleRichView\Demos\ActionTestTabs\ActionTestUni.dproj. When it starts, it loads a file with a normal header. I saved it as DocX, and the header is there. I also loaded an RTF file containing all 6 possible headers and footers, and it was saved as DocX with all of them.

I use TRichView version with some modifications after v16.17, but they must not affect this problem.

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 3:35 pm
by wolf1860
I have post my test rvf file to ur gamail. I opened it with the demo application, and exported ,it lost the header and footer too.
By the way,I opened the same file with an older version of the demo ,the exported result is correct!

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Fri Oct 13, 2017 4:48 pm
by Sergey Tkachenko
I confirm this problem. It will be fixed in the next update.

Quick fix:
Open RichView.pas, find all checks for RTFReaderAssigned and remove them. I.e. search for the substring "RTFReaderAssigned and" and remove it (3 times).
Actually, now you can remove function RTFReaderAssigned: Boolean from TCustomRichView and TRVTableInplaceEdit classes at all.

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Posted: Sat Oct 14, 2017 3:15 am
by wolf1860
Now everything is ok:) Thank u very much!