summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorJörg Barfurth <jb@openoffice.org>2001-11-14 16:00:14 +0000
committerJörg Barfurth <jb@openoffice.org>2001-11-14 16:00:14 +0000
commit6f6c5b26eccf35d4c0f43ccd6eca89f91dd94f71 (patch)
tree0ba0fb1cf3dd04a4cee927059ffa01ec9106c237 /configmgr
parentf3ad1366c874fde4d92c58c8ab98692cebc5e188 (diff)
#86930#,#94287# Provide interface for adjusting state and access
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/inc/valuenode.hxx8
-rw-r--r--configmgr/source/tree/cmtree.cxx22
2 files changed, 22 insertions, 8 deletions
diff --git a/configmgr/source/inc/valuenode.hxx b/configmgr/source/inc/valuenode.hxx
index 38d749fa4ae8..b54dc8a42361 100644
--- a/configmgr/source/inc/valuenode.hxx
+++ b/configmgr/source/inc/valuenode.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: valuenode.hxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: jb $ $Date: 2001-11-05 16:50:18 $
+ * last change: $Author: jb $ $Date: 2001-11-14 17:00:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -148,7 +148,9 @@ namespace configmgr
bool isDefault() const { return m_aAttributes.isDefault(); }
bool isLocalized() const { return m_aAttributes.bLocalized; }
- void forceWritableToFinalized(); /// make non-writable nodes writable but finalized
+ void modifyState(node::State _eNewState);
+ void modifyAccess(bool _bWritable,bool _bFinalized);
+ void forceWritableToFinalized();
// to be used with caution. If the node is referenced from somewhere else under it's old name,
// you may have problems with this inconsistence
diff --git a/configmgr/source/tree/cmtree.cxx b/configmgr/source/tree/cmtree.cxx
index 70818e6bfd88..80130ab3df93 100644
--- a/configmgr/source/tree/cmtree.cxx
+++ b/configmgr/source/tree/cmtree.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cmtree.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: jb $ $Date: 2001-09-28 12:44:30 $
+ * last change: $Author: jb $ $Date: 2001-11-14 17:00:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,9 +72,8 @@
#ifndef CONFIGMGR_TREEPROVIDER_HXX
#include "treeprovider.hxx"
#endif
-#ifndef _CONFIGMGR_TREEACTIONS_HXX_
-#include "treeactions.hxx"
-#endif
+
+//#include "treeactions.hxx"
#ifndef _RTL_STRING_HXX_
#include <rtl/string.hxx>
@@ -147,6 +146,19 @@ namespace configmgr
ValueNode* INode::asValueNode() {return NULL;}
ValueNode const* INode::asValueNode() const {return NULL;}
+ void INode::modifyState(node::State _eNewState)
+ {
+ m_aAttributes.setState(_eNewState);
+ }
+
+ void INode::modifyAccess(bool _bWritable,bool _bFinalized)
+ {
+ // this state can only occurs a s a result of forceWritableToFinalized()
+ OSL_ENSURE(!(_bWritable && _bFinalized),"Invalid access state: Node is both writable and finalized");
+
+ m_aAttributes.bWritable = _bWritable;
+ m_aAttributes.bFinalized = _bFinalized;
+ }
void INode::forceWritableToFinalized()
{