Created attachment 156523 [details] 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.
Confirmed using 6.5.0.0.alpha0+ (775a06361639ffc539fda20d44b9610c98005d9b) / Ubuntu.
https://gerrit.libreoffice.org/85089
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5cdb14345842c07eb1a466897753da910e9488f8 tdf#129353, tdf#129402: fix node creation on index import It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/e76fcb8f169acac3d81bdaf9b126cc4c98e2eb8e tdf#129353, tdf#129402: fix node creation on index import It will be available in 6.4.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/3018dcbf12fe96e57fe52dc1b2d7a1235b480eef tdf#129353, tdf#129402: fix node creation on index import It will be available in 6.3.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 130290 has been marked as a duplicate of this bug. ***
*** Bug 124512 has been marked as a duplicate of this bug. ***
*** Bug 132785 has been marked as a duplicate of this bug. ***