Issue 101422

Summary: set nodes can't be reset correctly via configuration API
Product: General Reporter: wuyan.ooorg
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: carsten.driesner, issues, liujiaxiang, peter.junge,
Version: OOO310m9   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
to retrieve default configuration values for set nodes none

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 "".