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 CHART_IMPLOPROPERTYSET_HXX
20 #define CHART_IMPLOPROPERTYSET_HXX
22 #include <com/sun/star/beans/PropertyState.hpp>
23 #include <com/sun/star/uno/Sequence.hxx>
24 #include <com/sun/star/style/XStyle.hpp>
34 class ImplOPropertySet
38 explicit ImplOPropertySet( const ImplOPropertySet
& rOther
);
40 /** supports states DIRECT_VALUE and DEFAULT_VALUE
42 ::com::sun::star::beans::PropertyState
43 GetPropertyStateByHandle( sal_Int32 nHandle
) const;
45 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
>
46 GetPropertyStatesByHandle( const ::std::vector
< sal_Int32
> & aHandles
) const;
48 void SetPropertyToDefault( sal_Int32 nHandle
);
49 void SetPropertiesToDefault( const ::std::vector
< sal_Int32
> & aHandles
);
50 void SetAllPropertiesToDefault();
52 /** @param rValue is set to the value for the property given in nHandle. If
53 the property is not set, the style chain is searched for any
54 instance set there. If there was no value found either in the
55 property set itself or any of its styles, rValue remains
56 unchanged and false is returned.
58 @return false if the property is default, true otherwise.
60 bool GetPropertyValueByHandle(
61 ::com::sun::star::uno::Any
& rValue
,
62 sal_Int32 nHandle
) const;
64 void SetPropertyValueByHandle( sal_Int32 nHandle
,
65 const ::com::sun::star::uno::Any
& rValue
,
66 ::com::sun::star::uno::Any
* pOldValue
= NULL
);
68 bool SetStyle( const ::com::sun::star::uno::Reference
< ::com::sun::star::style::XStyle
> & xStyle
);
69 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XStyle
>
73 ::std::map
< sal_Int32
, ::com::sun::star::uno::Any
>
77 void cloneInterfaceProperties();
79 tPropertyMap m_aProperties
;
80 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XStyle
>
87 // CHART_IMPLOPROPERTYSET_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */