summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/access.cxx2
-rw-r--r--configmgr/source/components.cxx10
-rw-r--r--configmgr/source/groupnode.cxx12
-rw-r--r--configmgr/source/groupnode.hxx4
-rw-r--r--configmgr/source/localizedpropertynode.cxx2
-rw-r--r--configmgr/source/localizedpropertynode.hxx2
-rw-r--r--configmgr/source/localizedvaluenode.cxx2
-rw-r--r--configmgr/source/localizedvaluenode.hxx2
-rw-r--r--configmgr/source/makefile.mk4
-rw-r--r--configmgr/source/node.hxx2
-rw-r--r--configmgr/source/nodemap.cxx2
-rw-r--r--configmgr/source/propertynode.cxx2
-rw-r--r--configmgr/source/propertynode.hxx2
-rw-r--r--configmgr/source/services.cxx17
-rw-r--r--configmgr/source/setnode.cxx11
-rw-r--r--configmgr/source/setnode.hxx4
-rw-r--r--configmgr/source/update.cxx143
-rw-r--r--configmgr/source/update.hxx59
-rw-r--r--configmgr/source/xcsparser.cxx26
-rw-r--r--configmgr/source/xcuparser.cxx4
20 files changed, 258 insertions, 54 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 7af9c1f8d9c0..60f6a4a54e46 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1917,7 +1917,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance()
tmplName),
static_cast< cppu::OWeakObject * >(this));
}
- rtl::Reference< Node > node(tmpl->clone());
+ rtl::Reference< Node > node(tmpl->clone(true));
node->setLayer(Data::NO_LAYER);
return static_cast< cppu::OWeakObject * >(
new ChildAccess(components_, getRootAccess(), node));
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 6d97971e1a2c..48f90fa8382e 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -494,12 +494,10 @@ void Components::parseFileList(
try {
(*parseFile)(url, layer, data_, 0, 0);
} catch (css::container::NoSuchElementException & e) {
- throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "stat'ed file does not exist: ")) +
- e.Message),
- css::uno::Reference< css::uno::XInterface >());
+ OSL_TRACE(
+ "configmgr file does not exist: %s",
+ rtl::OUStringToOString(
+ e.Message, RTL_TEXTENCODING_UTF8).getStr());
}
}
if (i == -1) {
diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx
index 60d825451d69..59c0f89df5d1 100644
--- a/configmgr/source/groupnode.cxx
+++ b/configmgr/source/groupnode.cxx
@@ -44,8 +44,8 @@ GroupNode::GroupNode(
mandatory_(Data::NO_LAYER)
{}
-rtl::Reference< Node > GroupNode::clone() const {
- return new GroupNode(*this);
+rtl::Reference< Node > GroupNode::clone(bool keepTemplateName) const {
+ return new GroupNode(*this, keepTemplateName);
}
NodeMap & GroupNode::getMembers() {
@@ -68,11 +68,13 @@ bool GroupNode::isExtensible() const {
return extensible_;
}
-GroupNode::GroupNode(GroupNode const & other):
- Node(other), extensible_(other.extensible_),
- templateName_(other.templateName_), mandatory_(other.mandatory_)
+GroupNode::GroupNode(GroupNode const & other, bool keepTemplateName):
+ Node(other), extensible_(other.extensible_), mandatory_(other.mandatory_)
{
cloneNodeMap(other.members_, &members_);
+ if (keepTemplateName) {
+ templateName_ = other.templateName_;
+ }
}
GroupNode::~GroupNode() {}
diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx
index be4907b86ce3..9d7bbbafa5b3 100644
--- a/configmgr/source/groupnode.hxx
+++ b/configmgr/source/groupnode.hxx
@@ -42,7 +42,7 @@ class GroupNode: public Node {
public:
GroupNode(int layer, bool extensible, rtl::OUString const & templateName);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
@@ -55,7 +55,7 @@ public:
bool isExtensible() const;
private:
- GroupNode(GroupNode const & other);
+ GroupNode(GroupNode const & other, bool keepTemplateName);
virtual ~GroupNode();
diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx
index 9c5fa3328a58..54560d7aded4 100644
--- a/configmgr/source/localizedpropertynode.cxx
+++ b/configmgr/source/localizedpropertynode.cxx
@@ -51,7 +51,7 @@ LocalizedPropertyNode::LocalizedPropertyNode(
Node(layer), staticType_(staticType), nillable_(nillable)
{}
-rtl::Reference< Node > LocalizedPropertyNode::clone() const {
+rtl::Reference< Node > LocalizedPropertyNode::clone(bool) const {
return new LocalizedPropertyNode(*this);
}
diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx
index d5a16af0e54d..4ebcf8e243da 100644
--- a/configmgr/source/localizedpropertynode.hxx
+++ b/configmgr/source/localizedpropertynode.hxx
@@ -47,7 +47,7 @@ class LocalizedPropertyNode: public Node {
public:
LocalizedPropertyNode(int layer, Type staticType, bool nillable);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx
index f6246106c8fe..c0e3bc333187 100644
--- a/configmgr/source/localizedvaluenode.cxx
+++ b/configmgr/source/localizedvaluenode.cxx
@@ -48,7 +48,7 @@ LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value):
Node(layer), value_(value)
{}
-rtl::Reference< Node > LocalizedValueNode::clone() const {
+rtl::Reference< Node > LocalizedValueNode::clone(bool) const {
return new LocalizedValueNode(*this);
}
diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx
index 7f8a5dd987ce..bfcbdea1de51 100644
--- a/configmgr/source/localizedvaluenode.hxx
+++ b/configmgr/source/localizedvaluenode.hxx
@@ -43,7 +43,7 @@ class LocalizedValueNode: public Node {
public:
LocalizedValueNode(int layer, com::sun::star::uno::Any const & value);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual rtl::OUString getTemplateName() const;
diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk
index 317e08bdf49c..777fed3323d8 100644
--- a/configmgr/source/makefile.mk
+++ b/configmgr/source/makefile.mk
@@ -34,7 +34,7 @@ VISIBILITY_HIDDEN = TRUE
.INCLUDE: settings.mk
-CDEFS += -DOOO_DLLIMPLEMENTATION_CONFIGMGR
+DLLPRE =
SLOFILES = \
$(SLO)/access.obj \
@@ -77,7 +77,7 @@ SHL1STDLIBS = \
$(CPPULIB) \
$(SALHELPERLIB) \
$(SALLIB)
-SHL1TARGET = configmgr
+SHL1TARGET = configmgr.uno
SHL1USE_EXPORTS = name
DEF1NAME = $(SHL1TARGET)
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index 10f168520595..7c9417e68ea9 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -46,7 +46,7 @@ public:
virtual Kind kind() const = 0;
- virtual rtl::Reference< Node > clone() const = 0;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0;
virtual NodeMap & getMembers();
diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx
index 6b22863b5672..8e4d06030bdf 100644
--- a/configmgr/source/nodemap.cxx
+++ b/configmgr/source/nodemap.cxx
@@ -42,7 +42,7 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) {
OSL_ASSERT(target != 0 && target->empty());
NodeMap clone(source);
for (NodeMap::iterator i(clone.begin()); i != clone.end(); ++i) {
- i->second = i->second->clone();
+ i->second = i->second->clone(true);
}
std::swap(clone, *target);
}
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index 070b56d9be9a..f3e459998e7e 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -55,7 +55,7 @@ PropertyNode::PropertyNode(
extension_(extension)
{}
-rtl::Reference< Node > PropertyNode::clone() const {
+rtl::Reference< Node > PropertyNode::clone(bool) const {
return new PropertyNode(*this);
}
diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx
index 1566cbf72dbe..506526ffcc1e 100644
--- a/configmgr/source/propertynode.hxx
+++ b/configmgr/source/propertynode.hxx
@@ -48,7 +48,7 @@ public:
int layer, Type staticType, bool nillable,
com::sun::star::uno::Any const & value, bool extension);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
Type getStaticType() const;
diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx
index 3a009b3cee15..f8c3289664ef 100644
--- a/configmgr/source/services.cxx
+++ b/configmgr/source/services.cxx
@@ -44,6 +44,7 @@
#include "configurationprovider.hxx"
#include "configurationregistry.hxx"
#include "defaultprovider.hxx"
+#include "update.hxx"
namespace {
@@ -67,6 +68,9 @@ static cppu::ImplementationEntry const services[] = {
{ &dummy, &configmgr::configuration_registry::getImplementationName,
&configmgr::configuration_registry::getSupportedServiceNames,
&configmgr::configuration_registry::createFactory, 0, 0 },
+ { &dummy, &configmgr::update::getImplementationName,
+ &configmgr::update::getSupportedServiceNames,
+ &configmgr::update::createFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
@@ -107,6 +111,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.DefaultProvider")));
+ css::uno::Reference< css::registry::XRegistryKey >(
+ (css::uno::Reference< css::registry::XRegistryKey >(
+ static_cast< css::registry::XRegistryKey * >(pRegistryKey))->
+ createKey(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "/com.sun.star.comp.configuration.Update/UNO/"
+ "SINGLETONS/com.sun.star.configuration.Update")))),
+ css::uno::UNO_SET_THROW)->
+ setStringValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.Update_Service")));
} catch (css::uno::Exception & e) {
(void) e;
OSL_TRACE(
diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx
index f19c36c0bba5..465345a5f856 100644
--- a/configmgr/source/setnode.cxx
+++ b/configmgr/source/setnode.cxx
@@ -69,8 +69,8 @@ SetNode::SetNode(
templateName_(templateName), mandatory_(Data::NO_LAYER)
{}
-rtl::Reference< Node > SetNode::clone() const {
- return new SetNode(*this);
+rtl::Reference< Node > SetNode::clone(bool keepTemplateName) const {
+ return new SetNode(*this, keepTemplateName);
}
NodeMap & SetNode::getMembers() {
@@ -105,12 +105,15 @@ bool SetNode::isValidTemplate(rtl::OUString const & templateName) const {
additionalTemplateNames_.end());
}
-SetNode::SetNode(SetNode const & other):
+SetNode::SetNode(SetNode const & other, bool keepTemplateName):
Node(other), defaultTemplateName_(other.defaultTemplateName_),
additionalTemplateNames_(other.additionalTemplateNames_),
- templateName_(other.templateName_), mandatory_(other.mandatory_)
+ mandatory_(other.mandatory_)
{
cloneNodeMap(other.members_, &members_);
+ if (keepTemplateName) {
+ templateName_ = other.templateName_;
+ }
}
SetNode::~SetNode() {}
diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx
index 7bf1ab0a199e..94ce537adda1 100644
--- a/configmgr/source/setnode.hxx
+++ b/configmgr/source/setnode.hxx
@@ -46,7 +46,7 @@ public:
int layer, rtl::OUString const & defaultTemplateName,
rtl::OUString const & templateName);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
@@ -63,7 +63,7 @@ public:
bool isValidTemplate(rtl::OUString const & templateName) const;
private:
- SetNode(SetNode const & other);
+ SetNode(SetNode const & other, bool keepTemplateName);
virtual ~SetNode();
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 57f45068d954..4c1d59d5d054 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -30,27 +30,84 @@
#include <set>
-#include "configmgr/update.hxx"
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/configuration/XUpdate.hpp"
+#include "com/sun/star/lang/XSingleComponentFactory.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
+#include "rtl/unload.h"
+#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
+#include "sal/types.h"
#include "broadcaster.hxx"
#include "components.hxx"
#include "lock.hxx"
#include "modifications.hxx"
#include "rootaccess.hxx"
+#include "update.hxx"
-namespace configmgr {
+namespace configmgr { namespace update {
-namespace update {
+namespace {
-void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri) {
+namespace css = com::sun::star;
+
+std::set< rtl::OUString > seqToSet(
+ css::uno::Sequence< rtl::OUString > const & sequence)
+{
+ return std::set< rtl::OUString >(
+ sequence.getConstArray(),
+ sequence.getConstArray() + sequence.getLength());
+}
+
+class Service:
+ public cppu::WeakImplHelper1< css::configuration::XUpdate >,
+ private boost::noncopyable
+{
+public:
+ Service() {}
+
+private:
+ virtual ~Service() {}
+
+ virtual void SAL_CALL insertExtensionXcsFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL insertExtensionXcuFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL insertModificationXcuFile(
+ rtl::OUString const & fileUri,
+ css::uno::Sequence< rtl::OUString > const & includedPaths,
+ css::uno::Sequence< rtl::OUString > const & excludedPaths)
+ throw (css::uno::RuntimeException);
+};
+
+void Service::insertExtensionXcsFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException)
+{
osl::MutexGuard g(lock);
Components::getSingleton().insertExtensionXcsFile(shared, fileUri);
}
-void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) {
+void Service::insertExtensionXcuFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException)
+{
Broadcaster bc;
{
osl::MutexGuard g(lock);
@@ -63,23 +120,91 @@ void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) {
bc.send();
}
-void insertModificationXcuFile(
+void Service::insertModificationXcuFile(
rtl::OUString const & fileUri,
- std::set< rtl::OUString > const & includedPaths,
- std::set< rtl::OUString > const & excludedPaths)
+ css::uno::Sequence< rtl::OUString > const & includedPaths,
+ css::uno::Sequence< rtl::OUString > const & excludedPaths)
+ throw (css::uno::RuntimeException)
{
Broadcaster bc;
{
osl::MutexGuard g(lock);
Modifications mods;
Components::getSingleton().insertModificationXcuFile(
- fileUri, includedPaths, excludedPaths, &mods);
+ fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods);
Components::getSingleton().initGlobalBroadcaster(
mods, rtl::Reference< RootAccess >(), &bc);
}
bc.send();
}
+class Factory:
+ public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
+ private boost::noncopyable
+{
+public:
+ Factory() {}
+
+private:
+ virtual ~Factory() {}
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
+ createInstanceWithContext(
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
+ createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any > const & Arguments,
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException);
+};
+
+css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException)
+{
+ return createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any >(), Context);
+}
+
+css::uno::Reference< css::uno::XInterface >
+Factory::createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any > const & Arguments,
+ css::uno::Reference< css::uno::XComponentContext > const &)
+ throw (css::uno::Exception, css::uno::RuntimeException)
+{
+ if (Arguments.getLength() != 0) {
+ throw css::uno::Exception(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.Update must be"
+ " instantiated without arguments")),
+ static_cast< cppu::OWeakObject * >(this));
+ }
+ return static_cast< cppu::OWeakObject * >(new Service);
}
}
+
+rtl::OUString getImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update"));
+}
+
+css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.Update_Service"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
+
+css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
+ cppu::ComponentFactoryFunc, rtl::OUString const &,
+ css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
+ SAL_THROW(())
+{
+ return new Factory;
+}
+
+} }
diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx
new file mode 100644
index 000000000000..faa5c86b15fa
--- /dev/null
+++ b/configmgr/source/update.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX
+#define INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "cppuhelper/factory.hxx"
+#include "rtl/unload.h"
+#include "sal/types.h"
+
+namespace com { namespace sun { namespace star { namespace lang {
+ class XSingleComponentFactory;
+} } } }
+namespace rtl { class OUString; }
+
+namespace configmgr { namespace update {
+
+rtl::OUString SAL_CALL getImplementationName();
+
+com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+getSupportedServiceNames();
+
+com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
+SAL_CALL createFactory(
+ cppu::ComponentFactoryFunc, rtl::OUString const &,
+ com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
+ SAL_THROW(());
+
+} }
+
+#endif
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 12e64ebbe171..79e122759fc8 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -78,19 +78,19 @@ void merge(
case Node::KIND_LOCALIZED_VALUE:
break; //TODO: merge certain parts?
case Node::KIND_GROUP:
- if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) {
- for (NodeMap::iterator i2(update->getMembers().begin());
- i2 != update->getMembers().end(); ++i2)
- {
- NodeMap::iterator i1(
- original->getMembers().find(i2->first));
- if (i1 == original->getMembers().end()) {
- if (i2->second->kind() == Node::KIND_PROPERTY) {
- original->getMembers().insert(*i2);
- }
- } else if (i2->second->kind() == i1->second->kind()) {
- merge(i1->second, i2->second);
+ for (NodeMap::iterator i2(update->getMembers().begin());
+ i2 != update->getMembers().end(); ++i2)
+ {
+ NodeMap::iterator i1(original->getMembers().find(i2->first));
+ if (i1 == original->getMembers().end()) {
+ if (i2->second->kind() == Node::KIND_PROPERTY &&
+ dynamic_cast< GroupNode * >(
+ original.get())->isExtensible())
+ {
+ original->getMembers().insert(*i2);
}
+ } else if (i2->second->kind() == i1->second->kind()) {
+ merge(i1->second, i2->second);
}
}
break;
@@ -456,7 +456,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) {
reader.getUrl()),
css::uno::Reference< css::uno::XInterface >());
}
- rtl::Reference< Node > node(tmpl->clone());
+ rtl::Reference< Node > node(tmpl->clone(false));
node->setLayer(valueParser_.getLayer());
elements_.push(Element(node, name));
}
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 77b0f747f313..f9f439c98916 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -1056,7 +1056,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) {
state_.push(State(true)); // ignored
} else {
- rtl::Reference< Node > member(tmpl->clone());
+ rtl::Reference< Node > member(tmpl->clone(true));
member->setLayer(valueParser_.getLayer());
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
@@ -1070,7 +1070,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
{
state_.push(State(true)); // ignored
} else {
- rtl::Reference< Node > member(tmpl->clone());
+ rtl::Reference< Node > member(tmpl->clone(true));
member->setLayer(valueParser_.getLayer());
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);