Branch libreoffice-5-0-4
[LibreOffice.git] / oox / source / export / ColorPropertySet.hxx
blob0463163133d9521322b8bf8e3216535011418385
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 // FIXME? this file is identical to xmloff/source/chart/ColorPropertySet.hxx
25 #include <cppuhelper/implbase2.hxx>
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/beans/XPropertyState.hpp>
30 namespace oox
32 namespace drawingml
35 class ColorPropertySet : public ::cppu::WeakImplHelper2<
36 ::com::sun::star::beans::XPropertySet,
37 ::com::sun::star::beans::XPropertyState >
39 public:
40 // if bFillColor == false, the color is a LineColor
41 explicit ColorPropertySet( sal_Int32 nColor, bool bFillColor = true );
42 virtual ~ColorPropertySet();
44 protected:
45 // ____ XPropertySet ____
46 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
47 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
48 virtual void SAL_CALL setPropertyValue(
49 const OUString& aPropertyName,
50 const ::com::sun::star::uno::Any& aValue )
51 throw (::com::sun::star::beans::UnknownPropertyException,
52 ::com::sun::star::beans::PropertyVetoException,
53 ::com::sun::star::lang::IllegalArgumentException,
54 ::com::sun::star::lang::WrappedTargetException,
55 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
56 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
57 const OUString& PropertyName )
58 throw (::com::sun::star::beans::UnknownPropertyException,
59 ::com::sun::star::lang::WrappedTargetException,
60 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 virtual void SAL_CALL addPropertyChangeListener(
62 const OUString& aPropertyName,
63 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
64 throw (::com::sun::star::beans::UnknownPropertyException,
65 ::com::sun::star::lang::WrappedTargetException,
66 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 virtual void SAL_CALL removePropertyChangeListener(
68 const OUString& aPropertyName,
69 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
70 throw (::com::sun::star::beans::UnknownPropertyException,
71 ::com::sun::star::lang::WrappedTargetException,
72 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 virtual void SAL_CALL addVetoableChangeListener(
74 const OUString& PropertyName,
75 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
76 throw (::com::sun::star::beans::UnknownPropertyException,
77 ::com::sun::star::lang::WrappedTargetException,
78 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 virtual void SAL_CALL removeVetoableChangeListener(
80 const OUString& PropertyName,
81 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
82 throw (::com::sun::star::beans::UnknownPropertyException,
83 ::com::sun::star::lang::WrappedTargetException,
84 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 // ____ XPropertyState ____
87 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
88 const OUString& PropertyName )
89 throw (::com::sun::star::beans::UnknownPropertyException,
90 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates(
92 const ::com::sun::star::uno::Sequence< OUString >& aPropertyName )
93 throw (::com::sun::star::beans::UnknownPropertyException,
94 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
95 virtual void SAL_CALL setPropertyToDefault(
96 const OUString& PropertyName )
97 throw (::com::sun::star::beans::UnknownPropertyException,
98 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
100 const OUString& aPropertyName )
101 throw (::com::sun::star::beans::UnknownPropertyException,
102 ::com::sun::star::lang::WrappedTargetException,
103 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
105 private:
106 ::com::sun::star::uno::Reference<
107 ::com::sun::star::beans::XPropertySetInfo > m_xInfo;
108 OUString m_aColorPropName;
109 sal_Int32 m_nColor;
110 bool m_bIsFillColor;
111 sal_Int32 m_nDefaultColor;
114 } // namespace chart
115 } // namespace xmloff
117 // XMLOFF_COLORPROPERTYSET_HXX
118 #endif
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */