summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-22 13:44:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-22 22:11:26 +0200
commit71477a3be1c64e5351894d9ef797feeee6b9eeeb (patch)
tree2f8e53ca0753fb156439837bf7c0c25fd436066b /chart2/source/inc
parent66578750d187d6ec048889ba6aca2e2decd07225 (diff)
OPropertySet doesn't need a pimpl
also inline some of the standalone lambda/functor classes Change-Id: I0a19a1d3cb7f5b3d02348f1ab57bae08b3ab089a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119379 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/OPropertySet.hxx39
1 files changed, 33 insertions, 6 deletions
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index aa0bf918c42c..52cf2e782e28 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -27,14 +27,11 @@
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/style/XStyleSupplier.hpp>
-#include <memory>
+#include <map>
namespace property
{
-namespace impl
-{ class ImplOPropertySet; }
-
class OPropertySet :
public ::cppu::OBroadcastHelper,
// includes beans::XPropertySet, XMultiPropertySet and XFastPropertySet
@@ -190,12 +187,42 @@ protected:
// using setFastPropertyValue
private:
+ /** supports states DIRECT_VALUE and DEFAULT_VALUE
+ */
+ css::beans::PropertyState
+ GetPropertyStateByHandle( sal_Int32 nHandle ) const;
+
+ css::uno::Sequence< css::beans::PropertyState >
+ GetPropertyStatesByHandle( const std::vector< sal_Int32 > & aHandles ) const;
+
+ void SetPropertyToDefault( sal_Int32 nHandle );
+ void SetPropertiesToDefault( const std::vector< sal_Int32 > & aHandles );
+ void SetAllPropertiesToDefault();
+
+ /** @param rValue is set to the value for the property given in nHandle. If
+ the property is not set, the style chain is searched for any
+ instance set there. If there was no value found either in the
+ property set itself or any of its styles, rValue remains
+ unchanged and false is returned.
+
+ @return false if the property is default, true otherwise.
+ */
+ bool GetPropertyValueByHandle(
+ css::uno::Any & rValue,
+ sal_Int32 nHandle ) const;
+
+ void SetPropertyValueByHandle( sal_Int32 nHandle,
+ const css::uno::Any & rValue );
+
+ bool SetStyle( const css::uno::Reference< css::style::XStyle > & xStyle );
+
/// reference to mutex of class deriving from here
::osl::Mutex & m_rMutex;
- /// pImpl idiom implementation
- std::unique_ptr< impl::ImplOPropertySet > m_pImplProperties;
bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
+ typedef std::map< sal_Int32, css::uno::Any > tPropertyMap;
+ tPropertyMap m_aProperties;
+ css::uno::Reference< css::style::XStyle > m_xStyle;
};
} // namespace property