Apache OpenOffice (AOO) Bugzilla – Issue 18627
style name collisions, user defined style with same name as inbuilt style
Last modified: 2017-05-20 11:19:35 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"
Created attachment 8729 [details] Example written in german SRC680m2
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.
cmc->mib: Can we resolve this in a way common to all filters ?
Created attachment 8731 [details] Example where the word style collide
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)
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.
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)
.
Because of a shortage of resources we have to retarget this issue to OOo later.
Sorry, I did the retargetting by accident. This issue should be solved for OOo 2.0.
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.
Set to target OOoLater due to lack of resources.
cmc->ama: dvo has left OOo quite some time, can we put this back into someone elses queue :-)
ama->cmc: So you are volunteering? ;-) Just kidding, I think this one is for os?!
Reset assigne to the default "issues@openoffice.apache.org".