Issue 101422 - set nodes can't be reset correctly via configuration API
Summary: set nodes can't be reset correctly via configuration API
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOO310m9
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2009-04-29 10:28 UTC by wuyan.ooorg
Modified: 2017-05-20 10:55 UTC (History)
5 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

to retrieve default configuration values for set nodes (1.06 KB, text/plain)
2009-04-29 10:31 UTC, wuyan.ooorg
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description wuyan.ooorg 2009-04-29 10:28:55 UTC
I am encountering a problem to reset the Accelerators.xcu in the user layer to
it's default values in the default layer.
I want to reset the nodes of a set in the user layer to it's default values in
the share layer. It seems that method doesn't work
In order to test this configuration API, I wrote a macro(please see the
attachment) to reset all the nodes of org.openoffice.Office.Views/Windows, and
got the result as following:
 <node oor:name="Windows">
  <node oor:name="SplitWindow0" oor:op="remove"/>
  <node oor:name="SplitWindow2" oor:op="remove"/>
  <node oor:name="SplitWindow1" oor:op="remove"/>
  <node oor:name="SplitWindow3" oor:op="remove"/>
If such nodes(SplitWindow0,1,...) exist in the default layer, they would be
overrided. A better result in the user layer would be:
 <node oor:name="Windows">

BTW, works
fine to reset the properties of a group node. It removes those properties in the 
user layer.
Comment 1 wuyan.ooorg 2009-04-29 10:31:25 UTC
Created attachment 61881 [details]
to retrieve default configuration values for set nodes
Comment 2 Stephan Bergmann 2009-04-29 12:29:08 UTC
@wuy:  I assume this is a misunderstanding.  Properties can have default values,
which must be specified in the corresponding .xcs files.  The configuration API
allows to reset a given property to its default value, if any.  For a given set,
there cannot be any set elements specified in the corresponding .xcs file. 
Hence, resetting a set element to its default can only be interpreted as
removing that set element.  So, in turn, the current behavior look OK to me.
Comment 3 carsten.driesner 2009-04-29 12:58:13 UTC
cd: This sounds like a misunderstanding. Joerg Barfurth explained to us that
setToDefaultXXX(...) methods are designed to have something like reset to
factory settings. Your explanation of the setToDefaultXXX() method makes sense
and that it works as designed. Unfortunately this is not what we need for the
accelerator configuration.

I think this is worth to be converted to an request for enhancement. 
Comment 4 Stephan Bergmann 2009-04-29 13:05:52 UTC
lets see whether something can be done here
Comment 5 Marcus 2017-05-20 10:55:50 UTC
Reset assigne to the default "".