Scribus Forums

Scribus => Text and Typography => Topic started by: kayosiii on May 31, 2024, 02:07:08 PM

Title: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: kayosiii on May 31, 2024, 02:07:08 PM
I am trying to import a document written in Libre Office writer (current version) using styles.
Importing the text into scribus, imported the text and the styles.
The document looks correct but each paragraph is linked to the "default paragraph style".
The main reason I edited the document in writer in the first place is because styling a document in scribus is a pain in the backside.

Is this expected behaviour?
Is there anything I can try?

I have tried the scribus 1.6.1 and today's git/master. if that helps.
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: PatJr on May 31, 2024, 03:15:45 PM
not sure I understand what you want
you want each paragraph to have it's own style when you impot it?
try adding a style in LibreOffice befor you import it, maybe then it will import with a seperate style
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: kayosiii on May 31, 2024, 04:03:45 PM
I had the document set up with styles in LibreOffice Writer. The body text, is "text body", headings are "heading 1", "heading 2" etc and so on.

When I import that document into scribus:

The text gets imported and looks right.
The styles get imported.
The text is not linked to the styles in any way, the style in the story editor etc shows "default Paragraph style" as the style linked to every paragraph in the imported document.
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: AdmFubar on May 31, 2024, 07:23:54 PM
Have you check via the style window? (press F4) are the styles listed under the default style?
And just to check have you tried importing RTF of HTML versions of your text from LibreOffice?
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: kayosiii on June 01, 2024, 02:25:36 AM
All the styles are listed under the 'default paragraph style' in the style manager.

RTF - does not import styles at all.
HTML - imports a small subset of styles and links them.
DOCX - imports all paragraph styles partially (things like typeface are not imported), styles are linked to paragraphs (so yay for that), character styles are not imported and all character style based formatting is lost.

So far DOCX is the least amount of work, but is still a significant amount of work for a document with both character and paragraph styles.
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: dtribby on July 02, 2024, 10:03:28 AM
I have seen the exact behavior described here for .odt and .docx files. I tested on both Windows 10 and Linux.

I used version 1.4.x for many years, and .odt files imported nicely, with paragraph styles correctly associated with the text. Unused styles were not added to the Scribus file.

Now I'm trying to use 1.6.2, and find importing .odt files unusable. Is there any chance the Open Document import can be restored to its 1.4.7 functionality, or at least work as well as the DOCX import?

I see a similar question from January ("Import text with style, but only the used styles'), but do not see if it resulted in any change.

[This is my first post. I joined the forum to see if there is a fix to this problem, and was pleased to see someone else shares my experience.]
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: LanceNY on October 15, 2024, 02:35:02 PM
Hey all,

\It's a shame there hasn't been a dev response. It would seem that if it worked in 1.4, the input modules from that might be able to be replaced?

At any rate, what is the best workflow at this point? I'm starting a long form (a few hundred page) book. It is written in LibreOffice and can be saved/exported in any format.

I'm assuming DOCX is the best from what is said above. But should I bother doing formatting in Libre, and which type? And what would be best left until after import into Scribus?

Much appreciated!
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: MrB on October 15, 2024, 09:41:25 PM
Would you mind submitting a sample document and description on bugs.scribus.net? Thanks, Craig
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: AdmFubar on October 15, 2024, 09:44:54 PM
Most likely the importer library needs to be updated to handle the latest version of open document standard.
now if you open a  LO document in scribus 1.4 and save it, then open that 1.4 sla in a newer version of scribus are the styles are linked to the correct paragraph?
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: jirib on December 21, 2024, 02:56:23 PM
I can confirm it: the import makes the text to literally _look_ well but the link between original paragraph/character styles is lost.

This is bad for two things:

1. one cannot update the text via styles since all styles are default one (both for paragraph and characters)

2. the language defined for styles (ie. in Scribus only character styles have language value) are lost; this impacts spell check
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: jirib on December 27, 2024, 05:22:36 PM
For archives, the bug: https://bugs.scribus.net/view.php?id=17353 .
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: jirib on January 04, 2025, 02:56:20 PM
solved in 1.6.3svn
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: henrylaw on October 04, 2025, 10:58:03 AM
Quote from: jirib on January 04, 2025, 02:56:20 PMsolved in 1.6.3svn
Seems to have regressed in 1.6.4. I'm running the AppImage and encounter the problem exactly as described.
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: henrylaw on October 04, 2025, 11:07:18 AM
Quote from: jirib on January 04, 2025, 02:56:20 PMsolved in 1.6.3svn

Hmm; since I found the bug still in 1.6.4 (see post above) I downloaded 1.6.3 in the form of scribus-1.6.3-linux-x86_64.AppImage - it behaves in exactly the same way.

A fix for this would be very welcome. I'm just about to take on the job of laying out a local monthly 24-page community magazine, for which copy will come via ODT documents with a standard set of styles already applied.  Having to reapply them after importing would slow things down massively!
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: a.l.e on October 04, 2025, 12:34:49 PM
I've loaded the test.odt from the ticket into the Scribus 1.6.4 Appimage and it looks correct to me...

ciao-mondo.png

What is the result in your case?
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: henrylaw on October 04, 2025, 12:57:21 PM
Very interesting, not to say puzzling.  I created a blank .sla file with 1.6.4 and imported the test.odt attached above.  As you say, it imports perfectly, with the style applied and visible in the story editor.

So it's down to me to document my case which doesn't work ...
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: henrylaw on October 04, 2025, 01:13:01 PM
Results of more investigation. I've created a test .odt file with my styles (attached); as described above when I import it into a blank Scribus document the paragraphs are all assigned 'Default Paragraph Style', despite being formatted correctly on the screen.

I've checked styles.xml from the test .odt document: the styles 'aWC Heading' and 'aWC Normal' are defined.  And in content.xml they are correctly made the parent of the local styles "P1" and "P2" respectively, which are then correctly applied to the text paragraphs.
Title: Re: Odt import - Paragraph styles are imported, but not linked to the paragraph.
Post by: a.l.e on October 04, 2025, 05:23:34 PM
I can confirm that when loading your file the formatting is correctly applied, but the styles are not assigned to the text.

Would you mind opening a ticket in https://bugs.scribus.net and attaching there your file?