[Libreoffice-bugs] [Bug 129353] New: Bibliography contents is imported outside of bibliography field in a DOCX

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Dec 12 19:48:23 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=129353

            Bug ID: 129353
           Summary: Bibliography contents is imported outside of
                    bibliography field in a DOCX
           Product: LibreOffice
           Version: 4.3.0.4 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: implementationError
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

Created attachment 156523
  --> https://bugs.documentfoundation.org/attachment.cgi?id=156523&action=edit
A bibliography with an empty first paragraph

The attachment DOCX has one citation field, and one bibliography field. The
bibliography has an empty leading paragraph inside (that is how it was in an
original customer document), and then two entries. It is imported into
LibreOffice with an empty paragraph inside the bibliography field, but both
bibliography entries are imported as simple paragraphs after (outside) the
bibliography field. Note that Word 2016 imports them: the empty paragraph and
the following entries - inside the field.

The problem is that the bibliography field and its first entry have this XML
definition:

>                ...
>                <w:sdt>
>                    ...
>                    <w:sdtContent>
>                        <w:p>
>                            ...
>                            <w:r>
>                                <w:fldChar w:fldCharType="begin"/>
>                            </w:r>
>                            <w:r>
>                                <w:instrText xml:space="preserve"> BIBLIOGRAPHY </w:instrText>
>                            </w:r>
>                            <w:r>
>                                <w:fldChar w:fldCharType="separate"/>
>                            </w:r>
>                        </w:p>
>                        <w:p>
>                            ...
>                            <w:r>
>                                ...
>                                <w:t xml:space="preserve">Christie, A. (1922). </w:t>
>                            </w:r>
>                            ...

while usually it looks like

>                ...
>                <w:sdt>
>                    ...
>                    <w:sdtContent>
>                        <w:p>
>                            ...
>                            <w:r>
>                                <w:fldChar w:fldCharType="begin"/>
>                            </w:r>
>                            <w:r>
>                                <w:instrText xml:space="preserve"> BIBLIOGRAPHY </w:instrText>
>                            </w:r>
>                            <w:r>
>                                <w:fldChar w:fldCharType="separate"/>
>                            </w:r>
>                            <w:r>
>                                ...
>                                <w:t xml:space="preserve">Christie, A. (1922). </w:t>
>                            </w:r>
>                            ...

Note that in the "usual" XML, the run with <w:fldChar
w:fldCharType="separate"/> element is immediately followed by another run with
the first entry, which therefore is inside the paragraph entry defining the
bibliography field; while in problematic XML, the run with <w:fldChar
w:fldCharType="separate"/> element is the last run of the paragraph defining
bibliography field, and the first entry is in the following paragraph.

Reproduced with Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

and Version: 6.5.0.0.alpha0+ (x64)
Build ID: 6cdab5c92cecf90090ba72dfa6c22edf0d41028f
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL:
win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL

The 4.3 is the first to import bibliography fields as fields, so implementation
error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191212/135df3e7/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list