From 48035344098898a83a178b2855c269508d3f3e90 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 19 Apr 2006 13:01:31 +0000 Subject: [PATCH] INTEGRATION: CWS sb50 (1.12.36); FILE MERGED 2006/04/05 13:56:39 sb 1.12.36.1: #i63706# Implemented oor:op=fuse. --- configmgr/source/xml/elementformatter.cxx | 5 +++-- configmgr/source/xml/layerparser.cxx | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/configmgr/source/xml/elementformatter.cxx b/configmgr/source/xml/elementformatter.cxx index a1e23936f14d..f1db708245ff 100644 --- a/configmgr/source/xml/elementformatter.cxx +++ b/configmgr/source/xml/elementformatter.cxx @@ -4,9 +4,9 @@ * * $RCSfile: elementformatter.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2005-09-08 04:38:25 $ + * last change: $Author: hr $ $Date: 2006-04-19 14:00:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -206,6 +206,7 @@ void ElementFormatter::addOperation(Operation::Enum _eOp) case Operation::clear: OSL_ENSURE(false,"'clear' operation is not yet supported"); break ; //addAttribute(ATTR_OPERATION, static_cast(OPERATION_CLEAR)); break; case Operation::replace: addAttribute(ATTR_OPERATION, static_cast(OPERATION_REPLACE)); break; + case Operation::fuse: addAttribute(ATTR_OPERATION, static_cast(OPERATION_FUSE)); break; case Operation::remove: addAttribute(ATTR_OPERATION, static_cast(OPERATION_REMOVE)); break; case Operation::unknown: diff --git a/configmgr/source/xml/layerparser.cxx b/configmgr/source/xml/layerparser.cxx index e137319da96f..c38fc8202ce6 100644 --- a/configmgr/source/xml/layerparser.cxx +++ b/configmgr/source/xml/layerparser.cxx @@ -4,9 +4,9 @@ * * $RCSfile: layerparser.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2005-09-08 04:39:40 $ + * last change: $Author: hr $ $Date: 2006-04-19 14:01:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,6 +33,7 @@ * ************************************************************************/ +#include "com/sun/star/configuration/backend/NodeAttribute.hpp" #include "layerparser.hxx" // ----------------------------------------------------------------------------- @@ -203,12 +204,18 @@ void LayerParser::startNode( ElementInfo const & aInfo, const uno::Reference< sa break; case Operation::replace: + case Operation::fuse: { backenduno::TemplateIdentifier aTemplate; + sal_Int16 flags = aInfo.flags; + if (aInfo.op == Operation::fuse) { + flags |= + com::sun::star::configuration::backend::NodeAttribute::FUSE; + } if (getDataParser().getInstanceType(xAttribs,aTemplate.Name,aTemplate.Component)) - m_xHandler->addOrReplaceNodeFromTemplate(aInfo.name,aTemplate,aInfo.flags); + m_xHandler->addOrReplaceNodeFromTemplate(aInfo.name,aTemplate,flags); else - m_xHandler->addOrReplaceNode(aInfo.name,aInfo.flags); + m_xHandler->addOrReplaceNode(aInfo.name,flags); } break; @@ -259,6 +266,9 @@ void LayerParser::startProperty( ElementInfo const & aInfo, const uno::Reference m_bNewProp = true; break; + case Operation::fuse: + this->raiseParseException("Layer parser: Invalid Data: operation 'fuse' is not permitted for properties"); + case Operation::remove: this->raiseParseException("Layer parser: Invalid Data: operation 'remove' is not permitted for properties");