LibreOffice Module chart2 (master) 1
WrappedProperty.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/beans/PropertyState.hpp>
22#include <com/sun/star/uno/Any.hxx>
23#include <rtl/ustring.hxx>
24#include "charttoolsdllapi.hxx"
25
26#include <map>
27#include <memory>
28
29namespace com::sun::star::beans { class XPropertySet; }
30namespace com::sun::star::beans { class XPropertyState; }
31namespace com::sun::star::uno { template <class interface_type> class Reference; }
32
33namespace chart
34{
35
37{
41public:
42 WrappedProperty( OUString aOuterName, OUString aInnerName );
43 virtual ~WrappedProperty();
44
45 const OUString& getOuterName() const { return m_aOuterName;}
46 virtual OUString getInnerName() const;
47
53 virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const;
54
58 virtual css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const;
59
62 virtual void setPropertyToDefault( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const;
63
67 virtual css::uno::Any getPropertyDefault( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const;
68
71 virtual css::beans::PropertyState getPropertyState( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const;
72
73protected:
74 virtual css::uno::Any convertInnerToOuterValue( const css::uno::Any& rInnerValue ) const;
75 virtual css::uno::Any convertOuterToInnerValue( const css::uno::Any& rOuterValue ) const;
76
77protected:
78 OUString m_aOuterName;
79 OUString m_aInnerName;
80};
81
82typedef std::map< sal_Int32, std::unique_ptr<const WrappedProperty> > tWrappedPropertyMap;
83
84} //namespace chart
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
const OUString & getOuterName() const
void setPropertyValue(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Set a property to a certain value in the given map.
std::map< sal_Int32, std::unique_ptr< const WrappedProperty > > tWrappedPropertyMap
class SAL_NO_VTABLE XPropertySet
Reference
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)