Issue 119963 - [From Symphony]TOC should not be updated if load doc in Writer
Summary: [From Symphony]TOC should not be updated if load doc in Writer
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Major (vote)
Target Milestone: 4.0.0
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords: ms_interoperability
: 175 119441 119614 (view as issue list)
Depends on:
Blocks: 120823
  Show dependency tree
 
Reported: 2012-06-12 08:44 UTC by Yan Ji
Modified: 2012-10-09 09:22 UTC (History)
8 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sample (28.50 KB, application/octet-stream)
2012-06-12 08:44 UTC, Yan Ji
no flags Details
The solution of i119963 (13.49 KB, patch)
2012-06-14 07:14 UTC, zhengfan
no flags Details | Diff
sample for TOC loading (25.50 KB, application/octet-stream)
2012-06-26 10:34 UTC, zhengfan
no flags Details
sample for TOC loading (28.50 KB, application/octet-stream)
2012-06-26 10:35 UTC, zhengfan
no flags Details
sample for TOC loading (78.00 KB, application/octet-stream)
2012-06-26 10:36 UTC, zhengfan
no flags Details
sample for TOC loading (78.00 KB, application/msword)
2012-06-26 10:37 UTC, zhengfan
no flags Details
sample for TOC loading (79.50 KB, application/msword)
2012-06-26 10:37 UTC, zhengfan
no flags Details
sample for TOC loading (78.00 KB, application/msword)
2012-06-26 10:38 UTC, zhengfan
no flags Details
sample for TOC loading (72.00 KB, application/msword)
2012-06-26 10:39 UTC, zhengfan
no flags Details
The solution of i119963-updated (11.83 KB, patch)
2012-06-28 03:42 UTC, zhengfan
orw: review+
Details | Diff
the third version of the patch (30.64 KB, patch)
2012-08-16 06:48 UTC, zhengfan
no flags Details | Diff
4th version of the patch, with solving some empty paragraph related defects (32.33 KB, patch)
2012-08-20 06:18 UTC, zhengfan
orw: review+
Details | Diff
sample to reproduce defect that a page break is inserted after import TOC (23.50 KB, application/octet-stream)
2012-09-04 13:19 UTC, Oliver-Rainer Wittmann
no flags Details
tab stop position in TOC content wrong (10.66 KB, application/octet-stream)
2012-09-04 13:33 UTC, Oliver-Rainer Wittmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-06-12 08:44:59 UTC
Created attachment 78258 [details]
sample

Build: AOO 3.4
1. In MS Word
2. Apply heading style to some paragraph
3. Create TOC
4. Remove text content
5. Save doc
6. Open the doc file in Writer

Expected Result: TOC should not be updated(The same behavior as MS Word)
Actual Result: TOC is updated
Comment 1 zhengfan 2012-06-14 07:12:41 UTC
hi, all, I have fixed this one, and attached the patch. Please help on reviewing it. Thanks a lot!

The whole story of this issue is described in wiki page:
http://wiki.services.openoffice.org/wiki/Writer/TOC

And the Functional Spec and Detailed Design are also inside this page:
FS: http://wiki.services.openoffice.org/wiki/Writer/TOC#Function_Specification
DD: http://wiki.services.openoffice.org/wiki/Writer/TOC#Design_Description

FYR.
Comment 2 zhengfan 2012-06-14 07:14:00 UTC
Created attachment 78319 [details]
The solution of i119963
Comment 3 Oliver-Rainer Wittmann 2012-06-14 09:32:26 UTC
I will volunteer reviewing the patch
Comment 4 Oliver-Rainer Wittmann 2012-06-14 09:47:31 UTC
taking over this issue for the review task
Comment 5 Oliver-Rainer Wittmann 2012-06-14 09:48:38 UTC
Comment on attachment 78319 [details]
The solution of i119963

