Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / oox / source / export / ColorPropertySet.hxx
blob1ac05f5cf8239cb168fe72aa770d59a0f6fcda90
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>
26 #include <tools/color.hxx>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/beans/XPropertyState.hpp>
31 namespace oox
33 namespace drawingml
36 class ColorPropertySet : public ::cppu::WeakImplHelper<
37 css::beans::XPropertySet,
38 css::beans::XPropertyState >
40 public:
41 // if bFillColor == false, the color is a LineColor
42 explicit ColorPropertySet( ::Color nColor, bool bFillColor = true );
43 virtual ~ColorPropertySet() override;
45 protected:
46 // ____ XPropertySet ____
47 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
48 virtual void SAL_CALL setPropertyValue(
49 const OUString& aPropertyName,
50 const css::uno::Any& aValue ) override;
51 virtual css::uno::Any SAL_CALL getPropertyValue(
52 const OUString& PropertyName ) override;
53 virtual void SAL_CALL addPropertyChangeListener(
54 const OUString& aPropertyName,
55 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
56 virtual void SAL_CALL removePropertyChangeListener(
57 const OUString& aPropertyName,
58 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
59 virtual void SAL_CALL addVetoableChangeListener(
60 const OUString& PropertyName,
61 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
62 virtual void SAL_CALL removeVetoableChangeListener(
63 const OUString& PropertyName,
64 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
66 // ____ XPropertyState ____
67 virtual css::beans::PropertyState SAL_CALL getPropertyState(
68 const OUString& PropertyName ) override;
69 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
70 const css::uno::Sequence< OUString >& aPropertyName ) override;
71 virtual void SAL_CALL setPropertyToDefault(
72 const OUString& PropertyName ) override;
73 virtual css::uno::Any SAL_CALL getPropertyDefault(
74 const OUString& aPropertyName ) override;
76 private:
77 css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
78 OUString const m_aColorPropName;
79 ::Color m_nColor;
80 bool const m_bIsFillColor;
81 ::Color const m_nDefaultColor;
84 } // namespace chart
85 } // namespace xmloff
87 // XMLOFF_COLORPROPERTYSET_HXX
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */