bump product version to 4.1.6.2
[LibreOffice.git] / chart2 / source / view / inc / PropertyMapper.hxx
blob04159ed9b588d8b9d3e1327658fdbca2f253c647
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 .
19 #ifndef _CHART2_PROPERTYMAPPER_HXX
20 #define _CHART2_PROPERTYMAPPER_HXX
22 #include <comphelper/InlineContainer.hxx>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/drawing/XShape.hpp>
26 //.............................................................................
27 namespace chart
29 //.............................................................................
31 //-----------------------------------------------------------------------------
32 /**
35 typedef ::std::map< OUString, OUString > tPropertyNameMap;
36 typedef ::comphelper::MakeMap< OUString, OUString > tMakePropertyNameMap;
38 typedef ::std::map< OUString, ::com::sun::star::uno::Any > tPropertyNameValueMap;
39 typedef ::comphelper::MakeMap< OUString, ::com::sun::star::uno::Any > tMakePropertyNameValueMap;
41 typedef ::com::sun::star::uno::Sequence< OUString > tNameSequence;
42 typedef ::comphelper::MakeSequence< OUString > tMakeNameSequence;
44 typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > tAnySequence;
45 typedef ::comphelper::MakeSequence< ::com::sun::star::uno::Any > tMakeAnySequence;
47 class PropertyMapper
49 public:
50 static void setMappedProperties(
51 const ::com::sun::star::uno::Reference<
52 ::com::sun::star::beans::XPropertySet >& xTarget
53 , const ::com::sun::star::uno::Reference<
54 ::com::sun::star::beans::XPropertySet >& xSource
55 , const tPropertyNameMap& rMap
56 , tPropertyNameValueMap* pOverwriteMap=0 );
58 static void getValueMap(
59 tPropertyNameValueMap& rValueMap
60 , const tPropertyNameMap& rNameMap
61 , const ::com::sun::star::uno::Reference<
62 ::com::sun::star::beans::XPropertySet >& xSourceProp
65 static void getMultiPropertyLists(
66 tNameSequence& rNames
67 , tAnySequence& rValues
68 , const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProp
69 , const tPropertyNameMap& rMap
72 static void getMultiPropertyListsFromValueMap(
73 tNameSequence& rNames
74 , tAnySequence& rValues
75 , const tPropertyNameValueMap& rValueMap
78 static ::com::sun::star::uno::Any*
79 getValuePointer( tAnySequence& rPropValues
80 , const tNameSequence& rPropNames
81 , const OUString& rPropName );
83 static ::com::sun::star::uno::Any*
84 getValuePointerForLimitedSpace( tAnySequence& rPropValues
85 , const tNameSequence& rPropNames
86 , bool bLimitedHeight );
88 static void setMultiProperties(
89 const tNameSequence& rNames
90 , const tAnySequence& rValues
91 , const ::com::sun::star::uno::Reference<
92 ::com::sun::star::beans::XPropertySet >& xTarget );
94 static const tMakePropertyNameMap& getPropertyNameMapForCharacterProperties();
95 static const tMakePropertyNameMap& getPropertyNameMapForParagraphProperties();
96 static const tMakePropertyNameMap& getPropertyNameMapForFillProperties();
97 static const tMakePropertyNameMap& getPropertyNameMapForLineProperties();
98 static const tMakePropertyNameMap& getPropertyNameMapForFillAndLineProperties();
99 static const tMakePropertyNameMap& getPropertyNameMapForTextShapeProperties();
101 static const tMakePropertyNameMap& getPropertyNameMapForFilledSeriesProperties();
102 static const tMakePropertyNameMap& getPropertyNameMapForLineSeriesProperties();
104 static void getTextLabelMultiPropertyLists(
105 const ::com::sun::star::uno::Reference<
106 ::com::sun::star::beans::XPropertySet >& xSourceProp
107 , tNameSequence& rPropNames, tAnySequence& rPropValues
108 , bool bName=true
109 , sal_Int32 nLimitedSpace=-1
110 , bool bLimitedHeight=false );
112 /** adds line-, fill- and character properties and sets some suitable
113 defaults for auto-grow properties
115 static void getPreparedTextShapePropertyLists(
116 const ::com::sun::star::uno::Reference<
117 ::com::sun::star::beans::XPropertySet >& xSourceProp
118 , tNameSequence& rPropNames
119 , tAnySequence& rPropValues );
122 //.............................................................................
123 } //namespace chart
124 //.............................................................................
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */