1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: layerupdatemerger.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CONFIGMGR_BACKEND_LAYERUPDATEMERGER_HXX
32 #define CONFIGMGR_BACKEND_LAYERUPDATEMERGER_HXX
34 #include "basicupdatemerger.hxx"
35 #include "layerupdate.hxx"
36 #include <rtl/ref.hxx>
37 // -----------------------------------------------------------------------------
41 // -----------------------------------------------------------------------------
44 // -----------------------------------------------------------------------------
48 class LayerUpdateMerger
: protected BasicUpdateMerger
51 static uno::Reference
< backenduno::XLayer
> getMergedLayer(uno::Reference
< backenduno::XLayer
> const & _xSourceLayer
, LayerUpdate
const & _aLayerUpdate
)
52 { return new LayerUpdateMerger(_xSourceLayer
, _aLayerUpdate
); }
56 LayerUpdateMerger( uno::Reference
< backenduno::XLayer
> const & _xSourceLayer
, LayerUpdate
const & _aLayerUpdate
);
61 // XLayerHandler overrides
65 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
69 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
72 overrideNode( const rtl::OUString
& aName
, sal_Int16 aAttributes
, sal_Bool bClear
)
73 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
76 addOrReplaceNode( const rtl::OUString
& aName
, sal_Int16 aAttributes
)
77 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
80 addOrReplaceNodeFromTemplate( const rtl::OUString
& aName
, const backenduno::TemplateIdentifier
& aTemplate
, sal_Int16 aAttributes
)
81 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
85 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
88 dropNode( const rtl::OUString
& aName
)
89 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
92 overrideProperty( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Type
& aType
, sal_Bool bClear
)
93 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
97 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
100 setPropertyValue( const uno::Any
& aValue
)
101 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
103 virtual void SAL_CALL
104 setPropertyValueForLocale( const uno::Any
& aValue
, const rtl::OUString
& aLocale
)
105 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
107 virtual void SAL_CALL
108 addProperty( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Type
& aType
)
109 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
111 virtual void SAL_CALL
112 addPropertyWithValue( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Any
& aValue
)
113 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
116 virtual void flushUpdate();
118 void malformedUpdate(sal_Char
const * pMsg
);
120 LayerUpdate m_aLayerUpdate
;
121 rtl::Reference
<NodeUpdate
> m_xCurrentNode
;
122 rtl::Reference
<PropertyUpdate
> m_xCurrentProp
;
124 // -----------------------------------------------------------------------------
126 // -----------------------------------------------------------------------------
128 } // namespace configmgr