Issue 18627 - style name collisions, user defined style with same name as inbuilt style
Summary: style name collisions, user defined style with same name as inbuilt style
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2003-08-25 12:45 UTC by caolanm
Modified: 2017-05-20 11:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Example written in german SRC680m2 (5.13 KB, application/octet-stream)
2003-08-25 12:46 UTC, caolanm
no flags Details
Example where the word style collide (8.00 KB, application/octet-stream)
2003-08-25 13:02 UTC, caolanm
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2003-08-25 12:45:54 UTC
What should we do when a user defined style has a name which collides with a
current localized builtin style name. e.g. the base style is called "Standard"
in german and "Default" in english (and "Normal" for the main competitor in
english). If I create a document in the german version of our office and create
a user style names "Default" and open it in the english version there is an file
format load warning and the builtin "default" style is overridden. And the same
thing happens in the .doc format when there is a user style called "Default"
Comment 1 caolanm 2003-08-25 12:46:34 UTC
Created attachment 8729 [details]
Example written in german SRC680m2
Comment 2 caolanm 2003-08-25 12:50:36 UTC
The attached example was written in a german version and uses inbuilt
"Standard" and a userdefined style names "Default" and loads fine with
a german version. 

But opened in an english version there is an XML assert and the uses
of the inbuild "Standard" becomes that of the userdefined "Default"
persumably because "Default" is the english name for the inbuilt
"german Standard/english Default" style.
Comment 3 caolanm 2003-08-25 12:52:04 UTC
cmc->mib: Can we resolve this in a way common to all filters ?
Comment 4 caolanm 2003-08-25 13:02:40 UTC
Created attachment 8731 [details]
Example where the word style collide
Comment 5 caolanm 2003-08-25 13:03:31 UTC
In the competitor when the inbuilt style name is already in use by a
user defined style the name used is the inbuilt style plus 1 (and
presumably 2 etc if that is already taken)
Comment 6 michael.brauer 2003-08-27 11:46:29 UTC
There is already a style renaming existing for the UNO API, the export
is working correctly, but the import unfortunately conatisn an issue.

More details:
There is a SwStyleNameMapper class that maps (unique English) API
style names to internationalized UI names and back. Unfortunately teh
conversion from API names to UI names does not detect if the given
name matches an UI name already.
Comment 7 michael.brauer 2004-01-12 09:05:34 UTC
1) If a programmatic name is converted into an UI name, and if the name does not
belong to one of the pool styles, it has to checked whether a style with this
name exists already. If this us the case, a " (user) has to be appended.
2) The Word filter has to make use of the SwXStyleMapper (or at least parts of it)
Comment 8 Oliver Specht 2004-01-12 10:09:55 UTC
Comment 9 andreas.martens 2004-06-17 14:55:46 UTC
Because of a shortage of resources we have to retarget this issue to OOo later. 
Comment 10 andreas.martens 2004-06-17 16:03:06 UTC
Sorry, I did the retargetting by accident. This issue should be solved for OOo 2.0.
Comment 11 Oliver Specht 2004-09-21 15:37:28 UTC
In the example document the error message is caused by calling setParentStyle
where child and parent are the same (default and standard)

The API cannot do anything about this problem. Trying to create a new style
(user defined style) with the name of an already existing style (pool style)
cannot be circumvented by the API by changing the name. This can only be done by
the filter.

->dvo: Please have a look.
Comment 12 andreas.martens 2004-12-03 10:53:15 UTC
Set to target OOoLater due to lack of resources.
Comment 13 caolanm 2009-10-09 11:22:36 UTC
cmc->ama: dvo has left OOo quite some time, can we put this back into someone
elses queue :-)
Comment 14 andreas.martens 2009-10-09 11:45:22 UTC
ama->cmc: So you are volunteering? ;-)
Just kidding, I think this one is for os?!
Comment 15 Marcus 2017-05-20 11:19:35 UTC
Reset assigne to the default "".