Apache OpenOffice (AOO) Bugzilla – Issue 119621
[From Symphony]Outline level in sample file lost
Last modified: 2012-10-09 08:57:41 UTC
Created attachment 77843 [details] sample Build: AOO3.4 Load sample file in AOO3.4 Defect: The outline level lost cause it cannot be collected by TOC
Created attachment 78036 [details] Import outline level for paragraph - writerfilter\source\dmapper\DomainMapper.cxx This part of code is used to import outline level for paragraph property
Created attachment 78039 [details] fix the issue for TOC import - writerfilter\source\dmapper\DomainMapper_Impl.cxx This part of code used to fix the issue for TOC import. In TOC field code, the '\o' means using outline level as TOC entry, and a range will follow up to define the show levels, e.g. "TOC \o "1-3" \h", and "1-3" means to show from Level 1 to Level 3, and if no range defines, it means to show all levels. AOO failed to handle the scenario that no range follow up the \o, and no content be shown in TOC for opened document. This code fix the issues mentioned above.
Created attachment 78040 [details] Add a definition for level range - writerfilter\source\dmapper\PropertyMap.cxx Add a definition for outline level min value
Created attachment 78041 [details] UT sample file Add a sample file for UT There is also one issue left, that in AOO, we can't customize the TOC to show the Headings only or with the paragraphs set with outline level. So in this sample, the last TOC will show diff with MS Office.
Root Cause: The outline level for paragraph does not imported, so the outline lost after loading, to it such paragraph can't be collected by TOC automatically. Solution: 1. Import the outline level for paragraph. 2. If in TOC, no level range information defined, set the default as max level. (For this issue, please refer to the comments above for attachment 78039 [details])
I would like to make a suggestion. When you create a patch it would be helpful if you can combine it in one patch if possible or at least create a full qualified patch including the whole path. The path should at least start in main to make it easier to find the correct place.
reviewed, built and tested. Pathc applied on trunk trunk -> revision 1347590
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.
set Target Milestone to AOO 3.5.0 for PM purpose.