View Issue Details

IDProjectCategoryView StatusLast Update
0013001ScribusImport / Exportpublic2016-12-08 22:04
Reporterale Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version1.5.0svn 
Target Version1.5.4Fixed in Version 
Summary0013001: loading odt files with merge option only mangles spaces in style names
Descriptionloading an odt file with the style "Heading 1" and "Text Body" used, creates two styles "Heading_20_1" and "Text_20_body".

i would expect the styles "Heading 1" and "Text body" to be created.

if the styles with the correct name already exist they are ignored.
TagsNo tags attached.
PatchNo

Relationships

related to 0009858 assignedfschmid Importing ODT Character styles ignored/not-imported 
related to 0011157 closedfschmid Import of ODT should use "display name" of style 

Activities

ale

2015-04-13 19:27

manager   ~0034921

i had a look at it.

odt files have two style names: one internal (style:name) and one shown to the user (style:display-name).

i would say, that the name used by scribus for creating the style should be the display-name, since that is the one the user can type in in LO and the one she will expect to see created in scribus.

if you agree on that, i can try to make a patch...
(it's not a straightforward patch, since scribus is first reading all the styles and then reading the content; in two different and unrelated parts of the code...)

christoph_s

2015-04-14 05:35

administrator   ~0034922

Franz, given the many issues with ODT import and your recent work on ODG, do you think you could do a similar rewrite to the ODT importer for 1.5.1?

Ben

2015-10-11 01:11

reporter   ~0036612

Last edited: 2016-02-25 00:59

View 2 revisions

The "Merge Paragraph Styles" option isn't necessary to recreate the reported behavior, in fact a new style is created even when all 4 checkboxes are unchecked:
      [ ] Overwrite Paragraph Styles
      [ ] Merge Paragraph Styles
      [ ] Use document name as a prefix for paragraph styles
      [ ] Do not ask again
I had hoped to ONLY map OpenOffice styles to Scribus styles at a tagging level, where all appearance would be dictated by the Scribus styles. This does work perfectly except for the space to _20_ issue.

In such a situation (all 4 options unchecked), if a style doesn't exist in Scribus, should a style-replacement dialog be offered, as it is when a style is deleted, instead of creating a new style? Perhaps an extra option in that dialog to create a placeholder style could replicate current behavior. Note that the created style, e.g. Style_20_One, seems to be nothing more than a duplicate of the Scribus "Default Paragraph Style."

I agree with ale about the display name being a better choice. Currently, Scribus' default styles are inaccessible from OO.

Observations based on 1.5.1svn r20458

Kunda

2016-01-14 16:42

manager   ~0038159

Ben & Christoph, is this still an issue based on the new rewrite of the ODF importer ?

Ben

2016-01-15 06:56

reporter   ~0038169

Last edited: 2016-01-15 06:58

View 2 revisions

As of r20684 (14 Jan 2016), the issue remains unchanged. ODF paragraph style names have spaces replaced with _20_ and, as noted in issue 0009858, named character styles are not imported at all.

Ben

2016-02-25 00:47

reporter   ~0038897

Last edited: 2016-02-25 00:58

View 2 revisions

Sorry, I need to back up a bit. My comment on 2016-01-15 was incorrect, conflating two different importers.

To clarify, the _20_ problem still exists in the importer named "OpenOffice.org Writer Documents." The _20_ problem was never present in the importer named "ODT Document," which appears to re-implement a functionality subset (see issue 0013643) from the old "OpenDocument Text Documents" and took its place in the importer drop-down list. I made the same conflation in 0009858, but it was irrelevant, there.

Issue 0011157 should be related to this issue. In terms of the "OpenDocument Text Documents" importer, that issue was an exact duplicate of this and was correctly closed as resolved when that importer was replaced with the "ODT Document" importer. Perhaps this issue could be dedicated to correcting the parallel issue in the "OpenOffice.org Writer Documents" importer which still exists and remains unfixed.

Issue History

Date Modified Username Field Change
2015-04-11 07:40 ale New Issue
2015-04-13 19:27 ale Note Added: 0034921
2015-04-14 05:35 christoph_s Note Added: 0034922
2015-10-11 01:11 Ben Note Added: 0036612
2016-01-14 16:42 Kunda Note Added: 0038159
2016-01-15 06:56 Ben Note Added: 0038169
2016-01-15 06:58 Ben Note Edited: 0038169 View Revisions
2016-01-15 11:31 Kunda Relationship added related to 0009858
2016-01-15 11:32 Kunda Status new => confirmed
2016-01-15 11:32 Kunda Target Version => 1.5.1
2016-01-23 17:16 cbradney Target Version 1.5.1 => 1.5.3
2016-02-25 00:47 Ben Note Added: 0038897
2016-02-25 00:58 Kunda Note Edited: 0038897 View Revisions
2016-02-25 00:59 Kunda Note Edited: 0036612 View Revisions
2016-03-08 16:51 Kunda Relationship added related to 0011157
2016-12-08 22:04 Kunda Target Version 1.5.3 => 1.5.4