Bump version to 24.04.3.4
[LibreOffice.git] / oox / source / export / ColorPropertySet.hxx
blob70213a731be038c8d93cd89ca9370cee89ca0d62
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::drawingml
34 class ColorPropertySet : public ::cppu::WeakImplHelper<
35 css::beans::XPropertySet,
36 css::beans::XPropertyState >
38 public:
39 // if bFillColor == false, the color is a LineColor
40 explicit ColorPropertySet( ::Color nColor, bool bFillColor = true );
41 virtual ~ColorPropertySet() override;
43 protected:
44 // ____ XPropertySet ____
45 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
46 virtual void SAL_CALL setPropertyValue(
47 const OUString& aPropertyName,
48 const css::uno::Any& aValue ) override;
49 virtual css::uno::Any SAL_CALL getPropertyValue(
50 const OUString& PropertyName ) override;
51 virtual void SAL_CALL addPropertyChangeListener(
52 const OUString& aPropertyName,
53 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
54 virtual void SAL_CALL removePropertyChangeListener(
55 const OUString& aPropertyName,
56 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
57 virtual void SAL_CALL addVetoableChangeListener(
58 const OUString& PropertyName,
59 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
60 virtual void SAL_CALL removeVetoableChangeListener(
61 const OUString& PropertyName,
62 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
64 // ____ XPropertyState ____
65 virtual css::beans::PropertyState SAL_CALL getPropertyState(
66 const OUString& PropertyName ) override;
67 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
68 const css::uno::Sequence< OUString >& aPropertyName ) override;
69 virtual void SAL_CALL setPropertyToDefault(
70 const OUString& PropertyName ) override;
71 virtual css::uno::Any SAL_CALL getPropertyDefault(
72 const OUString& aPropertyName ) override;
74 private:
75 css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
76 OUString m_aColorPropName;
77 ::Color m_nColor;
78 bool m_bIsFillColor;
79 ::Color m_nDefaultColor;
82 } // namespace xmloff::chart
84 // XMLOFF_COLORPROPERTYSET_HXX
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */