summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorJörg Barfurth <jb@openoffice.org>2001-06-20 19:27:17 +0000
committerJörg Barfurth <jb@openoffice.org>2001-06-20 19:27:17 +0000
commit8333284441ca4f78be90f20d8da8d9f6c4dafcd6 (patch)
tree767438cb1d9ad5ef0f3a14c8d1c38183fc402141 /configmgr
parent8e1fd47d0091065fd8775f7056438e0a37dbe790 (diff)
#88036# Adjust to noderef changes
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/inc/configgroup.hxx19
-rw-r--r--configmgr/source/inc/configset.hxx46
2 files changed, 44 insertions, 21 deletions
diff --git a/configmgr/source/inc/configgroup.hxx b/configmgr/source/inc/configgroup.hxx
index a710f06e9d28..78ee181073fc 100644
--- a/configmgr/source/inc/configgroup.hxx
+++ b/configmgr/source/inc/configgroup.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configgroup.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jb $ $Date: 2000-11-10 17:32:36 $
+ * last change: $Author: jb $ $Date: 2001-06-20 20:27:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -95,17 +95,20 @@ namespace configmgr
public:
GroupUpdater(Tree const& aParentTree, NodeRef const& aGroupNode, UnoTypeConverter const& xConverter);
- NodeChange validateSetDefault(NodeRef const& aValueNode);
+ NodeChange validateSetDefault(AnyNodeRef const& aNode);
- NodeChange validateSetValue(NodeRef const& aValueNode, UnoAny const& newValue );
+ NodeChange validateSetDefault(ValueRef const& aValueNode);
- NodeChange validateSetDeepValue(Tree const& aNestedTree, NodeRef const& aNestedNode,
+ NodeChange validateSetValue(ValueRef const& aValueNode, UnoAny const& newValue );
+
+ NodeChange validateSetDeepValue(Tree const& aNestedTree, ValueRef const& aNestedValueNode,
RelativePath const& aRelPath,UnoAny const& newValue);
private:
- void implValidateTree(Tree const& aTree, NodeRef const& aNode) const;
- void implValidateNode(Tree const& aTree, NodeRef const& aNode) const;
- UnoAny implValidateValue(NodeRef const& aNode, UnoAny const& aValue) const;
+ void implValidateTree(Tree const& aTree) const;
+ void implValidateGroup(Tree const& aTree, NodeRef const& aNode) const;
+ void implValidateNode(Tree const& aTree, ValueRef const& aNode) const;
+ UnoAny implValidateValue(Tree const& aTree, ValueRef const& aNode, UnoAny const& aValue) const;
};
//-----------------------------------------------------------------------------
bool convertCompatibleValue(UnoTypeConverter const& xConverter, uno::Any& rConverted,
diff --git a/configmgr/source/inc/configset.hxx b/configmgr/source/inc/configset.hxx
index b886ac3208aa..b2f27a4bc6b8 100644
--- a/configmgr/source/inc/configset.hxx
+++ b/configmgr/source/inc/configset.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configset.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: jb $ $Date: 2001-04-19 15:15:30 $
+ * last change: $Author: jb $ $Date: 2001-06-20 20:27:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,8 +64,8 @@
#include "apitypes.hxx"
#include "configexcept.hxx"
-#include "noderef.hxx"
#include "template.hxx"
+#include "noderef.hxx"
#include <vos/ref.hxx>
#include <memory>
@@ -82,6 +82,8 @@ namespace configmgr
{
//-----------------------------------------------------------------------------
+ class ElementRef;
+ class ElementTree;
//---------------------------------------------------------------------
class Name;
class AbsolutePath;
@@ -92,8 +94,6 @@ namespace configmgr
typedef com::sun::star::uno::Reference<com::sun::star::script::XTypeConverter> UnoTypeConverter;
//---------------------------------------------------------------------
- class NodeRef;
- class Tree;
class ElementTreeImpl;
typedef vos::ORef<ElementTreeImpl> ElementTreeHolder;
@@ -101,6 +101,24 @@ namespace configmgr
class Template;
typedef vos::ORef<Template> TemplateHolder;
//-----------------------------------------------------------------------------
+ /// identifies a <type>Node</type> that is a element of a Container ("set").
+ class ElementRef
+ {
+ ElementTreeHolder m_aTreeHolder;
+ public:
+ explicit ElementRef(ElementTreeImpl* pTree);
+ ElementRef(ElementRef const& aOther);
+ ElementRef& operator=(ElementRef const& aOther);
+ ~ElementRef();
+
+ bool isValid() const;
+
+ Name getName() const;
+
+ ElementTree getElementTree() const;
+ };
+//-----------------------------------------------------------------------------
+
/// provides information about a <type>Node</type> that is a element of a Container ("set").
class ElementTree
{
@@ -184,12 +202,12 @@ namespace configmgr
NodeChange validateInsertElement (Name const& aName, ElementTree const& aNewElement);
- NodeChange validateReplaceElement(Tree const& aElementTree, NodeRef const& aElementNode, ElementTree const& aNewElement);
+ NodeChange validateReplaceElement(ElementRef const& aElement, ElementTree const& aNewElement);
- NodeChange validateRemoveElement (Tree const& aElementTree, NodeRef const& aElementNode);
+ NodeChange validateRemoveElement (ElementRef const& aElement);
private:
void implValidateSet();
- Name implValidateElement(Tree const& aTree, NodeRef const& aNode);
+ Name implValidateElement(ElementRef const& aElement);
void implValidateTree(ElementTree const& aElementTree);
};
//-----------------------------------------------------------------------------
@@ -206,17 +224,19 @@ namespace configmgr
NodeChange validateInsertElement (Name const& aName, UnoAny const& aNewValue);
- NodeChange validateReplaceElement(Tree const& aElementTree, NodeRef const& aElementNode, UnoAny const& aNewValue);
+ NodeChange validateReplaceElement(ElementRef const& aElement, UnoAny const& aNewValue);
- NodeChange validateRemoveElement (Tree const& aElementTree, NodeRef const& aElementNode);
+ NodeChange validateRemoveElement (ElementRef const& aElement);
private:
+ typedef Tree ElementNodeRef;
void implValidateSet();
- Name implValidateElement(Tree const& aTree, NodeRef const& aNode);
- UnoAny implValidateValue(NodeRef const& aElementNode, UnoAny const& aValue);
+ Name implValidateElement(ElementRef const& aElement);
+ UnoAny implValidateValue(ElementNodeRef const& aElementTree, UnoAny const& aValue);
UnoAny implValidateValue(UnoAny const& aValue);
- ElementTreeHolder makeValueElement(Name const& aName, NodeRef const& aElementNode, UnoAny const& aValue);
+ ElementTreeHolder makeValueElement(Name const& aName, ElementNodeRef const& aElementTree, UnoAny const& aValue);
ElementTreeHolder makeValueElement(Name const& aName, UnoAny const& aValue);
+ static ElementNodeRef extractElementNode(ElementRef const& aElement);
};
//-----------------------------------------------------------------------------
}