INTEGRATION: CWS sb50 (1.12.36); FILE MERGED

2006/04/05 13:56:39 sb 1.12.36.1: #i63706# Implemented oor:op=fuse.
This commit is contained in:
Jens-Heiner Rechtien 2006-04-19 13:01:31 +00:00
parent c37d2ae886
commit 4803534409
2 changed files with 17 additions and 6 deletions

View file

@ -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<OUString const &>(OPERATION_CLEAR)); break;
case Operation::replace: addAttribute(ATTR_OPERATION, static_cast<OUString const &>(OPERATION_REPLACE)); break;
case Operation::fuse: addAttribute(ATTR_OPERATION, static_cast<OUString const &>(OPERATION_FUSE)); break;
case Operation::remove: addAttribute(ATTR_OPERATION, static_cast<OUString const &>(OPERATION_REMOVE)); break;
case Operation::unknown:

View file

@ -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");