1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef XMLOFF_COLORPROPERTYSET_HXX
21 #define XMLOFF_COLORPROPERTYSET_HXX
23 #include <cppuhelper/implbase2.hxx>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/beans/XPropertyState.hpp>
33 class ColorPropertySet
: public ::cppu::WeakImplHelper2
<
34 ::com::sun::star::beans::XPropertySet
,
35 ::com::sun::star::beans::XPropertyState
>
38 // if bFillColor == false, the color is a LineColor
39 explicit ColorPropertySet( sal_Int32 nColor
, bool bFillColor
= true );
40 virtual ~ColorPropertySet();
43 // ____ XPropertySet ____
44 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo()
45 throw (::com::sun::star::uno::RuntimeException
);
46 virtual void SAL_CALL
setPropertyValue(
47 const OUString
& aPropertyName
,
48 const ::com::sun::star::uno::Any
& aValue
)
49 throw (::com::sun::star::beans::UnknownPropertyException
,
50 ::com::sun::star::beans::PropertyVetoException
,
51 ::com::sun::star::lang::IllegalArgumentException
,
52 ::com::sun::star::lang::WrappedTargetException
,
53 ::com::sun::star::uno::RuntimeException
);
54 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
55 const OUString
& PropertyName
)
56 throw (::com::sun::star::beans::UnknownPropertyException
,
57 ::com::sun::star::lang::WrappedTargetException
,
58 ::com::sun::star::uno::RuntimeException
);
59 virtual void SAL_CALL
addPropertyChangeListener(
60 const OUString
& aPropertyName
,
61 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
62 throw (::com::sun::star::beans::UnknownPropertyException
,
63 ::com::sun::star::lang::WrappedTargetException
,
64 ::com::sun::star::uno::RuntimeException
);
65 virtual void SAL_CALL
removePropertyChangeListener(
66 const OUString
& aPropertyName
,
67 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
68 throw (::com::sun::star::beans::UnknownPropertyException
,
69 ::com::sun::star::lang::WrappedTargetException
,
70 ::com::sun::star::uno::RuntimeException
);
71 virtual void SAL_CALL
addVetoableChangeListener(
72 const OUString
& PropertyName
,
73 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
74 throw (::com::sun::star::beans::UnknownPropertyException
,
75 ::com::sun::star::lang::WrappedTargetException
,
76 ::com::sun::star::uno::RuntimeException
);
77 virtual void SAL_CALL
removeVetoableChangeListener(
78 const OUString
& PropertyName
,
79 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
80 throw (::com::sun::star::beans::UnknownPropertyException
,
81 ::com::sun::star::lang::WrappedTargetException
,
82 ::com::sun::star::uno::RuntimeException
);
84 // ____ XPropertyState ____
85 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState(
86 const OUString
& PropertyName
)
87 throw (::com::sun::star::beans::UnknownPropertyException
,
88 ::com::sun::star::uno::RuntimeException
);
89 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates(
90 const ::com::sun::star::uno::Sequence
< OUString
>& aPropertyName
)
91 throw (::com::sun::star::beans::UnknownPropertyException
,
92 ::com::sun::star::uno::RuntimeException
);
93 virtual void SAL_CALL
setPropertyToDefault(
94 const OUString
& PropertyName
)
95 throw (::com::sun::star::beans::UnknownPropertyException
,
96 ::com::sun::star::uno::RuntimeException
);
97 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault(
98 const OUString
& aPropertyName
)
99 throw (::com::sun::star::beans::UnknownPropertyException
,
100 ::com::sun::star::lang::WrappedTargetException
,
101 ::com::sun::star::uno::RuntimeException
);
104 ::com::sun::star::uno::Reference
<
105 ::com::sun::star::beans::XPropertySetInfo
> m_xInfo
;
106 OUString m_aColorPropName
;
109 sal_Int32 m_nDefaultColor
;
113 } // namespace xmloff
115 // XMLOFF_COLORPROPERTYSET_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */