1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef CHART2_DIAGRAMHELPER_HXX 28*cdf0e10cSrcweir #define CHART2_DIAGRAMHELPER_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include "StackMode.hxx" 31*cdf0e10cSrcweir #include "charttoolsdllapi.hxx" 32*cdf0e10cSrcweir #include <com/sun/star/chart2/XAxis.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/chart2/XDiagram.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/chart2/XChartTypeTemplate.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/chart2/XCoordinateSystem.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/chart2/InterpretedData.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/chart2/StackingDirection.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/chart2/XChartDocument.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormats.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir #include <utility> 45*cdf0e10cSrcweir #include <vector> 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir namespace chart 49*cdf0e10cSrcweir { 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir enum DiagramPositioningMode 52*cdf0e10cSrcweir { 53*cdf0e10cSrcweir DiagramPositioningMode_AUTO, 54*cdf0e10cSrcweir DiagramPositioningMode_EXCLUDING, 55*cdf0e10cSrcweir DiagramPositioningMode_INCLUDING 56*cdf0e10cSrcweir }; 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper 59*cdf0e10cSrcweir { 60*cdf0e10cSrcweir public: 61*cdf0e10cSrcweir typedef ::std::pair< 62*cdf0e10cSrcweir ::com::sun::star::uno::Reference< 63*cdf0e10cSrcweir ::com::sun::star::chart2::XChartTypeTemplate >, 64*cdf0e10cSrcweir ::rtl::OUString > 65*cdf0e10cSrcweir tTemplateWithServiceName; 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir /** tries to find a template in the chart-type manager that matches the 68*cdf0e10cSrcweir given diagram. 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir @param rPreferredTemplateName 71*cdf0e10cSrcweir Check this template first. This may speed up searching, if the 72*cdf0e10cSrcweir caller assumes a certain template as most likely to be the one that 73*cdf0e10cSrcweir matches. 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir @return 76*cdf0e10cSrcweir A pair containing a template with the correct properties set as 77*cdf0e10cSrcweir first entry and the service name of the templateas second entry. If 78*cdf0e10cSrcweir no template was found both elements are empty. 79*cdf0e10cSrcweir */ 80*cdf0e10cSrcweir static tTemplateWithServiceName 81*cdf0e10cSrcweir getTemplateForDiagram( 82*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 83*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 84*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 85*cdf0e10cSrcweir ::com::sun::star::lang::XMultiServiceFactory > & xChartTypeManager, 86*cdf0e10cSrcweir const ::rtl::OUString & rPreferredTemplateName = ::rtl::OUString()); 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the 89*cdf0e10cSrcweir given diagram. 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir "vertical==true" for bar charts, "vertical==false" for column charts 92*cdf0e10cSrcweir */ 93*cdf0e10cSrcweir static void setVertical( const ::com::sun::star::uno::Reference< 94*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 95*cdf0e10cSrcweir bool bVertical = true ); 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir /** Gets the "SwapXAndYAxis" property at all coordinate systems found in the 98*cdf0e10cSrcweir given diagram. 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir "vertical==true" for bar charts, "vertical==false" for column charts 101*cdf0e10cSrcweir */ 102*cdf0e10cSrcweir static bool getVertical( const ::com::sun::star::uno::Reference< 103*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 104*cdf0e10cSrcweir bool& rbOutFoundResult, bool& rbOutAmbiguousResult ); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir static StackMode getStackMode( 107*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 108*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 109*cdf0e10cSrcweir bool& rbFound, bool& rbAmbiguous 110*cdf0e10cSrcweir ); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir /** @param bOnlyAtFirstChartType 113*cdf0e10cSrcweir If </sal_True>, the stacking mode is only set at the series found inside 114*cdf0e10cSrcweir the first chart type. This is the standard for all current 115*cdf0e10cSrcweir templates (the only template that has more than one chart-type and 116*cdf0e10cSrcweir allows stacking is bar/line combi, and for this the stacking only 117*cdf0e10cSrcweir applies to the first chart type/the bars) 118*cdf0e10cSrcweir */ 119*cdf0e10cSrcweir static void setStackMode( 120*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 121*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 122*cdf0e10cSrcweir StackMode eStackMode, 123*cdf0e10cSrcweir bool bOnlyAtFirstChartType = true 124*cdf0e10cSrcweir ); 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir /** Retrieves the stackmode of the first DataSeries or none. If the series have differing stack 127*cdf0e10cSrcweir modes, rbAmbiguous is set to true. If no series is there rbFound is set to false. 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir @param xCorrespondingCoordinateSystem 130*cdf0e10cSrcweir The coordinate system in which the given chart type xChartType is 131*cdf0e10cSrcweir located. (This is needed for determining percent stacking. If 132*cdf0e10cSrcweir omitted, the result will just indicate "not stacked", "stacked" or 133*cdf0e10cSrcweir "ambiguous") 134*cdf0e10cSrcweir */ 135*cdf0e10cSrcweir static StackMode getStackModeFromChartType( 136*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 137*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType > & xChartType, 138*cdf0e10cSrcweir bool& rbFound, bool& rbAmbiguous, 139*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 140*cdf0e10cSrcweir ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem = 141*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem >() 142*cdf0e10cSrcweir ); 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir /** Returns the dimension found for all chart types in the tree. If the 145*cdf0e10cSrcweir dimension is not unique, 0 is returned. 146*cdf0e10cSrcweir */ 147*cdf0e10cSrcweir static sal_Int32 getDimension( 148*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 149*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir /** Sets the dimension of the diagram given. 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir 1. Sets the dimension of all used ChartTypes 154*cdf0e10cSrcweir 2. Adapts the DataSeriesTree to reflect the new dimension 155*cdf0e10cSrcweir 3. If new coordinate-systems have to be created, adapts the 156*cdf0e10cSrcweir XCoordinateSystemContainer of the diagram. 157*cdf0e10cSrcweir */ 158*cdf0e10cSrcweir static void setDimension( 159*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 160*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 161*cdf0e10cSrcweir sal_Int32 nNewDimensionCount ); 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir /** Replaces all occurences of xCooSysToReplace in the tree with 164*cdf0e10cSrcweir xReplacement in the diagram's tree 165*cdf0e10cSrcweir */ 166*cdf0e10cSrcweir SAL_DLLPRIVATE static void replaceCoordinateSystem( 167*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 168*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 169*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 170*cdf0e10cSrcweir ::com::sun::star::chart2::XCoordinateSystem > & xCooSysToReplace, 171*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 172*cdf0e10cSrcweir ::com::sun::star::chart2::XCoordinateSystem > & xReplacement ); 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir static bool isSeriesAttachedToMainAxis( 175*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 176*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xDataSeries ); 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir static bool attachSeriesToAxis( bool bMainAxis, 179*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 180*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xSeries, 181*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 182*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, 183*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 184*cdf0e10cSrcweir ::com::sun::star::uno::XComponentContext > & xContext, 185*cdf0e10cSrcweir bool bAdaptAxes=true ); 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir static ::com::sun::star::uno::Reference< 188*cdf0e10cSrcweir ::com::sun::star::chart2::XAxis > getAttachedAxis( 189*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 190*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xSeries, 191*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 192*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram ); 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir static ::com::sun::star::uno::Reference< 195*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType > 196*cdf0e10cSrcweir getChartTypeOfSeries( 197*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 198*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, 199*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 200*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xSeries ); 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir static ::std::vector< 203*cdf0e10cSrcweir ::com::sun::star::uno::Reference< 204*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries > > 205*cdf0e10cSrcweir getDataSeriesFromDiagram( 206*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 207*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir /** return all data series in this diagram grouped by chart-types 210*cdf0e10cSrcweir */ 211*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< 212*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< 213*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > > 214*cdf0e10cSrcweir getDataSeriesGroups( 215*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 216*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir static bool isCategoryDiagram( 219*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 220*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram ); 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir static void setCategoriesToDiagram( 223*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 224*cdf0e10cSrcweir ::com::sun::star::chart2::data::XLabeledDataSequence >& xCategories, 225*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 226*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, 227*cdf0e10cSrcweir bool bSetAxisType = false, // when this flag is true ... 228*cdf0e10cSrcweir bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > 231*cdf0e10cSrcweir getCategoriesFromDiagram( 232*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 233*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< rtl::OUString > 236*cdf0e10cSrcweir getExplicitSimpleCategories( 237*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 238*cdf0e10cSrcweir ::com::sun::star::chart2::XChartDocument > & xChartDoc ); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< rtl::OUString > 241*cdf0e10cSrcweir generateAutomaticCategoriesFromCooSys( 242*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 243*cdf0e10cSrcweir ::com::sun::star::chart2::XCoordinateSystem > & xCooSys ); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir static void switchToDateCategories( 246*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 247*cdf0e10cSrcweir ::com::sun::star::chart2::XChartDocument > & xChartDoc ); 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir static void switchToTextCategories( 250*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 251*cdf0e10cSrcweir ::com::sun::star::chart2::XChartDocument > & xChartDoc ); 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir static bool isSupportingDateAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram ); 254*cdf0e10cSrcweir static bool isDateNumberFormat( sal_Int32 nNumberFormat, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& xNumberFormats ); 255*cdf0e10cSrcweir static sal_Int32 getDateNumberFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier ); 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir static sal_Int32 getPercentNumberFormat( const ::com::sun::star::uno::Reference< 258*cdf0e10cSrcweir ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier ); 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir static ::com::sun::star::uno::Reference< 261*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType > 262*cdf0e10cSrcweir getChartTypeByIndex( const ::com::sun::star::uno::Reference< 263*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, sal_Int32 nIndex ); 264*cdf0e10cSrcweir 265*cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< 266*cdf0e10cSrcweir ::com::sun::star::uno::Reference< 267*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType > > 268*cdf0e10cSrcweir getChartTypesFromDiagram( 269*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 270*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir SAL_DLLPRIVATE static bool areChartTypesCompatible( const ::com::sun::star::uno::Reference< 273*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType >& xFirstType, 274*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 275*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType >& xSecondType ); 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir /** 279*cdf0e10cSrcweir * Test if a series can be moved. 280*cdf0e10cSrcweir * 281*cdf0e10cSrcweir * @param xDiagram 282*cdf0e10cSrcweir * Reference to the diagram that contains the series. 283*cdf0e10cSrcweir * 284*cdf0e10cSrcweir * @param xGivenDataSeries 285*cdf0e10cSrcweir * Reference to the series that should be tested for moving. 286*cdf0e10cSrcweir * 287*cdf0e10cSrcweir * @param bForward 288*cdf0e10cSrcweir * Direction of the move to be checked. 289*cdf0e10cSrcweir * 290*cdf0e10cSrcweir * @returns </sal_True> if the series can be moved. 291*cdf0e10cSrcweir * 292*cdf0e10cSrcweir */ 293*cdf0e10cSrcweir static bool isSeriesMoveable( 294*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 295*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, 296*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 297*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xGivenDataSeries, 298*cdf0e10cSrcweir bool bForward ); 299*cdf0e10cSrcweir 300*cdf0e10cSrcweir /** 301*cdf0e10cSrcweir * Move a series forward or backward. 302*cdf0e10cSrcweir * 303*cdf0e10cSrcweir * @param xDiagram 304*cdf0e10cSrcweir * Reference to the diagram that contains the series. 305*cdf0e10cSrcweir * 306*cdf0e10cSrcweir * @param xGivenDataSeries 307*cdf0e10cSrcweir * Reference to the series that should be moved. 308*cdf0e10cSrcweir * 309*cdf0e10cSrcweir * @param bForward 310*cdf0e10cSrcweir * Direction in which the series should be moved. 311*cdf0e10cSrcweir * 312*cdf0e10cSrcweir * @returns </sal_True> if the series was moved successfully. 313*cdf0e10cSrcweir * 314*cdf0e10cSrcweir */ 315*cdf0e10cSrcweir static bool moveSeries( 316*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 317*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram, 318*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 319*cdf0e10cSrcweir ::com::sun::star::chart2::XDataSeries >& xGivenDataSeries, 320*cdf0e10cSrcweir bool bForward ); 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir static bool isSupportingFloorAndWall( const ::com::sun::star::uno::Reference< 323*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir static bool isPieOrDonutChart( const ::com::sun::star::uno::Reference< 326*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram >& xDiagram ); 327*cdf0e10cSrcweir 328*cdf0e10cSrcweir static sal_Int32 getGeometry3D( 329*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 330*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 331*cdf0e10cSrcweir bool& rbFound, bool& rbAmbiguous ); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir static void setGeometry3D( 334*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 335*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 336*cdf0e10cSrcweir sal_Int32 nNewGeometry ); 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir //returns integer from constant group ::com::sun::star::chart::MissingValueTreatment 339*cdf0e10cSrcweir static sal_Int32 getCorrectedMissingValueTreatment( 340*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 341*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram, 342*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 343*cdf0e10cSrcweir ::com::sun::star::chart2::XChartType >& xChartType ); 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir static DiagramPositioningMode getDiagramPositioningMode( const ::com::sun::star::uno::Reference< 346*cdf0e10cSrcweir ::com::sun::star::chart2::XDiagram > & xDiagram ); 347*cdf0e10cSrcweir 348*cdf0e10cSrcweir static bool setDiagramPositioning( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, 349*cdf0e10cSrcweir const ::com::sun::star::awt::Rectangle& rPosRect /*100th mm*/ ); 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir static ::com::sun::star::awt::Rectangle getDiagramRectangleFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel ); 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir static bool switchDiagramPositioningToExcludingPositioning( const ::com::sun::star::uno::Reference< 354*cdf0e10cSrcweir ::com::sun::star::frame::XModel >& xChartModel 355*cdf0e10cSrcweir , bool bResetModifiedState //set model back to unchanged if it was unchanged before 356*cdf0e10cSrcweir , bool bConvertAlsoFromAutoPositioning ); 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir private: 359*cdf0e10cSrcweir // not implemented 360*cdf0e10cSrcweir DiagramHelper(); 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir }; 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir } // namespace chart 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir // CHART2_DIAGRAMHELPER_HXX 367*cdf0e10cSrcweir #endif 368