setting patch review request
Comment 6 zhengfan 2012-06-26 10:34:49 UTC
Created attachment 78491 [details]
sample for TOC loading
Comment 7 zhengfan 2012-06-26 10:35:33 UTC
Created attachment 78492 [details]
sample for TOC loading
Comment 8 zhengfan 2012-06-26 10:36:39 UTC
Created attachment 78493 [details]
sample for TOC loading
Comment 9 zhengfan 2012-06-26 10:37:05 UTC
Created attachment 78494 [details]
sample for TOC loading
Comment 10 zhengfan 2012-06-26 10:37:55 UTC
Created attachment 78495 [details]
sample for TOC loading
Comment 11 zhengfan 2012-06-26 10:38:27 UTC
Created attachment 78496 [details]
sample for TOC loading
Comment 12 zhengfan 2012-06-26 10:39:03 UTC
Created attachment 78497 [details]
sample for TOC loading
Comment 13 Oliver-Rainer Wittmann 2012-06-27 08:14:22 UTC
*** Issue 175 has been marked as a duplicate of this issue. ***
Comment 14 Oliver-Rainer Wittmann 2012-06-27 08:20:36 UTC
setting corresponding keyword
Comment 15 zhengfan 2012-06-28 03:42:07 UTC
Created attachment 78506 [details]
The solution of i119963-updated
Comment 16 Oliver-Rainer Wittmann 2012-06-29 09:25:19 UTC
Comment on attachment 78506 [details]
The solution of i119963-updated

Patch looks good and works fine in my environment.

As discussion is ongoing to work on this enhancement and the following ones on a branch I will not commit this patch.
Comment 17 Oliver-Rainer Wittmann 2012-06-29 09:25:58 UTC
assigning issue back to zhengfan for further handling.
Comment 18 zhengfan 2012-08-16 06:48:05 UTC
Created attachment 78973 [details]
the third version of the patch

The exporting/importing of MS word 2003 doc file are all involved.
Comment 19 zhengfan 2012-08-20 06:18:59 UTC
Created attachment 79004 [details]
4th version of the patch, with solving some empty paragraph related defects

Updated, for review
Comment 20 Oliver-Rainer Wittmann 2012-08-21 10:25:15 UTC
taking over for reviewing the new patch.

@zhengfan: may be some words from your side what additionally is solved by the new patch.
Comment 21 SVN Robot 2012-08-28 09:27:27 UTC
"orw" committed SVN revision 1378038 into branches/writer001:
#119963# - WW8 import: import of actual TOC content - first part of TOC enhan...
Comment 22 Oliver-Rainer Wittmann 2012-08-28 09:40:49 UTC
Applied first part of the patch - import of actual TOC content - on branch writer001. This part of the patch has been already reviewed earlier.

Second part of the current patch contains the export of the actual TOC content to WW8 file format (Microsoft Word binary file format). I am currently reviewing this part. Stay tuned.
Comment 23 Oliver-Rainer Wittmann 2012-09-04 11:50:54 UTC
Comment on attachment 79004 [details]
4th version of the patch, with solving some empty paragraph related defects

I have almost finished my review. Patch looks good.
I am in discussion with zhengfan on certain details of the patch - mostly to open my mind for learning and understand in detail the changes.

As the development is taken place on a branch, I will the second part - export of actual TOC content to WW8 file format - to the branch.
I think further development, like the one or the other improvement or correction, will take place in the future on the branch to finalize this enhancement.
Comment 24 SVN Robot 2012-09-04 12:53:33 UTC
"orw" committed SVN revision 1380613 into branches/writer001:
#119963# - WW8 export: export of actual TOC content - second part of TOC enha...
Comment 25 Oliver-Rainer Wittmann 2012-09-04 13:06:54 UTC
Applied second part - WW8 export of actual TOC content - to branch writer001.

Future work - already known:
- solve defect that under certain conditions a page break is inserted after the imported TOC --> sample document will follow.

- target for "TOC hyperlinks" should be internally CrossReferenceBookmarks which would provide better user experience:
-- better tooltip on mouse-over
-- no visible bookmarks in navigator for these only internally needed bookmarks.

