update dev300-m58
[ooovba.git] / xmloff / source / chart / ColorPropertySet.hxx
blob6a869c2bafbe1e18d5803fc0c69061d973d869e0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ColorPropertySet.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
30 #ifndef XMLOFF_COLORPROPERTYSET_HXX
31 #define XMLOFF_COLORPROPERTYSET_HXX
33 #include <cppuhelper/implbase2.hxx>
35 #include <com/sun/star/beans/XPropertySet.hpp>
36 #include <com/sun/star/beans/XPropertyState.hpp>
38 namespace xmloff
40 namespace chart
43 class ColorPropertySet : public ::cppu::WeakImplHelper2<
44 ::com::sun::star::beans::XPropertySet,
45 ::com::sun::star::beans::XPropertyState >
47 public:
48 // if bFillColor == false, the color is a LineColor
49 explicit ColorPropertySet( sal_Int32 nColor, bool bFillColor = true );
50 virtual ~ColorPropertySet();
52 void setColor( sal_Int32 nColor );
53 sal_Int32 getColor();
55 protected:
56 // ____ XPropertySet ____
57 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
58 throw (::com::sun::star::uno::RuntimeException);
59 virtual void SAL_CALL setPropertyValue(
60 const ::rtl::OUString& aPropertyName,
61 const ::com::sun::star::uno::Any& aValue )
62 throw (::com::sun::star::beans::UnknownPropertyException,
63 ::com::sun::star::beans::PropertyVetoException,
64 ::com::sun::star::lang::IllegalArgumentException,
65 ::com::sun::star::lang::WrappedTargetException,
66 ::com::sun::star::uno::RuntimeException);
67 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
68 const ::rtl::OUString& PropertyName )
69 throw (::com::sun::star::beans::UnknownPropertyException,
70 ::com::sun::star::lang::WrappedTargetException,
71 ::com::sun::star::uno::RuntimeException);
72 virtual void SAL_CALL addPropertyChangeListener(
73 const ::rtl::OUString& aPropertyName,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
75 throw (::com::sun::star::beans::UnknownPropertyException,
76 ::com::sun::star::lang::WrappedTargetException,
77 ::com::sun::star::uno::RuntimeException);
78 virtual void SAL_CALL removePropertyChangeListener(
79 const ::rtl::OUString& aPropertyName,
80 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
81 throw (::com::sun::star::beans::UnknownPropertyException,
82 ::com::sun::star::lang::WrappedTargetException,
83 ::com::sun::star::uno::RuntimeException);
84 virtual void SAL_CALL addVetoableChangeListener(
85 const ::rtl::OUString& PropertyName,
86 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
87 throw (::com::sun::star::beans::UnknownPropertyException,
88 ::com::sun::star::lang::WrappedTargetException,
89 ::com::sun::star::uno::RuntimeException);
90 virtual void SAL_CALL removeVetoableChangeListener(
91 const ::rtl::OUString& PropertyName,
92 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
93 throw (::com::sun::star::beans::UnknownPropertyException,
94 ::com::sun::star::lang::WrappedTargetException,
95 ::com::sun::star::uno::RuntimeException);
97 // ____ XPropertyState ____
98 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
99 const ::rtl::OUString& PropertyName )
100 throw (::com::sun::star::beans::UnknownPropertyException,
101 ::com::sun::star::uno::RuntimeException);
102 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates(
103 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName )
104 throw (::com::sun::star::beans::UnknownPropertyException,
105 ::com::sun::star::uno::RuntimeException);
106 virtual void SAL_CALL setPropertyToDefault(
107 const ::rtl::OUString& PropertyName )
108 throw (::com::sun::star::beans::UnknownPropertyException,
109 ::com::sun::star::uno::RuntimeException);
110 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
111 const ::rtl::OUString& aPropertyName )
112 throw (::com::sun::star::beans::UnknownPropertyException,
113 ::com::sun::star::lang::WrappedTargetException,
114 ::com::sun::star::uno::RuntimeException);
116 private:
117 ::com::sun::star::uno::Reference<
118 ::com::sun::star::beans::XPropertySetInfo > m_xInfo;
119 ::rtl::OUString m_aColorPropName;
120 sal_Int32 m_nColor;
121 bool m_bIsFillColor;
122 sal_Int32 m_nDefaultColor;
125 } // namespace chart
126 } // namespace xmloff
128 // XMLOFF_COLORPROPERTYSET_HXX
129 #endif