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 10cdf0e10cSrcweir * 11*cde9e8dcSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 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. 19cdf0e10cSrcweir * 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 #include "AxisWrapper.hxx" 27cdf0e10cSrcweir #include "AxisHelper.hxx" 28cdf0e10cSrcweir #include "TitleHelper.hxx" 29cdf0e10cSrcweir #include "Chart2ModelContact.hxx" 30cdf0e10cSrcweir #include "ContainerHelper.hxx" 31cdf0e10cSrcweir #include "macros.hxx" 32cdf0e10cSrcweir #include "WrappedDirectStateProperty.hxx" 33cdf0e10cSrcweir #include "GridWrapper.hxx" 34cdf0e10cSrcweir #include "TitleWrapper.hxx" 35cdf0e10cSrcweir #include "DisposeHelper.hxx" 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include <comphelper/InlineContainer.hxx> 38cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 39cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp> 40cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisPosition.hpp> 41cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisLabelPosition.hpp> 42cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisMarkPosition.hpp> 43cdf0e10cSrcweir 44cdf0e10cSrcweir #include "CharacterProperties.hxx" 45cdf0e10cSrcweir #include "LineProperties.hxx" 46cdf0e10cSrcweir #include "UserDefinedProperties.hxx" 47cdf0e10cSrcweir #include "WrappedCharacterHeightProperty.hxx" 48cdf0e10cSrcweir #include "WrappedTextRotationProperty.hxx" 49cdf0e10cSrcweir #include "WrappedGapwidthProperty.hxx" 50cdf0e10cSrcweir #include "WrappedScaleProperty.hxx" 51cdf0e10cSrcweir #include "WrappedDefaultProperty.hxx" 52cdf0e10cSrcweir #include "WrappedNumberFormatProperty.hxx" 53cdf0e10cSrcweir #include "WrappedScaleTextProperties.hxx" 54cdf0e10cSrcweir 55cdf0e10cSrcweir #include <algorithm> 56cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 57cdf0e10cSrcweir #include <rtl/math.hxx> 58cdf0e10cSrcweir 59cdf0e10cSrcweir using namespace ::com::sun::star; 60cdf0e10cSrcweir using namespace ::com::sun::star::chart2; 61cdf0e10cSrcweir using namespace ::chart::ContainerHelper; 62cdf0e10cSrcweir 63cdf0e10cSrcweir using ::com::sun::star::beans::Property; 64cdf0e10cSrcweir using ::osl::MutexGuard; 65cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 66cdf0e10cSrcweir using ::com::sun::star::uno::Sequence; 67cdf0e10cSrcweir using ::com::sun::star::uno::Any; 68cdf0e10cSrcweir using ::rtl::OUString; 69cdf0e10cSrcweir 70cdf0e10cSrcweir namespace 71cdf0e10cSrcweir { 72cdf0e10cSrcweir static const OUString lcl_aServiceName( 73cdf0e10cSrcweir RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Axis" )); 74cdf0e10cSrcweir 75cdf0e10cSrcweir enum 76cdf0e10cSrcweir { 77cdf0e10cSrcweir PROP_AXIS_MAX, 78cdf0e10cSrcweir PROP_AXIS_MIN, 79cdf0e10cSrcweir PROP_AXIS_STEPMAIN, 80cdf0e10cSrcweir PROP_AXIS_STEPHELP, //deprecated property use 'StepHelpCount' instead 81cdf0e10cSrcweir PROP_AXIS_STEPHELP_COUNT, 82cdf0e10cSrcweir PROP_AXIS_AUTO_MAX, 83cdf0e10cSrcweir PROP_AXIS_AUTO_MIN, 84cdf0e10cSrcweir PROP_AXIS_AUTO_STEPMAIN, 85cdf0e10cSrcweir PROP_AXIS_AUTO_STEPHELP, 86cdf0e10cSrcweir PROP_AXIS_TYPE, 87cdf0e10cSrcweir PROP_AXIS_TIME_INCREMENT, 88cdf0e10cSrcweir PROP_AXIS_EXPLICIT_TIME_INCREMENT, 89cdf0e10cSrcweir PROP_AXIS_LOGARITHMIC, 90cdf0e10cSrcweir PROP_AXIS_REVERSEDIRECTION, 91cdf0e10cSrcweir PROP_AXIS_VISIBLE, 92cdf0e10cSrcweir PROP_AXIS_CROSSOVER_POSITION, 93cdf0e10cSrcweir PROP_AXIS_CROSSOVER_VALUE, 94cdf0e10cSrcweir PROP_AXIS_ORIGIN, 95cdf0e10cSrcweir PROP_AXIS_AUTO_ORIGIN, 96cdf0e10cSrcweir PROP_AXIS_MARKS, 97cdf0e10cSrcweir PROP_AXIS_HELPMARKS, 98cdf0e10cSrcweir PROP_AXIS_MARK_POSITION, 99cdf0e10cSrcweir PROP_AXIS_DISPLAY_LABELS, 100cdf0e10cSrcweir PROP_AXIS_NUMBERFORMAT, 101cdf0e10cSrcweir PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, 102cdf0e10cSrcweir PROP_AXIS_LABEL_POSITION, 103cdf0e10cSrcweir PROP_AXIS_TEXT_ROTATION, 104cdf0e10cSrcweir PROP_AXIS_ARRANGE_ORDER, 105cdf0e10cSrcweir PROP_AXIS_TEXTBREAK, 106cdf0e10cSrcweir PROP_AXIS_CAN_OVERLAP, 107cdf0e10cSrcweir PROP_AXIS_STACKEDTEXT, 108cdf0e10cSrcweir PROP_AXIS_OVERLAP, 109cdf0e10cSrcweir PROP_AXIS_GAP_WIDTH 110cdf0e10cSrcweir }; 111cdf0e10cSrcweir 112cdf0e10cSrcweir void lcl_AddPropertiesToVector( 113cdf0e10cSrcweir ::std::vector< Property > & rOutProperties ) 114cdf0e10cSrcweir { 115cdf0e10cSrcweir //Properties for scaling: 116cdf0e10cSrcweir rOutProperties.push_back( 117cdf0e10cSrcweir Property( C2U( "Max" ), 118cdf0e10cSrcweir PROP_AXIS_MAX, 119cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 120cdf0e10cSrcweir beans::PropertyAttribute::BOUND 121cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 122cdf0e10cSrcweir 123cdf0e10cSrcweir rOutProperties.push_back( 124cdf0e10cSrcweir Property( C2U( "Min" ), 125cdf0e10cSrcweir PROP_AXIS_MIN, 126cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 127cdf0e10cSrcweir beans::PropertyAttribute::BOUND 128cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 129cdf0e10cSrcweir 130cdf0e10cSrcweir rOutProperties.push_back( 131cdf0e10cSrcweir Property( C2U( "StepMain" ), 132cdf0e10cSrcweir PROP_AXIS_STEPMAIN, 133cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 134cdf0e10cSrcweir beans::PropertyAttribute::BOUND 135cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 136cdf0e10cSrcweir 137cdf0e10cSrcweir rOutProperties.push_back( 138cdf0e10cSrcweir Property( C2U( "StepHelpCount" ), 139cdf0e10cSrcweir PROP_AXIS_STEPHELP_COUNT, 140cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 141cdf0e10cSrcweir beans::PropertyAttribute::BOUND 142cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 143cdf0e10cSrcweir 144cdf0e10cSrcweir //deprecated property use 'StepHelpCount' instead 145cdf0e10cSrcweir rOutProperties.push_back( 146cdf0e10cSrcweir Property( C2U( "StepHelp" ), 147cdf0e10cSrcweir PROP_AXIS_STEPHELP, 148cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 149cdf0e10cSrcweir beans::PropertyAttribute::BOUND 150cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 151cdf0e10cSrcweir 152cdf0e10cSrcweir rOutProperties.push_back( 153cdf0e10cSrcweir Property( C2U( "AutoMax" ), 154cdf0e10cSrcweir PROP_AXIS_AUTO_MAX, 155cdf0e10cSrcweir ::getBooleanCppuType(), 156cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 157cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 158cdf0e10cSrcweir 159cdf0e10cSrcweir rOutProperties.push_back( 160cdf0e10cSrcweir Property( C2U( "AutoMin" ), 161cdf0e10cSrcweir PROP_AXIS_AUTO_MIN, 162cdf0e10cSrcweir ::getBooleanCppuType(), 163cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 164cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 165cdf0e10cSrcweir 166cdf0e10cSrcweir rOutProperties.push_back( 167cdf0e10cSrcweir Property( C2U( "AutoStepMain" ), 168cdf0e10cSrcweir PROP_AXIS_AUTO_STEPMAIN, 169cdf0e10cSrcweir ::getBooleanCppuType(), 170cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 171cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 172cdf0e10cSrcweir 173cdf0e10cSrcweir rOutProperties.push_back( 174cdf0e10cSrcweir Property( C2U( "AutoStepHelp" ), 175cdf0e10cSrcweir PROP_AXIS_AUTO_STEPHELP, 176cdf0e10cSrcweir ::getBooleanCppuType(), 177cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 178cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 179cdf0e10cSrcweir 180cdf0e10cSrcweir rOutProperties.push_back( 181cdf0e10cSrcweir Property( C2U( "AxisType" ), 182cdf0e10cSrcweir PROP_AXIS_TYPE, 183cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), //type com::sun::star::chart::ChartAxisType 184cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 185cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 186cdf0e10cSrcweir 187cdf0e10cSrcweir rOutProperties.push_back( 188cdf0e10cSrcweir Property( C2U( "TimeIncrement" ), 189cdf0e10cSrcweir PROP_AXIS_TIME_INCREMENT, 190cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::TimeIncrement * >(0)), 191cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 192cdf0e10cSrcweir beans::PropertyAttribute::MAYBEVOID )); 193cdf0e10cSrcweir 194cdf0e10cSrcweir rOutProperties.push_back( 195cdf0e10cSrcweir Property( C2U( "ExplicitTimeIncrement" ), 196cdf0e10cSrcweir PROP_AXIS_EXPLICIT_TIME_INCREMENT, 197cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::TimeIncrement * >(0)), 198cdf0e10cSrcweir beans::PropertyAttribute::READONLY | 199cdf0e10cSrcweir beans::PropertyAttribute::MAYBEVOID )); 200cdf0e10cSrcweir 201cdf0e10cSrcweir rOutProperties.push_back( 202cdf0e10cSrcweir Property( C2U( "Logarithmic" ), 203cdf0e10cSrcweir PROP_AXIS_LOGARITHMIC, 204cdf0e10cSrcweir ::getBooleanCppuType(), 205cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 206cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 207cdf0e10cSrcweir 208cdf0e10cSrcweir rOutProperties.push_back( 209cdf0e10cSrcweir Property( C2U( "ReverseDirection" ), 210cdf0e10cSrcweir PROP_AXIS_REVERSEDIRECTION, 211cdf0e10cSrcweir ::getBooleanCppuType(), 212cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 213cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 214cdf0e10cSrcweir 215cdf0e10cSrcweir //todo: this property is missing in the API 216cdf0e10cSrcweir rOutProperties.push_back( 217cdf0e10cSrcweir Property( C2U( "Visible" ), 218cdf0e10cSrcweir PROP_AXIS_VISIBLE, 219cdf0e10cSrcweir ::getBooleanCppuType(), 220cdf0e10cSrcweir beans::PropertyAttribute::BOUND 221cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 222cdf0e10cSrcweir 223cdf0e10cSrcweir rOutProperties.push_back( 224cdf0e10cSrcweir Property( C2U( "CrossoverPosition" ), 225cdf0e10cSrcweir PROP_AXIS_CROSSOVER_POSITION, 226cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisPosition * >(0)), 227cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 228cdf0e10cSrcweir 229cdf0e10cSrcweir rOutProperties.push_back( 230cdf0e10cSrcweir Property( C2U( "CrossoverValue" ), 231cdf0e10cSrcweir PROP_AXIS_CROSSOVER_VALUE, 232cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 233cdf0e10cSrcweir beans::PropertyAttribute::MAYBEVOID )); 234cdf0e10cSrcweir 235cdf0e10cSrcweir 236cdf0e10cSrcweir rOutProperties.push_back( 237cdf0e10cSrcweir Property( C2U( "Origin" ), 238cdf0e10cSrcweir PROP_AXIS_ORIGIN, 239cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const double * >(0)), 240cdf0e10cSrcweir beans::PropertyAttribute::BOUND 241cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID )); 242cdf0e10cSrcweir 243cdf0e10cSrcweir rOutProperties.push_back( 244cdf0e10cSrcweir Property( C2U( "AutoOrigin" ), 245cdf0e10cSrcweir PROP_AXIS_AUTO_ORIGIN, 246cdf0e10cSrcweir ::getBooleanCppuType(), 247cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 248cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 249cdf0e10cSrcweir 250cdf0e10cSrcweir //Properties for interval marks: 251cdf0e10cSrcweir rOutProperties.push_back( 252cdf0e10cSrcweir Property( C2U( "Marks" ), 253cdf0e10cSrcweir PROP_AXIS_MARKS, 254cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 255cdf0e10cSrcweir beans::PropertyAttribute::BOUND 256cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 257cdf0e10cSrcweir 258cdf0e10cSrcweir rOutProperties.push_back( 259cdf0e10cSrcweir Property( C2U( "HelpMarks" ), 260cdf0e10cSrcweir PROP_AXIS_HELPMARKS, 261cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 262cdf0e10cSrcweir beans::PropertyAttribute::BOUND 263cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 264cdf0e10cSrcweir 265cdf0e10cSrcweir rOutProperties.push_back( 266cdf0e10cSrcweir Property( C2U( "MarkPosition" ), 267cdf0e10cSrcweir PROP_AXIS_MARK_POSITION, 268cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisMarkPosition * >(0)), 269cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 270cdf0e10cSrcweir 271cdf0e10cSrcweir 272cdf0e10cSrcweir //Properties for labels: 273cdf0e10cSrcweir rOutProperties.push_back( 274cdf0e10cSrcweir Property( C2U( "DisplayLabels" ), 275cdf0e10cSrcweir PROP_AXIS_DISPLAY_LABELS, 276cdf0e10cSrcweir ::getBooleanCppuType(), 277cdf0e10cSrcweir beans::PropertyAttribute::BOUND 278cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 279cdf0e10cSrcweir 280cdf0e10cSrcweir rOutProperties.push_back( 281cdf0e10cSrcweir Property( C2U( "NumberFormat" ), 282cdf0e10cSrcweir PROP_AXIS_NUMBERFORMAT, 283cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 284cdf0e10cSrcweir beans::PropertyAttribute::BOUND 285cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 286cdf0e10cSrcweir 287cdf0e10cSrcweir rOutProperties.push_back( 288cdf0e10cSrcweir Property( C2U( "LinkNumberFormatToSource" ), 289cdf0e10cSrcweir PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, 290cdf0e10cSrcweir ::getBooleanCppuType(), 291cdf0e10cSrcweir beans::PropertyAttribute::BOUND 292cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 293cdf0e10cSrcweir 294cdf0e10cSrcweir rOutProperties.push_back( 295cdf0e10cSrcweir Property( C2U( "LabelPosition" ), 296cdf0e10cSrcweir PROP_AXIS_LABEL_POSITION, 297cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisLabelPosition * >(0)), 298cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 299cdf0e10cSrcweir 300cdf0e10cSrcweir rOutProperties.push_back( 301cdf0e10cSrcweir Property( C2U( "TextRotation" ), 302cdf0e10cSrcweir PROP_AXIS_TEXT_ROTATION, 303cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 304cdf0e10cSrcweir beans::PropertyAttribute::BOUND 305cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 306cdf0e10cSrcweir 307cdf0e10cSrcweir rOutProperties.push_back( 308cdf0e10cSrcweir Property( C2U( "ArrangeOrder" ), 309cdf0e10cSrcweir PROP_AXIS_ARRANGE_ORDER, 310cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisArrangeOrderType * >(0)), 311cdf0e10cSrcweir beans::PropertyAttribute::BOUND 312cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 313cdf0e10cSrcweir 314cdf0e10cSrcweir rOutProperties.push_back( 315cdf0e10cSrcweir Property( C2U( "TextBreak" ), 316cdf0e10cSrcweir PROP_AXIS_TEXTBREAK, 317cdf0e10cSrcweir ::getBooleanCppuType(), 318cdf0e10cSrcweir beans::PropertyAttribute::BOUND 319cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 320cdf0e10cSrcweir 321cdf0e10cSrcweir rOutProperties.push_back( 322cdf0e10cSrcweir Property( C2U( "TextCanOverlap" ), 323cdf0e10cSrcweir PROP_AXIS_CAN_OVERLAP, 324cdf0e10cSrcweir ::getBooleanCppuType(), 325cdf0e10cSrcweir beans::PropertyAttribute::BOUND 326cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 327cdf0e10cSrcweir 328cdf0e10cSrcweir rOutProperties.push_back( 329cdf0e10cSrcweir Property( C2U( "StackedText" ), 330cdf0e10cSrcweir PROP_AXIS_STACKEDTEXT, 331cdf0e10cSrcweir ::getBooleanCppuType(), 332cdf0e10cSrcweir beans::PropertyAttribute::BOUND 333cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 334cdf0e10cSrcweir 335cdf0e10cSrcweir // Properties related to bar charts: 336cdf0e10cSrcweir rOutProperties.push_back( 337cdf0e10cSrcweir Property( C2U( "Overlap" ), 338cdf0e10cSrcweir PROP_AXIS_OVERLAP, 339cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 340cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 341cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 342cdf0e10cSrcweir 343cdf0e10cSrcweir rOutProperties.push_back( 344cdf0e10cSrcweir Property( C2U( "GapWidth" ), 345cdf0e10cSrcweir PROP_AXIS_GAP_WIDTH, 346cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 347cdf0e10cSrcweir //#i111967# no PropertyChangeEvent is fired on change so far 348cdf0e10cSrcweir beans::PropertyAttribute::MAYBEDEFAULT )); 349cdf0e10cSrcweir } 350cdf0e10cSrcweir 351cdf0e10cSrcweir struct StaticAxisWrapperPropertyArray_Initializer 352cdf0e10cSrcweir { 353cdf0e10cSrcweir Sequence< Property >* operator()() 354cdf0e10cSrcweir { 355cdf0e10cSrcweir static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); 356cdf0e10cSrcweir return &aPropSeq; 357cdf0e10cSrcweir } 358cdf0e10cSrcweir 359cdf0e10cSrcweir private: 360cdf0e10cSrcweir Sequence< Property > lcl_GetPropertySequence() 361cdf0e10cSrcweir { 362cdf0e10cSrcweir ::std::vector< ::com::sun::star::beans::Property > aProperties; 363cdf0e10cSrcweir lcl_AddPropertiesToVector( aProperties ); 364cdf0e10cSrcweir ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); 365cdf0e10cSrcweir ::chart::LineProperties::AddPropertiesToVector( aProperties ); 366cdf0e10cSrcweir //::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); 367cdf0e10cSrcweir ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); 368cdf0e10cSrcweir ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); 369cdf0e10cSrcweir 370cdf0e10cSrcweir ::std::sort( aProperties.begin(), aProperties.end(), 371cdf0e10cSrcweir ::chart::PropertyNameLess() ); 372cdf0e10cSrcweir 373cdf0e10cSrcweir return ::chart::ContainerHelper::ContainerToSequence( aProperties ); 374cdf0e10cSrcweir } 375cdf0e10cSrcweir }; 376cdf0e10cSrcweir 377cdf0e10cSrcweir struct StaticAxisWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAxisWrapperPropertyArray_Initializer > 378cdf0e10cSrcweir { 379cdf0e10cSrcweir }; 380cdf0e10cSrcweir 381cdf0e10cSrcweir } // anonymous namespace 382cdf0e10cSrcweir 383cdf0e10cSrcweir // -------------------------------------------------------------------------------- 384cdf0e10cSrcweir 385cdf0e10cSrcweir namespace chart 386cdf0e10cSrcweir { 387cdf0e10cSrcweir namespace wrapper 388cdf0e10cSrcweir { 389cdf0e10cSrcweir 390cdf0e10cSrcweir AxisWrapper::AxisWrapper( 391cdf0e10cSrcweir tAxisType eType, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) : 392cdf0e10cSrcweir m_spChart2ModelContact( spChart2ModelContact ), 393cdf0e10cSrcweir m_aEventListenerContainer( m_aMutex ), 394cdf0e10cSrcweir m_eType( eType ) 395cdf0e10cSrcweir { 396cdf0e10cSrcweir } 397cdf0e10cSrcweir 398cdf0e10cSrcweir AxisWrapper::~AxisWrapper() 399cdf0e10cSrcweir { 400cdf0e10cSrcweir } 401cdf0e10cSrcweir 402cdf0e10cSrcweir // ____ chart::XAxis ____ 403cdf0e10cSrcweir Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getAxisTitle() throw (uno::RuntimeException) 404cdf0e10cSrcweir { 405cdf0e10cSrcweir if( !m_xAxisTitle.is() ) 406cdf0e10cSrcweir { 407cdf0e10cSrcweir TitleHelper::eTitleType eTitleType( TitleHelper::X_AXIS_TITLE ); 408cdf0e10cSrcweir switch( m_eType ) 409cdf0e10cSrcweir { 410cdf0e10cSrcweir case X_AXIS: 411cdf0e10cSrcweir eTitleType = TitleHelper::X_AXIS_TITLE; 412cdf0e10cSrcweir break; 413cdf0e10cSrcweir case Y_AXIS: 414cdf0e10cSrcweir eTitleType = TitleHelper::Y_AXIS_TITLE; 415cdf0e10cSrcweir break; 416cdf0e10cSrcweir case Z_AXIS: 417cdf0e10cSrcweir eTitleType = TitleHelper::Z_AXIS_TITLE; 418cdf0e10cSrcweir break; 419cdf0e10cSrcweir case SECOND_X_AXIS: 420cdf0e10cSrcweir eTitleType = TitleHelper::SECONDARY_X_AXIS_TITLE; 421cdf0e10cSrcweir break; 422cdf0e10cSrcweir case SECOND_Y_AXIS: 423cdf0e10cSrcweir eTitleType = TitleHelper::SECONDARY_Y_AXIS_TITLE; 424cdf0e10cSrcweir break; 425cdf0e10cSrcweir default: 426cdf0e10cSrcweir return 0; 427cdf0e10cSrcweir } 428cdf0e10cSrcweir m_xAxisTitle = new TitleWrapper( eTitleType, m_spChart2ModelContact ); 429cdf0e10cSrcweir } 430cdf0e10cSrcweir return m_xAxisTitle; 431cdf0e10cSrcweir } 432cdf0e10cSrcweir Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getMajorGrid() throw (uno::RuntimeException) 433cdf0e10cSrcweir { 434cdf0e10cSrcweir if( !m_xMajorGrid.is() ) 435cdf0e10cSrcweir { 436cdf0e10cSrcweir GridWrapper::tGridType eGridType( GridWrapper::X_MAJOR_GRID ); 437cdf0e10cSrcweir switch( m_eType ) 438cdf0e10cSrcweir { 439cdf0e10cSrcweir case X_AXIS: 440cdf0e10cSrcweir eGridType = GridWrapper::X_MAJOR_GRID; 441cdf0e10cSrcweir break; 442cdf0e10cSrcweir case Y_AXIS: 443cdf0e10cSrcweir eGridType = GridWrapper::Y_MAJOR_GRID; 444cdf0e10cSrcweir break; 445cdf0e10cSrcweir case Z_AXIS: 446cdf0e10cSrcweir eGridType = GridWrapper::Z_MAJOR_GRID; 447cdf0e10cSrcweir break; 448cdf0e10cSrcweir default: 449cdf0e10cSrcweir return 0; 450cdf0e10cSrcweir } 451cdf0e10cSrcweir m_xMajorGrid = new GridWrapper( eGridType, m_spChart2ModelContact ); 452cdf0e10cSrcweir } 453cdf0e10cSrcweir return m_xMajorGrid; 454cdf0e10cSrcweir } 455cdf0e10cSrcweir Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getMinorGrid() throw (uno::RuntimeException) 456cdf0e10cSrcweir { 457cdf0e10cSrcweir if( !m_xMinorGrid.is() ) 458cdf0e10cSrcweir { 459cdf0e10cSrcweir GridWrapper::tGridType eGridType( GridWrapper::X_MAJOR_GRID ); 460cdf0e10cSrcweir switch( m_eType ) 461cdf0e10cSrcweir { 462cdf0e10cSrcweir case X_AXIS: 463cdf0e10cSrcweir eGridType = GridWrapper::X_MINOR_GRID; 464cdf0e10cSrcweir break; 465cdf0e10cSrcweir case Y_AXIS: 466cdf0e10cSrcweir eGridType = GridWrapper::Y_MINOR_GRID; 467cdf0e10cSrcweir break; 468cdf0e10cSrcweir case Z_AXIS: 469cdf0e10cSrcweir eGridType = GridWrapper::Z_MINOR_GRID; 470cdf0e10cSrcweir break; 471cdf0e10cSrcweir default: 472cdf0e10cSrcweir return 0; 473cdf0e10cSrcweir } 474cdf0e10cSrcweir m_xMinorGrid = new GridWrapper( eGridType, m_spChart2ModelContact ); 475cdf0e10cSrcweir } 476cdf0e10cSrcweir return m_xMinorGrid; 477cdf0e10cSrcweir } 478cdf0e10cSrcweir 479cdf0e10cSrcweir // ____ XShape ____ 480cdf0e10cSrcweir awt::Point SAL_CALL AxisWrapper::getPosition() 481cdf0e10cSrcweir throw (uno::RuntimeException) 482cdf0e10cSrcweir { 483cdf0e10cSrcweir awt::Point aResult( m_spChart2ModelContact->GetAxisPosition( this->getAxis() ) ); 484cdf0e10cSrcweir return aResult; 485cdf0e10cSrcweir } 486cdf0e10cSrcweir 487cdf0e10cSrcweir void SAL_CALL AxisWrapper::setPosition( const awt::Point& /*aPosition*/ ) 488cdf0e10cSrcweir throw (uno::RuntimeException) 489cdf0e10cSrcweir { 490cdf0e10cSrcweir OSL_ENSURE( false, "trying to set position of Axis" ); 491cdf0e10cSrcweir } 492cdf0e10cSrcweir 493cdf0e10cSrcweir awt::Size SAL_CALL AxisWrapper::getSize() 494cdf0e10cSrcweir throw (uno::RuntimeException) 495cdf0e10cSrcweir { 496cdf0e10cSrcweir awt::Size aSize( m_spChart2ModelContact->GetAxisSize( this->getAxis() ) ); 497cdf0e10cSrcweir return aSize; 498cdf0e10cSrcweir } 499cdf0e10cSrcweir 500cdf0e10cSrcweir void SAL_CALL AxisWrapper::setSize( const awt::Size& /*aSize*/ ) 501cdf0e10cSrcweir throw (beans::PropertyVetoException, 502cdf0e10cSrcweir uno::RuntimeException) 503cdf0e10cSrcweir { 504cdf0e10cSrcweir OSL_ENSURE( false, "trying to set size of Axis" ); 505cdf0e10cSrcweir } 506cdf0e10cSrcweir 507cdf0e10cSrcweir // ____ XShapeDescriptor (base of XShape) ____ 508cdf0e10cSrcweir OUString SAL_CALL AxisWrapper::getShapeType() 509cdf0e10cSrcweir throw (uno::RuntimeException) 510cdf0e10cSrcweir { 511cdf0e10cSrcweir return C2U( "com.sun.star.chart.ChartAxis" ); 512cdf0e10cSrcweir } 513cdf0e10cSrcweir 514cdf0e10cSrcweir // ____ XNumberFormatsSupplier ____ 515cdf0e10cSrcweir uno::Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getNumberFormatSettings() 516cdf0e10cSrcweir throw (uno::RuntimeException) 517cdf0e10cSrcweir { 518cdf0e10cSrcweir Reference< util::XNumberFormatsSupplier > xNumSuppl( m_spChart2ModelContact->getChartModel(), uno::UNO_QUERY ); 519cdf0e10cSrcweir if( xNumSuppl.is() ) 520cdf0e10cSrcweir return xNumSuppl->getNumberFormatSettings(); 521cdf0e10cSrcweir 522cdf0e10cSrcweir return uno::Reference< beans::XPropertySet >(); 523cdf0e10cSrcweir } 524cdf0e10cSrcweir 525cdf0e10cSrcweir uno::Reference< util::XNumberFormats > SAL_CALL AxisWrapper::getNumberFormats() 526cdf0e10cSrcweir throw (uno::RuntimeException) 527cdf0e10cSrcweir { 528cdf0e10cSrcweir Reference< util::XNumberFormatsSupplier > xNumSuppl( m_spChart2ModelContact->getChartModel(), uno::UNO_QUERY ); 529cdf0e10cSrcweir if( xNumSuppl.is() ) 530cdf0e10cSrcweir return xNumSuppl->getNumberFormats(); 531cdf0e10cSrcweir 532cdf0e10cSrcweir return uno::Reference< util::XNumberFormats >(); 533cdf0e10cSrcweir } 534cdf0e10cSrcweir 535cdf0e10cSrcweir void AxisWrapper::getDimensionAndMainAxisBool( tAxisType eType, sal_Int32& rnDimensionIndex, sal_Bool& rbMainAxis ) 536cdf0e10cSrcweir { 537cdf0e10cSrcweir switch( eType ) 538cdf0e10cSrcweir { 539cdf0e10cSrcweir case X_AXIS: 540cdf0e10cSrcweir rnDimensionIndex = 0; rbMainAxis = sal_True; break; 541cdf0e10cSrcweir case Y_AXIS: 542cdf0e10cSrcweir rnDimensionIndex = 1; rbMainAxis = sal_True; break; 543cdf0e10cSrcweir case Z_AXIS: 544cdf0e10cSrcweir rnDimensionIndex = 2; rbMainAxis = sal_True; break; 545cdf0e10cSrcweir case SECOND_X_AXIS: 546cdf0e10cSrcweir rnDimensionIndex = 0; rbMainAxis = sal_False; break; 547cdf0e10cSrcweir case SECOND_Y_AXIS: 548cdf0e10cSrcweir rnDimensionIndex = 1; rbMainAxis = sal_False; break; 549cdf0e10cSrcweir } 550cdf0e10cSrcweir } 551cdf0e10cSrcweir 552cdf0e10cSrcweir // ____ XComponent ____ 553cdf0e10cSrcweir void SAL_CALL AxisWrapper::dispose() 554cdf0e10cSrcweir throw (uno::RuntimeException) 555cdf0e10cSrcweir { 556cdf0e10cSrcweir Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); 557cdf0e10cSrcweir m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) ); 558cdf0e10cSrcweir 559cdf0e10cSrcweir DisposeHelper::DisposeAndClear( m_xAxisTitle ); 560cdf0e10cSrcweir DisposeHelper::DisposeAndClear( m_xMajorGrid ); 561cdf0e10cSrcweir DisposeHelper::DisposeAndClear( m_xMinorGrid ); 562cdf0e10cSrcweir 563cdf0e10cSrcweir clearWrappedPropertySet(); 564cdf0e10cSrcweir } 565cdf0e10cSrcweir 566cdf0e10cSrcweir void SAL_CALL AxisWrapper::addEventListener( 567cdf0e10cSrcweir const Reference< lang::XEventListener >& xListener ) 568cdf0e10cSrcweir throw (uno::RuntimeException) 569cdf0e10cSrcweir { 570cdf0e10cSrcweir m_aEventListenerContainer.addInterface( xListener ); 571cdf0e10cSrcweir } 572cdf0e10cSrcweir 573cdf0e10cSrcweir void SAL_CALL AxisWrapper::removeEventListener( 574cdf0e10cSrcweir const Reference< lang::XEventListener >& aListener ) 575cdf0e10cSrcweir throw (uno::RuntimeException) 576cdf0e10cSrcweir { 577cdf0e10cSrcweir m_aEventListenerContainer.removeInterface( aListener ); 578cdf0e10cSrcweir } 579cdf0e10cSrcweir 580cdf0e10cSrcweir // ================================================================================ 581cdf0e10cSrcweir 582cdf0e10cSrcweir //ReferenceSizePropertyProvider 583cdf0e10cSrcweir void AxisWrapper::updateReferenceSize() 584cdf0e10cSrcweir { 585cdf0e10cSrcweir Reference< beans::XPropertySet > xProp( this->getAxis(), uno::UNO_QUERY ); 586cdf0e10cSrcweir if( xProp.is() ) 587cdf0e10cSrcweir { 588cdf0e10cSrcweir if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() ) 589cdf0e10cSrcweir xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny( 590cdf0e10cSrcweir m_spChart2ModelContact->GetPageSize() )); 591cdf0e10cSrcweir } 592cdf0e10cSrcweir } 593cdf0e10cSrcweir Any AxisWrapper::getReferenceSize() 594cdf0e10cSrcweir { 595cdf0e10cSrcweir Any aRet; 596cdf0e10cSrcweir Reference< beans::XPropertySet > xProp( this->getAxis(), uno::UNO_QUERY ); 597cdf0e10cSrcweir if( xProp.is() ) 598cdf0e10cSrcweir aRet = xProp->getPropertyValue( C2U("ReferencePageSize") ); 599cdf0e10cSrcweir return aRet; 600cdf0e10cSrcweir } 601cdf0e10cSrcweir awt::Size AxisWrapper::getCurrentSizeForReference() 602cdf0e10cSrcweir { 603cdf0e10cSrcweir return m_spChart2ModelContact->GetPageSize(); 604cdf0e10cSrcweir } 605cdf0e10cSrcweir 606cdf0e10cSrcweir // ================================================================================ 607cdf0e10cSrcweir 608cdf0e10cSrcweir Reference< chart2::XAxis > AxisWrapper::getAxis() 609cdf0e10cSrcweir { 610cdf0e10cSrcweir Reference< chart2::XAxis > xAxis; 611cdf0e10cSrcweir try 612cdf0e10cSrcweir { 613cdf0e10cSrcweir sal_Int32 nDimensionIndex = 0; 614cdf0e10cSrcweir sal_Bool bMainAxis = sal_True; 615cdf0e10cSrcweir AxisWrapper::getDimensionAndMainAxisBool( m_eType, nDimensionIndex, bMainAxis ); 616cdf0e10cSrcweir 617cdf0e10cSrcweir Reference< XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() ); 618cdf0e10cSrcweir xAxis = AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ); 619cdf0e10cSrcweir if( !xAxis.is() ) 620cdf0e10cSrcweir { 621cdf0e10cSrcweir xAxis = AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, m_spChart2ModelContact->m_xContext ); 622cdf0e10cSrcweir Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY ); 623cdf0e10cSrcweir if( xProp.is() ) 624cdf0e10cSrcweir xProp->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_False ) ); 625cdf0e10cSrcweir } 626cdf0e10cSrcweir } 627cdf0e10cSrcweir catch( uno::Exception & ex ) 628cdf0e10cSrcweir { 629cdf0e10cSrcweir ASSERT_EXCEPTION( ex ); 630cdf0e10cSrcweir } 631cdf0e10cSrcweir return xAxis; 632cdf0e10cSrcweir } 633cdf0e10cSrcweir 634cdf0e10cSrcweir // WrappedPropertySet 635cdf0e10cSrcweir Reference< beans::XPropertySet > AxisWrapper::getInnerPropertySet() 636cdf0e10cSrcweir { 637cdf0e10cSrcweir return Reference< beans::XPropertySet >( this->getAxis(), uno::UNO_QUERY ); 638cdf0e10cSrcweir } 639cdf0e10cSrcweir 640cdf0e10cSrcweir const Sequence< beans::Property >& AxisWrapper::getPropertySequence() 641cdf0e10cSrcweir { 642cdf0e10cSrcweir return *StaticAxisWrapperPropertyArray::get(); 643cdf0e10cSrcweir } 644cdf0e10cSrcweir 645cdf0e10cSrcweir const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties() 646cdf0e10cSrcweir { 647cdf0e10cSrcweir ::std::vector< ::chart::WrappedProperty* > aWrappedProperties; 648cdf0e10cSrcweir 649cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedTextRotationProperty() ); 650cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "Marks" ), C2U( "MajorTickmarks" ) ) ); 651cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "HelpMarks" ), C2U( "MinorTickmarks" ) ) ); 652cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "TextCanOverlap" ), C2U( "TextOverlap" ) ) ); 653cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "ArrangeOrder" ), C2U( "ArrangeOrder" ) ) ); 654cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "Visible" ), C2U( "Show" ) ) ); 655cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U( "DisplayLabels" ), C2U( "DisplayLabels" ) ) ); 656cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U( "TextBreak" ), C2U( "TextBreak" ) ) ); 657cdf0e10cSrcweir WrappedNumberFormatProperty* pWrappedNumberFormatProperty = new WrappedNumberFormatProperty( m_spChart2ModelContact ); 658cdf0e10cSrcweir aWrappedProperties.push_back( pWrappedNumberFormatProperty ); 659cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedLinkNumberFormatProperty(pWrappedNumberFormatProperty) ); 660cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedProperty( C2U( "StackedText" ), C2U( "StackCharacters" ) ) ); 661cdf0e10cSrcweir aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U( "CrossoverPosition" ), C2U( "CrossoverPosition" ) ) ); 662cdf0e10cSrcweir { 663cdf0e10cSrcweir WrappedGapwidthProperty* pWrappedGapwidthProperty( new WrappedGapwidthProperty( m_spChart2ModelContact ) ); 664cdf0e10cSrcweir WrappedBarOverlapProperty* pWrappedBarOverlapProperty( new WrappedBarOverlapProperty( m_spChart2ModelContact ) ); 665cdf0e10cSrcweir sal_Int32 nDimensionIndex = 0; 666cdf0e10cSrcweir sal_Bool bMainAxis = sal_True; 667cdf0e10cSrcweir sal_Int32 nAxisIndex = 0; 668cdf0e10cSrcweir AxisWrapper::getDimensionAndMainAxisBool( m_eType, nDimensionIndex, bMainAxis ); 669cdf0e10cSrcweir if( !bMainAxis ) 670cdf0e10cSrcweir nAxisIndex = 1; 671cdf0e10cSrcweir pWrappedGapwidthProperty->setDimensionAndAxisIndex( nDimensionIndex, nAxisIndex ); 672cdf0e10cSrcweir pWrappedBarOverlapProperty->setDimensionAndAxisIndex( nDimensionIndex, nAxisIndex ); 673cdf0e10cSrcweir aWrappedProperties.push_back( pWrappedGapwidthProperty ); 674cdf0e10cSrcweir aWrappedProperties.push_back( pWrappedBarOverlapProperty ); 675cdf0e10cSrcweir } 676cdf0e10cSrcweir 677cdf0e10cSrcweir WrappedScaleProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); 678cdf0e10cSrcweir 679cdf0e10cSrcweir WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this ); 680cdf0e10cSrcweir WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); 681cdf0e10cSrcweir 682cdf0e10cSrcweir return aWrappedProperties; 683cdf0e10cSrcweir } 684cdf0e10cSrcweir 685cdf0e10cSrcweir // ================================================================================ 686cdf0e10cSrcweir 687cdf0e10cSrcweir Sequence< OUString > AxisWrapper::getSupportedServiceNames_Static() 688cdf0e10cSrcweir { 689cdf0e10cSrcweir Sequence< OUString > aServices( 3 ); 690cdf0e10cSrcweir aServices[ 0 ] = C2U( "com.sun.star.chart.ChartAxis" ); 691cdf0e10cSrcweir aServices[ 1 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); 692cdf0e10cSrcweir aServices[ 2 ] = C2U( "com.sun.star.style.CharacterProperties" ); 693cdf0e10cSrcweir // aServices[ 3 ] = C2U( "com.sun.star.beans.PropertySet" ); 694cdf0e10cSrcweir // aServices[ 4 ] = C2U( "com.sun.star.drawing.LineProperties" ); 695cdf0e10cSrcweir 696cdf0e10cSrcweir return aServices; 697cdf0e10cSrcweir } 698cdf0e10cSrcweir 699cdf0e10cSrcweir // implement XServiceInfo methods basing upon getSupportedServiceNames_Static 700cdf0e10cSrcweir APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, lcl_aServiceName ); 701cdf0e10cSrcweir 702cdf0e10cSrcweir } // namespace wrapper 703cdf0e10cSrcweir } // namespace chart 704