https://bugs.freedesktop.org/show_bug.cgi?id=65955
Priority: medium
Bug ID: 65955
Assignee: [email protected]
Summary: FILESAVE: DOCX export: bookmark at and of paragraph
not exported correctly
Severity: normal
Classification: Unclassified
OS: Windows (All)
Reporter: [email protected]
Hardware: All
Status: UNCONFIRMED
Version: 4.0.4.2 rc
Component: filters and storage
Product: LibreOffice
If there is a bookmark at the end of a paragraph, the bookmark is not exported
correctly to DOCX.
Two types of errors are possible (but I think they have the same cause):
a) if there is a collapsed bookmark (at paragraph end), it is exported to the
beginning of the paragraph
b) if there is a bookmark that extends over contents (at paragraph end), it is
collapsed *before* the content.
How to reproduce:
1) create a new Document in Writer
2) add two paragraphs with content "foo" (first par) and "bar" (second par)
3) place the curser after the "o" of "foo"
4) insert a bookmark "a"
5) mark the content "r" in "bar"
6) insert a bookmark "b"
7) save the file as DOCX (Microsoft Word 2007/2010 XML)
8) look at the generated word/document.xml (inside the docx file)
you will find the following RESULT (first paragraph = case a):
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
</w:pPr>
<w:bookmarkStart w:id="0" w:name="a"/>
<w:bookmarkEnd w:id="0"/>
<w:r>
<w:rPr/>
<w:t>Foo</w:t>
</w:r>
</w:p>
where the EXPECTED result for the first paragraph (case a) is:
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
</w:pPr>
<w:r>
<w:rPr/>
<w:t>Foo</w:t>
</w:r>
<w:bookmarkStart w:id="0" w:name="a"/>
<w:bookmarkEnd w:id="0"/>
</w:p>
And the RESULT for the second paragraph (case b) is:
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
</w:pPr>
<w:r>
<w:rPr/>
<w:t>ba</w:t>
</w:r>
<w:bookmarkStart w:id="1" w:name="b"/>
<w:bookmarkEnd w:id="1"/>
<w:r>
<w:rPr/>
<w:t>r</w:t>
</w:r>
</w:p>
where the EXPECTED result for the second paragraph (case b) is:
<w:p>
<w:pPr>
<w:pStyle w:val="style0"/>
</w:pPr>
<w:r>
<w:rPr/>
<w:t>ba</w:t>
</w:r>
<w:bookmarkStart w:id="1" w:name="b"/>
<w:r>
<w:rPr/>
<w:t>r</w:t>
</w:r>
<w:bookmarkEnd w:id="1"/>
</w:p>
BTW: if the bookmark is in any other position within the paragraph, it is
exported correctly. The bug only occurs if the bookmark is the last element in
the paragraph.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs