View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017639 | Scribus | Styles | public | 2025-10-04 17:16 | 2025-10-07 21:09 |
Reporter | henrylaw | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Linux Mint | OS | Mint 21 | OS Version | Vanessa |
Product Version | 1.6.4 | ||||
Summary | 0017639: On importing a Libreoffice Writer file, styles are imported but not associated with paragraphs | ||||
Description | On importing the contents of a LibreOffice Writer .odt file into a text box, the text is imported correctly, and formatted as expected, but the styles are not applied to the paragraphs: on opening the Story Editor they are all assigned "Default paragraph style". | ||||
Steps To Reproduce | Create a new, blank document in Scribus. Draw a text box. Use "File", "Import", "Get text" (or Ctrl-I) and select the attached test file. Use the automatic importer and do not select either "import text only" or "Prefix styles with item name"; press OK. See that the first line is bold and centred, and the rest is normal text. Open the Story Editor; see that "Default Paragraph Style" is assigned to both imported paragraphs. | ||||
Additional Information | Importing of some other .odt files works correctly. | ||||
Tags | import, libreoffice, styles | ||||
Attached Files | |||||
Patch | No | ||||
|
I've diffed the content.xml in this odt and the one in 0017353 and the big difference seems to be that the one in this ticket uses "office:automatic-styles". The paragraph then references P1, which in the automatic styles references aWC_20_Heading. The Scribus seems to correctly add to the list of styles the style:parent-style-name defined in the automatic style, but does not create a link between the style name that Libreoffice will be using in the xml and parent style. |
|
Excellent work, ale. I wrote a little Perl program that replaces the reference to so-called "automatic" styles with references to the real styles ("aWC_20_Heading" rather than "P1" in your example) and updates the .odt archive with the modified content.xml. I can confirm that styles now import correctly. The same indirection rigmarole is used for text styles ("T1", "T2" etc) but I've not looked into that aspect. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-10-04 17:16 | henrylaw | New Issue | |
2025-10-04 17:16 | henrylaw | Tag Attached: import | |
2025-10-04 17:16 | henrylaw | Tag Attached: libreoffice | |
2025-10-04 17:16 | henrylaw | Tag Attached: styles | |
2025-10-04 17:16 | henrylaw | File Added: test_aWC.odt | |
2025-10-05 09:07 | ale | Note Added: 0053051 | |
2025-10-06 11:00 | henrylaw | Note Added: 0053052 |