For no comments received,I assume the solution is accepted by default..committed with revision:1376818,thanks.
On Wed, Aug 22, 2012 at 10:45 AM, chengjh <chen...@apache.org> wrote: > Hi > > I would like to provide our solution of the issue described in [1] > https://issues.apache.org/ooo/show_bug.cgi?id=119405 .You are welcome to > review and comment the fix patch [2] > https://issues.apache.org/ooo/attachment.cgi?id=79015&action=diff before > I commit the code changes into trunk.Thanks in advance. > > *Problem Description:* > To some MS Word binary documents, the numbering and bullets looks same in > MS Word,but their attributes,such as the font size,font style,font > color..., will be different after being launched into Aoo Writer.They are > obvious fidelity issues.Please refer to the samples attached in test cases. > > *Root Cause Analysis:* > As we know,MS Word provides the paragraph end mark,which 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 that > 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. Moreover, the > latter has higher priority than the former.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. At that time,the default > attributes of Aoo Writer will apply to the numbering and bullets instead of > the actual attributes of paragraph end mark.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 for missing the equal paragraph end mark in Aoo > Writer.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. > > *Test Cases for The Patch:* > [1]https://issues.apache.org/ooo/attachment.cgi?id=79017&action=edit > [2]https://issues.apache.org/ooo/attachment.cgi?id=79018&action=edit > [3]https://issues.apache.org/ooo/attachment.cgi?id=79019&action=edit > [4]https://issues.apache.org/ooo/attachment.cgi?id=79020&action=edit > [5]https://issues.apache.org/ooo/attachment.cgi?id=79021&action=edit > [6]https://issues.apache.org/ooo/attachment.cgi?id=79022&action=edit > > *PVT Test Result for the Patch:* > [1]https://issues.apache.org/ooo/attachment.cgi?id=79045&action=edit > -- > > Best Regards,Jianhong Cheng > > -- Best Regards,Jianhong Cheng