Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / oox / source / export / ColorPropertySet.hxx
blob39bc41f22b6f6de9e8fdb3e39f1233218601d0c3
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/implbase.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::WeakImplHelper<
36 css::beans::XPropertySet,
37 css::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() override;
44 protected:
45 // ____ XPropertySet ____
46 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
47 virtual void SAL_CALL setPropertyValue(
48 const OUString& aPropertyName,
49 const css::uno::Any& aValue ) override;
50 virtual css::uno::Any SAL_CALL getPropertyValue(
51 const OUString& PropertyName ) override;
52 virtual void SAL_CALL addPropertyChangeListener(
53 const OUString& aPropertyName,
54 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
55 virtual void SAL_CALL removePropertyChangeListener(
56 const OUString& aPropertyName,
57 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
58 virtual void SAL_CALL addVetoableChangeListener(
59 const OUString& PropertyName,
60 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
61 virtual void SAL_CALL removeVetoableChangeListener(
62 const OUString& PropertyName,
63 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
65 // ____ XPropertyState ____
66 virtual css::beans::PropertyState SAL_CALL getPropertyState(
67 const OUString& PropertyName ) override;
68 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
69 const css::uno::Sequence< OUString >& aPropertyName ) override;
70 virtual void SAL_CALL setPropertyToDefault(
71 const OUString& PropertyName ) override;
72 virtual css::uno::Any SAL_CALL getPropertyDefault(
73 const OUString& aPropertyName ) override;
75 private:
76 css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
77 OUString m_aColorPropName;
78 sal_Int32 m_nColor;
79 bool m_bIsFillColor;
80 sal_Int32 m_nDefaultColor;
83 } // namespace chart
84 } // namespace xmloff
86 // XMLOFF_COLORPROPERTYSET_HXX
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */