1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef XMLOFF_COLORPROPERTYSET_HXX
20 #define XMLOFF_COLORPROPERTYSET_HXX
22 #include <cppuhelper/implbase.hxx>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/beans/XPropertyState.hpp>
32 class ColorPropertySet
: public ::cppu::WeakImplHelper
<
33 css::beans::XPropertySet
,
34 css::beans::XPropertyState
>
37 explicit ColorPropertySet( sal_Int32 nColor
);
38 virtual ~ColorPropertySet();
41 // ____ XPropertySet ____
42 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo()
43 throw (css::uno::RuntimeException
, std::exception
) override
;
44 virtual void SAL_CALL
setPropertyValue(
45 const OUString
& aPropertyName
,
46 const css::uno::Any
& aValue
)
47 throw (css::beans::UnknownPropertyException
,
48 css::beans::PropertyVetoException
,
49 css::lang::IllegalArgumentException
,
50 css::lang::WrappedTargetException
,
51 css::uno::RuntimeException
, std::exception
) override
;
52 virtual css::uno::Any SAL_CALL
getPropertyValue(
53 const OUString
& PropertyName
)
54 throw (css::beans::UnknownPropertyException
,
55 css::lang::WrappedTargetException
,
56 css::uno::RuntimeException
, std::exception
) override
;
57 virtual void SAL_CALL
addPropertyChangeListener(
58 const OUString
& aPropertyName
,
59 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
60 throw (css::beans::UnknownPropertyException
,
61 css::lang::WrappedTargetException
,
62 css::uno::RuntimeException
, std::exception
) override
;
63 virtual void SAL_CALL
removePropertyChangeListener(
64 const OUString
& aPropertyName
,
65 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
66 throw (css::beans::UnknownPropertyException
,
67 css::lang::WrappedTargetException
,
68 css::uno::RuntimeException
, std::exception
) override
;
69 virtual void SAL_CALL
addVetoableChangeListener(
70 const OUString
& PropertyName
,
71 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
72 throw (css::beans::UnknownPropertyException
,
73 css::lang::WrappedTargetException
,
74 css::uno::RuntimeException
, std::exception
) override
;
75 virtual void SAL_CALL
removeVetoableChangeListener(
76 const OUString
& PropertyName
,
77 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
78 throw (css::beans::UnknownPropertyException
,
79 css::lang::WrappedTargetException
,
80 css::uno::RuntimeException
, std::exception
) override
;
82 // ____ XPropertyState ____
83 virtual css::beans::PropertyState SAL_CALL
getPropertyState(
84 const OUString
& PropertyName
)
85 throw (css::beans::UnknownPropertyException
,
86 css::uno::RuntimeException
, std::exception
) override
;
87 virtual css::uno::Sequence
< css::beans::PropertyState
> SAL_CALL
getPropertyStates(
88 const css::uno::Sequence
< OUString
>& aPropertyName
)
89 throw (css::beans::UnknownPropertyException
,
90 css::uno::RuntimeException
, std::exception
) override
;
91 virtual void SAL_CALL
setPropertyToDefault(
92 const OUString
& PropertyName
)
93 throw (css::beans::UnknownPropertyException
,
94 css::uno::RuntimeException
, std::exception
) override
;
95 virtual css::uno::Any SAL_CALL
getPropertyDefault(
96 const OUString
& aPropertyName
)
97 throw (css::beans::UnknownPropertyException
,
98 css::lang::WrappedTargetException
,
99 css::uno::RuntimeException
, std::exception
) override
;
102 css::uno::Reference
< css::beans::XPropertySetInfo
> m_xInfo
;
103 OUString m_aColorPropName
;
106 sal_Int32 m_nDefaultColor
;
110 } // namespace xmloff
112 // XMLOFF_COLORPROPERTYSET_HXX
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */