Apache OpenOffice (AOO) Bugzilla – Issue 85616
TOC should maintain functionality when 'save as RTF' / open with OOo
Last modified: 2017-05-20 11:22:10 UTC
Table of contents changes from protected table to normal text and loses its index table attribute. Procedure to reproduce 1) Take file provided and copy to new file [so as to not clobber the original] 2) Open copy of the provided file 3) On the last page of the file (page 3) place the cursor at the top of the edit area and then do from the main menu: Insert | Indexes and Tables | Indexes and Tables ... 4) On Insert Index/Table Dialog and Index Table property page hit OK to generate the TOC ... a simple TOC with protected status and table attributes will display. 5) Save the file. 6) Open the file and scroll down to where the TOC should be. It will now be normal text without the index table attribute. This behaviour is not desirable.
Created attachment 51179 [details] TOC becomes normal text
I checked with "2.3.1 Multilingual German version WIN XP: [680m9(Build9238)]" and can confirm the reported effect, but I don't know whether this is a real DFEECT or whether it should be an ENHANCEMENT request. The attached "OOWriter_Bug_TOC_Becomes_Normal_Text.doc" is a RTF document that pretends to be a WORD document by its name extension. Unfortunately the report is very rare, but I believe reporter should have seen the same like me when he tried to save the document: Because OOo recognized it as a RTF document, OOo proposes to save 'as RTF', and a warning concerning "Formatting or contents that might become lost ..." appears. And that's exactly what happened: some formatting details are lost. Needhelp -------- I believe (but I don't know) RTF also should be able to handle TOC, and OOo should export a correct TOC and also recognize and convert a TOC in a RTF document. Clarification required: 1. Is this a 'save export' problem? I do'nt think so, when I open exported WRITER documents with MS WORD VIEWER, TOC looks fine. 2. Is this an 'open import' problem? I think so, because my own experiments with own documents show that TOC in RTF documents exported from OOo look better in MS WORD VIEWER than in OOo. For example page numbers etc. that look fine in MS WORD VIEWER are not visible in the TOC when I open the same document with OOo. Pls see my test kit: TOC of "mytest.rtf" /exported from "mytest.pdt" looks fine in MS WORD VIEWER, but page numbers are lost when you open the document with OOo.
Created attachment 51181 [details] test kit for 'comments from rainerbielefeld Sun Jan 27'
You are correct as to what the problem is ... I must had somehow renamed an .rtf document as a .doc. If I do a save as XP .doc document it works correctly. So no need to fix this! BUT under windows an extension does indicate what application the document is 'assigned' to and windows applications work on that premise ... the rtf masquerading as a doc document might be something that could be detected by OO Writer. So under windows when you are trying to save to a .doc document and it isn't a .doc format [and probably all the other mixes as well] then perhaps a warning dialogue should pop up. I don't think rtf documents support TOCs ... but I'm not sure. You know that if you do a right click on the desktop and create a 'New Writer Document' ... that creates a file with an .odt extension. But in the windows world unfortunately everyone seems to want to create an MSWORD .doc document for compatibility of others who ARE using MSWORD ... that is what I do ... so it is probably a common thing ... perhaps almost 100% of OO users would simply change the .odt extension to .doc ... very innocently ... and get into trouble. So some kind of warning on save would be a nice thing as an enhancement. So for the time being I'll set the issue's resolution to INVALID as I assume that RTF files don't support this functionality. I have no idea how this became an RTF file! Perhaps on a save once where I accidently spun the mouse wheel when the 'Save as type' control was selected. Thanks for looking into this issue for me. I think OpenOffice is so wonderful ... I use it all the time both on windows and Linux ... and I'll easily spend the time to reduce a problem I'm having to the minimal set so that the developers can locate a bug. Thanks for looking into this for me! It turned out to be an interesting bug and a more interesting resolution! -- Robert
Reopening issue, this should be implemented into the RTF filter somehow.
Reassigned to HBRINKM.
Created attachment 67713 [details] Test RTF file with TOC
The file Exercise3.RTF is an example of an RTF file containing a valid TOC. When opening in Word the TOC is latent. However when you right-click on the line after the Table of Contents header and select "update field" the TOC is presented. I hope that the inport routines of OO will soon be able to pick up the TOC info from the RTF file.
Reset assigne to the default "issues@openoffice.apache.org".