View Issue Details

IDProjectCategoryView StatusLast Update
0013772ScribusImport / Exportpublic2016-04-24 20:27
ReporterBen Assigned To 
Status newResolutionopen 
Platformx86_64OSOpenSuseOS Version13.2
Product Version1.5.2.svn 
Target Version1.6 milestone 
Summary0013772: ODT Document importer doesn't understand all styles
DescriptionWithin an ODT/FODT file, the application of a user-defined paragraph style can be expressed in more than one way. Within LibeOffice, the difference is both invisible and unavoidable. The importer "ODT Document" doesn't understand one of those ways and applies the default paragraph style instead.

In the attached .fodt file, LibreOffice (LO) will show both paragraphs as having the user-defined paragraph style MyStyleOne. However, the xml of the .fodt file internally applies the style P1 to the second paragraph. This can be easily caused in LO with copy & paste. When a paragraph is copied & pasted within LO , its user-defined paragraph style is applied to the copy as well. Within LO, this all appears normal; a paragraph with user-defined style MyStyleOne will have a copy with MyStyleOne. Within the XML of the saved file, however, the copy is actually tagged with a style P1, which has a parent style MyStyleOne. P2 would be applied to any copies of content with some other style, say MyStyleTwo. These new styles (P1, P2, etc.) are defined in a different section of XML than the originals (office:auotmatic-styles instead of office:styles).

The importer "ODT Document" gives text tagged with P1 the "Default Paragraph Style" in Scribus. The previous importer, "OpenDoucment Text Documents" literally created a new style P1 in Scribus. Neither seems ideal.

What it looks like inside a OO/LO file (from the attached .fodt):
 <office:styles> [line 124]
  <style:style style:name="MyStyleOne" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
   <style:text-properties fo:font-weight="bold" officeooo:rsid="0017d756" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
  </style:style> [line 163]
 </office:styles> [line 219]

 <office:automatic-styles> [line 220]
  <style:style style:name="P1" style:family="paragraph" style:parent-style-name="MyStyleOne">
   <style:text-properties officeooo:paragraph-rsid="0017d756"/>
 </office:automatic-styles> [line 234]

 <office:body> [line 238]
  <office:text> [line 239]

   <text:p text:style-name="MyStyleOne">Paragraph One is typed, its appearance is set to bold then MyStyleOne is defined from it.</text:p>

   <text:p text:style-name="P1">Paragraph <text:span text:style-name="T1">Two</text:span> is <text:span text:style-name="T1">copied from paragraph one, receiving MyStyleOne, and appears bold.</text:span></text:p>

  </office:text> [line 248]
 </office:body> [line 249]

Steps To Reproduce1) Open the attached file in OO/LO and observe that both paragraphs have the user-defined style MyStyleOne.
2) In Scribus, import that file into a text frame using the "ODT Document" importer.
3) In scribus the second paragraph (the copy) will receive the default paragraph style.
Additional InformationOffending file created with LibreOffice
Tested on 1.5.2svn revision 21037
Possible relationships: 0013766 also involves parsing odt/fodt files for style information.
Possible tag: ODF

Tags#please_test, ODF


related to 0013766 new ODT Importer creates extraneous styles 
related to 0006573 closed Some styles imported from OpenOffice loose their names 



2016-02-25 00:21


copyPaste.fodt (25,635 bytes)

Issue History

Date Modified Username Field Change
2016-02-25 00:21 Ben New Issue
2016-02-25 00:21 Ben File Added: copyPaste.fodt
2016-03-05 21:13 Kunda Tag Attached: ODF
2016-03-22 11:31 Kunda Additional Information Updated
2016-03-22 11:31 Kunda Relationship added related to 0013766
2016-03-22 11:32 Kunda Steps to Reproduce Updated
2016-03-22 12:10 Kunda Tag Attached: #please_test
2016-04-24 12:46 Kunda Relationship added related to 0006573
2016-04-24 20:27 Kunda Target Version => 1.6 milestone