View Issue Details

IDProjectCategoryView StatusLast Update
0017639ScribusStylespublic2025-10-07 21:09
Reporterhenrylaw Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformLinux MintOSMint 21OS VersionVanessa
Product Version1.6.4 
Summary0017639: On importing a Libreoffice Writer file, styles are imported but not associated with paragraphs
DescriptionOn 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 ReproduceCreate 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 InformationImporting of some other .odt files works correctly.
Tagsimport, libreoffice, styles
Attached Files
test_aWC.odt (12,218 bytes)
PatchNo

Activities

ale

2025-10-05 09:07

manager   ~0053051

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.

henrylaw

2025-10-06 11:00

reporter   ~0053052

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.

Issue History

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