Issue 119657 - [From Symphony] Additional dot appear after the numbering.
[From Symphony] Additional dot appear after the numbering.
Status: CLOSED FIXED
Product: Writer
Classification: Application
Component: open-import
3.4.0
PC All
: P3 normal (vote)
: 4.0.0
Assigned To: zhang jianfang
:
Depends on:
Blocks: 121199
  Show dependency treegraph
 
Reported: 2012-06-01 06:11 UTC by xiao ting xiao
Modified: 2012-10-24 09:58 UTC (History)
3 users (show)

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


Attachments
sample file (13.94 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-06-01 06:11 UTC, xiao ting xiao
no flags Details
patch (5.26 KB, patch)
2012-09-13 02:32 UTC, wujinlong
zhangjf: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description xiao ting xiao 2012-06-01 06:11:10 UTC
Created attachment 77880 [details]
sample file

Steps:
1.Launch MS Office 2007/2010,input some paragraphs,then set a Numbering for them(no dot after the numbering style),then save the document as a .docx doc.
2.Launch AOO 3.4,open the attached sample files then check.

Problem:
a dot appear after the numbering.
Comment 1 Du Jing 2012-07-11 09:14:35 UTC
confirmed,change its status
Comment 2 wujinlong 2012-09-13 02:32:19 UTC
Created attachment 79452 [details]
patch

I had a fix for this bug. 

The problem is about an AbstracNum references to a style, which references to another Num. We don't have code to handle such case in Aoo.

My solution is,
1) During parsing of the styles.xml, if one style has numId property, save it.
(Changes in PropertyMap.hxx, DomainMapper.cxx)

2) During parsing of the numbering.xml, if an AbstractNum has a style linked, find the style and get the Num the style uses, then use this Num to find the actual AbstractNum that should be used. 
(Changes in NumberingManager.hxx, NumberingManager.cxx)

Below is XML examples shows this use case. 

In styles.xml, there is a style named 'style1', which uses Num '15'. 

In numbering.xml, the Num '16' uses AbstractNum '1', which has a style linked to 'style1'. The Num '15' uses AbstractNum '14'.

In document.xml, paragraph uses numbering '16', so it actually should uses numbering '15' (AbstractNum '14').

------------- styles.xml -------------
<w:style w:type="numbering" w:customStyle="1" w:styleId="Style1">
    <w:name w:val="Style1"/>
    <w:basedOn w:val="NoList"/>
    <w:rsid w:val="00F95E84"/>
    <w:pPr>
        <w:numPr>
            <w:numId w:val="15"/>
        </w:numPr>
    </w:pPr>
</w:style>
------------- styles.xml -------------

------------- numbering.xml -------------
<w:abstractNum w:abstractNumId="1">
    <w:nsid w:val="1D660BDF"/>
    <w:multiLevelType w:val="multilevel"/>
    <w:tmpl w:val="04090025"/>
    <w:numStyleLink w:val="Style1"/>
</w:abstractNum>

<w:num w:numId="15">
    <w:abstractNumId w:val="14"/>
</w:num>
<w:num w:numId="16">
    <w:abstractNumId w:val="1"/>
</w:num>
------------- numbering.xml -------------

------------- document.xml -------------
<w:p w:rsidR="004D49F0" w:rsidRDefault="007A33C6" w:rsidP="00F95E84">
    <w:pPr>
        <w:pStyle w:val="Heading1"/>
        <w:numPr>
            <w:ilvl w:val="0"/>
            <w:numId w:val="16"/>
        </w:numPr>
    </w:pPr>
    <w:r>
        <w:t>L</w:t>
    </w:r>
    <w:r w:rsidR="004D49F0">
        <w:t>ist style</w:t>
    </w:r>
</w:p>
------------- document.xml -------------
Comment 3 zhang jianfang 2012-09-14 14:20:09 UTC
Comment on attachment 79452 [details]
patch

The prior comment explain the problem clearly.
Comment 4 SVN Robot 2012-09-14 14:21:21 UTC
"zhangjf" committed SVN revision 1384796 into trunk:
#i119657#, importing docx, add code to handle the problem that an AbstracNum ...
Comment 5 zhang jianfang 2012-09-14 14:22:14 UTC
Change to resolved state
Comment 6 Du Jing 2012-09-20 08:11:41 UTC
verified on the build AOO3.5_r1387482
Comment 7 Shenfeng Liu 2012-10-09 08:21:13 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.