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