1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*cde9e8dcSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*cde9e8dcSAndrew Rist * distributed with this work for additional information
6*cde9e8dcSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*cde9e8dcSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist * with the License. You may obtain a copy of the License at
10*cde9e8dcSAndrew Rist *
11*cde9e8dcSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*cde9e8dcSAndrew Rist *
13*cde9e8dcSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist * KIND, either express or implied. See the License for the
17*cde9e8dcSAndrew Rist * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist * under the License.
19*cde9e8dcSAndrew Rist *
20*cde9e8dcSAndrew Rist *************************************************************/
21*cde9e8dcSAndrew Rist
22*cde9e8dcSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include "NamedLineProperties.hxx"
28cdf0e10cSrcweir #include "macros.hxx"
29cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
30cdf0e10cSrcweir
31cdf0e10cSrcweir using namespace ::com::sun::star;
32cdf0e10cSrcweir
33cdf0e10cSrcweir using ::com::sun::star::beans::Property;
34cdf0e10cSrcweir using ::rtl::OUString;
35cdf0e10cSrcweir
36cdf0e10cSrcweir namespace chart
37cdf0e10cSrcweir {
38cdf0e10cSrcweir
39cdf0e10cSrcweir // @deprecated !!
AddPropertiesToVector(::std::vector<Property> & rOutProperties)40cdf0e10cSrcweir void NamedLineProperties::AddPropertiesToVector(
41cdf0e10cSrcweir ::std::vector< Property > & rOutProperties )
42cdf0e10cSrcweir {
43cdf0e10cSrcweir const uno::Type tCppuTypeString = ::getCppuType( reinterpret_cast< const OUString * >(0));
44cdf0e10cSrcweir
45cdf0e10cSrcweir // Line Properties
46cdf0e10cSrcweir // ---------------
47cdf0e10cSrcweir rOutProperties.push_back(
48cdf0e10cSrcweir Property( C2U( "LineDash" ),
49cdf0e10cSrcweir PROP_LINE_DASH,
50cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)),
51cdf0e10cSrcweir beans::PropertyAttribute::BOUND
52cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID ));
53cdf0e10cSrcweir
54cdf0e10cSrcweir if( bIncludeLineEnds )
55cdf0e10cSrcweir {
56cdf0e10cSrcweir rOutProperties.push_back(
57cdf0e10cSrcweir Property( C2U( "LineStartName" ),
58cdf0e10cSrcweir PROP_LINE_START_NAME,
59cdf0e10cSrcweir tCppuTypeString,
60cdf0e10cSrcweir beans::PropertyAttribute::BOUND
61cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT
62cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID ));
63cdf0e10cSrcweir
64cdf0e10cSrcweir rOutProperties.push_back(
65cdf0e10cSrcweir Property( C2U( "LineEndName" ),
66cdf0e10cSrcweir PROP_LINE_END_NAME,
67cdf0e10cSrcweir tCppuTypeString,
68cdf0e10cSrcweir beans::PropertyAttribute::BOUND
69cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT
70cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID ));
71cdf0e10cSrcweir }
72cdf0e10cSrcweir }
73cdf0e10cSrcweir
AddDefaultsToMap(::chart::tPropertyValueMap & rOutMap,bool bIncludeLineEnds)74cdf0e10cSrcweir void NamedLineProperties::AddDefaultsToMap(
75cdf0e10cSrcweir ::chart::tPropertyValueMap & rOutMap,
76cdf0e10cSrcweir bool bIncludeLineEnds /* = false */ )
77cdf0e10cSrcweir {
78cdf0e10cSrcweir }
79cdf0e10cSrcweir
GetPropertyNameForHandle(sal_Int32 nHandle)80cdf0e10cSrcweir OUString NamedLineProperties::GetPropertyNameForHandle( sal_Int32 nHandle )
81cdf0e10cSrcweir {
82cdf0e10cSrcweir //will return e.g. "LineDashName" for PROP_LINE_DASH_NAME
83cdf0e10cSrcweir switch( nHandle )
84cdf0e10cSrcweir {
85cdf0e10cSrcweir case PROP_LINE_DASH_NAME:
86cdf0e10cSrcweir return C2U( "LineDashName" );
87cdf0e10cSrcweir case PROP_LINE_START_NAME:
88cdf0e10cSrcweir case PROP_LINE_END_NAME:
89cdf0e10cSrcweir break;
90cdf0e10cSrcweir }
91cdf0e10cSrcweir return OUString();
92cdf0e10cSrcweir }
93cdf0e10cSrcweir
94cdf0e10cSrcweir } // namespace chart
95