Issue 119621 - [From Symphony]Outline level in sample file lost
[From Symphony]Outline level in sample file lost
Status: CLOSED FIXED
Product: Writer
Classification: Application
Component: open-import
3.4.0
PC All
: P3 major (vote)
: 4.0.0
Assigned To: jsc
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 06:15 UTC by Yan Ji
Modified: 2012-10-09 08:57 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
sample (13.24 KB, application/octet-stream)
2012-05-31 06:15 UTC, Yan Ji
no flags Details
Import outline level for paragraph - writerfilter\source\dmapper\DomainMapper.cxx (1.01 KB, patch)
2012-06-06 03:39 UTC, Yolanda Zhang Ying
tldyzem: review?
Details | Diff
fix the issue for TOC import - writerfilter\source\dmapper\DomainMapper_Impl.cxx (1.85 KB, patch)
2012-06-06 03:44 UTC, Yolanda Zhang Ying
tldyzem: review?
Details | Diff
Add a definition for level range - writerfilter\source\dmapper\PropertyMap.cxx (476 bytes, patch)
2012-06-06 03:45 UTC, Yolanda Zhang Ying
tldyzem: review?
Details | Diff
UT sample file (18.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-06-06 03:51 UTC, Yolanda Zhang Ying
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-05-31 06:15:35 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
Comment 1 Yolanda Zhang Ying 2012-06-06 03:39:26 UTC
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
Comment 2 Yolanda Zhang Ying 2012-06-06 03:44:38 UTC
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.
Comment 3 Yolanda Zhang Ying 2012-06-06 03:45:40 UTC
Created attachment 78040 [details]
Add a definition for level range - writerfilter\source\dmapper\PropertyMap.cxx

Add a definition for outline level min value
Comment 4 Yolanda Zhang Ying 2012-06-06 03:51:51 UTC
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.
Comment 5 Yolanda Zhang Ying 2012-06-06 04:28:42 UTC
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])
Comment 6 jsc 2012-06-07 11:57:48 UTC
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.
Comment 7 jsc 2012-06-07 12:44:42 UTC
reviewed, built and tested. Pathc applied on trunk

trunk -> revision 1347590
Comment 8 binguo 2012-06-19 02:12:04 UTC
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.
Comment 9 Shenfeng Liu 2012-10-09 08:57:41 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.