- [may be more]
Comment 26 Oliver-Rainer Wittmann 2012-09-04 13:19:23 UTC
Created attachment 79284 [details]
sample to reproduce defect that a page break is inserted after import TOC
Comment 27 Oliver-Rainer Wittmann 2012-09-04 13:33:21 UTC
Created attachment 79285 [details]
tab stop position in TOC content wrong

TOC exported to WW8 file format with wrong tab stop position:
- open sample text document
- export to WW8 file format (Microsoft Word 97/2000/XP)
- open in Microsoft Word 2003 or 2010
--> tab stop position of TOC entries for second heading level is wrong
--> tab stop position of paragraph with style Content2 is wrong

Here we have a general problem:
tab stop position are not exported corrected, if paragraph has a left indent
Comment 28 Oliver-Rainer Wittmann 2012-09-04 13:34:14 UTC
(In reply to comment #27)
> Created attachment 79285 [details]
> tab stop position in TOC content wrong
> 
> TOC exported to WW8 file format with wrong tab stop position:
> - open sample text document
> - export to WW8 file format (Microsoft Word 97/2000/XP)
> - open in Microsoft Word 2003 or 2010
OR
- reopen in AOO
> --> tab stop position of TOC entries for second heading level is wrong
> --> tab stop position of paragraph with style Content2 is wrong
> 
> Here we have a general problem:
> tab stop position are not exported corrected, if paragraph has a left indent
Comment 29 Oliver-Rainer Wittmann 2012-09-04 13:44:42 UTC
(In reply to comment #28)
> (In reply to comment #27)
> > Created attachment 79285 [details]
> > tab stop position in TOC content wrong
> > 
> > TOC exported to WW8 file format with wrong tab stop position:
> > - open sample text document
> > - export to WW8 file format (Microsoft Word 97/2000/XP)
> > - open in Microsoft Word 2003 or 2010
> OR
> - reopen in AOO
> > --> tab stop position of TOC entries for second heading level is wrong
> > --> tab stop position of paragraph with style Content2 is wrong
> > 
> > Here we have a general problem:
> > tab stop position are not exported corrected, if paragraph has a left indent
Further investigation reveals that the problem exists, if the tab stop is set at a style. It does not happen, if the tab stop is directly set at the paragraph.
Comment 30 zhengfan 2012-09-05 02:54:48 UTC
Thanks Oliver for such detailed review. I will take a look for the issue. BTW, whether could we apply the patch in branch 001 and then fix the new found defect?
Comment 31 Oliver-Rainer Wittmann 2012-09-14 12:44:22 UTC
marking this issue as FIXED - as main work is done
Comment 32 Oliver-Rainer Wittmann 2012-09-14 12:45:40 UTC
(In reply to comment #25)
> Applied second part - WW8 export of actual TOC content - to branch writer001.
> 
> Future work - already known:
> - solve defect that under certain conditions a page break is inserted after
> the imported TOC --> sample document will follow.
> 
This issue is tracked by bug 120879


> - target for "TOC hyperlinks" should be internally CrossReferenceBookmarks
> which would provide better user experience:
> -- better tooltip on mouse-over
> -- no visible bookmarks in navigator for these only internally needed
> bookmarks.
> 
This issue is tracked by bug 120877
Comment 33 SVN Robot 2012-09-17 12:46:40 UTC
"orw" committed SVN revision 1386590 into trunk:
#119963#,#120877# - WW8 filter enhancement: import and export actual TOC content
Comment 34 Oliver-Rainer Wittmann 2012-09-17 12:48:53 UTC
enhancement reintegrated from branch writer001 into trunk.
Comment 35 Du Jing 2012-09-20 07:28:33 UTC
verified on the build AOO3.5_r1387482
Comment 36 zjchen 2012-09-27 02:06:53 UTC
*** Issue 119614 has been marked as a duplicate of this issue. ***
Comment 37 zjchen 2012-09-27 02:10:55 UTC
*** Issue 119441 has been marked as a duplicate of this issue. ***
Comment 38 Shenfeng Liu 2012-10-09 09:22:27 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.