Issue 119405

Summary: Numbering text style changed after importing the *.doc
Product: Writer Reporter: Jian Hong Cheng <chengjh>
Component: open-importAssignee: zhengfan <zheng.easyfan>
Status: CLOSED FIXED QA Contact:
Severity: Major    
Priority: P1 (highest) CC: bjdujing, liushenf, zongdj001
Version: 4.0.0-dev   
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
This sample only contains three numbering paras
none
numbering style and value has problem.
none
Fix Patch
none
Test Case1
none
Test Case2
none
Test Case3
none
Test Case4
none
Test Case5
none
Test Case6
none
PVT Test Result none

Description Jian Hong Cheng 2012-05-23 01:41:48 UTC
Created attachment 77581 [details]
This sample only contains three numbering paras

1.Launch Aoo 3.4
2.Open the sample and find some numbering text formats are different from what they are in Ms Word...
Comment 1 Du Jing 2012-05-25 08:21:37 UTC
Can reproduce on Aoo3.4,and I think it is critical,suggest fix as soon as possible.
Comment 2 zongdj 2012-06-07 05:24:11 UTC
Created attachment 78082 [details]
numbering style and value has problem.

This sample numbering style and value also has problem.
Comment 3 zong dong jun 2012-08-20 03:19:37 UTC
Bug 120621, is opened for the second sample. Can igore this sample's problem is this bug.
Comment 4 Jian Hong Cheng 2012-08-21 03:25:08 UTC
Created attachment 79015 [details]
Fix Patch
Comment 5 Jian Hong Cheng 2012-08-21 05:05:48 UTC
Created attachment 79017 [details]
Test Case1

1)In MS Word,the bullet sizes are same
2)In Aoo Writer before the fix patch,the bullet sizes are different
Comment 6 Jian Hong Cheng 2012-08-21 05:08:16 UTC
Created attachment 79018 [details]
Test Case2

1)The bullet sizes are same in MS Word
2)The bullet sizes will be different after being launched into Aoo Writer
3)The third para end mark has not its own individual attributes in the binary file
Comment 7 Jian Hong Cheng 2012-08-21 05:12:26 UTC
Created attachment 79019 [details]
Test Case3

1)The numbering attributes looks same in MS Word
2)The numbering attributes looks different after being launched into Aoo Writer
Comment 8 Jian Hong Cheng 2012-08-21 05:14:29 UTC
Created attachment 79020 [details]
Test Case4

The para end mark has its own individual attributes at its position
Comment 9 Jian Hong Cheng 2012-08-21 05:16:29 UTC
Created attachment 79021 [details]
Test Case5

Avoid the impact of Hyperlink attributes at end of para
Comment 10 Jian Hong Cheng 2012-08-21 05:17:37 UTC
Created attachment 79022 [details]
Test Case6

Negative Impacts:the color will be changed..
Comment 11 Jian Hong Cheng 2012-08-21 06:38:17 UTC
Problem Description:
To some MS Word binary documents, the numbering and bullets looks same in MS Word,but their attributes will be different after being launched into Aoo Writer.Please refer to the samples attached in test cases.

Root Cause Analysis:
As we know,MS Word provides the paragraph end mark,it is used broadly to distinguish the attributes of text contents,attributes of paragraph and the methods to handling flying objects anchoring,and so on..In this thread, we will not outspread it,and will only focus on its impact on the numbering and bullets attributes.In MS Word,there are two kinds of attributes will determine the final result of numbering and bullets applied to a paragraph.One is the attribute that is applied to the whole text contents of a paragraph;The other is the attribute that is applied to the paragraph end mark,presented with 0x0D in MS Word binary document. Because Aoo Writer doesn't support the same kind of paragraph end mark, the attributes of 0x0D will be lost during loading a MS Word Binary document, and default attributes of Aoo Writer will apply to the numbering and bullets instead of its actual attributes.Thus, to the numbering and bullets whose attributes are determined by the  paragraph end mark, the fidelity will have problems.That's the reason.

Solution:
When parsing the attributes of paragraph end mark(0x0D),the attributes will be extended and set to the character style binding to the given level of a number rule.Thus,the attributes of MS Word's paragraph end mark will apply to the numbering and bullets in Aoo Writer successfully to keep the fidelity.

Negative Impact:
Although most common user scenarios can be met by the solution,there are still negative impacts.Because the attributes of paragraph end mark(0x0D) will be set to the character style binding to the given level of a number rule,it will have the global impact..Other paragraphs that are applied with the same number rule's level will also be changed.Please refer to the Test Case 6, the color of the bullet will be changed finally. Generally, MS Word users will have their numbering/bullets the same attributes/style when using the same level's of number rule,correspondingly,the impacted scenarios are rarely.
Comment 12 Jian Hong Cheng 2012-08-22 02:30:51 UTC
Created attachment 79045 [details]
PVT Test Result

Run PVT test from https://svn.apache.org/repos/asf/incubator/ooo/trunk/main/test
Comment 13 Jian Hong Cheng 2012-08-29 06:18:01 UTC
Committed with revision:1376818,thanks.
Comment 14 Du Jing 2012-09-21 03:07:15 UTC
verified on the AOO3.5_r1387482
Comment 15 Shenfeng Liu 2012-10-09 09:25:07 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.