Bug 147115 - docx import filter, wrong default paragraph style was taken
Summary: docx import filter, wrong default paragraph style was taken
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.4.0 target:7.3.1 target:7.2.6
Keywords: filter:docx, regression
Depends on:
Blocks:
 
Reported: 2022-02-01 22:44 UTC by Sven-Jacobi
Modified: 2022-02-03 09:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bugdoc (11.78 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-02-01 22:44 UTC, Sven-Jacobi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Jacobi 2022-02-01 22:44:11 UTC
Created attachment 177969 [details]
bugdoc

If you load the attached bugdoc in LibreOffice, then the wrong default paragraph style is used. The document looks totaly wrong in LO compared to as if loaded in Word.

In the styles.xml of the bugdoc there is the correct default style as followed:

<w:style w:type="paragraph"
   w:default="1"
   w:styleId="Standard">
   <w:name w:val="Normal"/>
   <w:qFormat/>
</w:style>

and the following style is overwriting the default when loaded in LO (just because of the default = 0 value):

<w:style w:type="paragraph"
   w:styleId="Listenabsatz"
   w:default="0">
   <w:name w:val="List Paragraph"/>
   <w:basedOn w:val="Standard"/>
   <w:uiPriority w:val="34"/>
   <w:qFormat/>
   <w:rsid w:val="004E3BB8"/>
   <w:pPr>
      <w:ind w:left="720"/>
      <w:contextualSpacing/>
   </w:pPr>
</w:style>

My patch I commited to gerrit is fixing this problem: https://gerrit.libreoffice.org/c/core/+/128811
Comment 1 Commit Notification 2022-02-03 06:21:41 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/71303d77febfd51a493ce797933143cc318818cf

tdf#147115 writerfilter: style is only default if default=true

It will be available in 7.4.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.
Comment 2 Justin L 2022-02-03 06:51:22 UTC
I will backport this to 7.3 and 7.2 as well.
Comment 3 Commit Notification 2022-02-03 08:24:59 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/8e9830755c17c3351f074b251f30f3216b481214

tdf#147115 writerfilter: style is only default if default=true

It will be available in 7.3.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.
Comment 4 Commit Notification 2022-02-03 09:45:06 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/d5e470882c7538716a9810d757e7481304e9724e

tdf#147115 writerfilter: style is only default if default=true

It will be available in 7.2.6.

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.