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: layerdefaultremover.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_XML_LAYERDECORATOR_HXX
32 #define CONFIGMGR_XML_LAYERDECORATOR_HXX
34 #include <cppuhelper/implbase1.hxx>
36 #ifndef INCLUDED_VECTOR
38 #define INCLUDED_VECTOR
41 #include <com/sun/star/configuration/backend/XLayerHandler.hpp>
43 // -----------------------------------------------------------------------------
46 // -----------------------------------------------------------------------------
49 // -----------------------------------------------------------------------------
50 namespace uno
= ::com::sun::star::uno
;
51 namespace lang
= ::com::sun::star::lang
;
52 namespace backenduno
= ::com::sun::star::configuration::backend
;
53 // -----------------------------------------------------------------------------
55 class LayerDefaultRemover
: public cppu::WeakImplHelper1
<backenduno::XLayerHandler
>
59 LayerDefaultRemover(uno::Reference
< backenduno::XLayerHandler
> const & _xResultHandler
);
60 virtual ~LayerDefaultRemover();
66 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
70 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
73 overrideNode( const rtl::OUString
& aName
, sal_Int16 aAttributes
, sal_Bool bClear
)
74 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
77 addOrReplaceNode( const rtl::OUString
& aName
, sal_Int16 aAttributes
)
78 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
81 addOrReplaceNodeFromTemplate( const rtl::OUString
& aName
, const backenduno::TemplateIdentifier
& aTemplate
, sal_Int16 aAttributes
)
82 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
86 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
89 dropNode( const rtl::OUString
& aName
)
90 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
93 overrideProperty( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Type
& aType
, sal_Bool bClear
)
94 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
97 addProperty( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Type
& aType
)
98 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
100 virtual void SAL_CALL
101 addPropertyWithValue( const rtl::OUString
& aName
, sal_Int16 aAttributes
, const uno::Any
& aValue
)
102 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
104 virtual void SAL_CALL
106 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
108 virtual void SAL_CALL
109 setPropertyValue( const uno::Any
& aValue
)
110 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
112 virtual void SAL_CALL
113 setPropertyValueForLocale( const uno::Any
& aValue
, const rtl::OUString
& aLocale
)
114 throw (backenduno::MalformedDataException
, lang::WrappedTargetException
, uno::RuntimeException
);
117 void playBackNodeStack( bool bPlayProperty
=false);
118 void raiseMalformedDataException(sal_Char
const * pMsg
);
119 inline bool hasPendingProperty();
120 inline void clearPendingProperty();
122 uno::Reference
< backenduno::XLayerHandler
> m_xResultHandler
;
123 std::vector
<rtl::OUString
> m_aNodeStack
;
124 struct PropertyStruct
130 // -----------------------------------------------------------------------------
132 // -----------------------------------------------------------------------------
134 } // namespace configmgr