Update ooo320-m1
[ooovba.git] / chart2 / source / inc / ChartTypeHelper.hxx
blob4aeba157f5c9f7edb5b708d9c318ac8ad27997c1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ChartTypeHelper.hxx,v $
10 * $Revision: 1.16 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CHART2_CHARTTYPEHELPER_HXX
32 #define _CHART2_CHARTTYPEHELPER_HXX
34 #include <com/sun/star/chart2/XChartType.hpp>
35 #include <com/sun/star/chart2/AxisType.hpp>
36 #include <com/sun/star/chart2/XDataSeries.hpp>
37 #include <com/sun/star/chart2/XDiagram.hpp>
38 #include <com/sun/star/drawing/Direction3D.hpp>
39 #include "charttoolsdllapi.hxx"
41 //.............................................................................
42 namespace chart
44 //.............................................................................
46 //-----------------------------------------------------------------------------
47 /**
50 class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
52 public:
53 static sal_Bool isSupportingGeometryProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
54 static sal_Bool isSupportingStatisticProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
55 static sal_Bool isSupportingRegressionProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
56 static sal_Bool isSupportingMainAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
57 static sal_Bool isSupportingSecondaryAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
58 static sal_Bool isSupportingAreaProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
59 static sal_Bool isSupportingSymbolProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
60 static sal_Bool isSupportingOverlapAndGapWidthProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
61 static sal_Bool isSupportingBarConnectors( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
62 static sal_Bool isSupportingRightAngledAxes( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
63 static bool isSupportingAxisSideBySide( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
64 static bool isSupportingStartingAngle( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
65 //starting value for bars or baseline for areas for example
66 static bool isSupportingBaseValue( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
67 static bool shiftTicksAtXAxisPerDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
68 static bool isSupportingAxisPositioning( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
70 //returns sequence of ::com::sun::star::chart::DataLabelPlacement
71 static ::com::sun::star::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
72 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Bool bSwapXAndY
73 , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries );
75 //returns sequence of ::com::sun::star::chart::MissingValueTreatment
76 static ::com::sun::star::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments(
77 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
79 SAL_DLLPRIVATE static ::com::sun::star::drawing::Direction3D getDefaultSimpleLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
80 SAL_DLLPRIVATE static ::com::sun::star::drawing::Direction3D getDefaultRealisticLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
81 SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
82 SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
83 static sal_Int32 getNumberOfDisplayedSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nNumberOfSeries );
84 SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
86 static bool isSeriesInFrontOfAxisLine( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
88 static sal_Int32 //one of ::com::sun::star::chart2::AxisType
89 getAxisType( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType
90 , sal_Int32 nDimensionIndex );
92 static rtl::OUString getRoleOfSequenceForYAxisNumberFormatDetection( const ::com::sun::star::uno::Reference<
93 ::com::sun::star::chart2::XChartType >& xChartType );
95 static rtl::OUString getRoleOfSequenceForDataLabelNumberFormatDetection( const ::com::sun::star::uno::Reference<
96 ::com::sun::star::chart2::XChartType >& xChartType );
98 static bool shouldLabelNumberFormatKeyBeDetectedFromYAxis( const ::com::sun::star::uno::Reference<
99 ::com::sun::star::chart2::XChartType >& xChartType );
101 static bool isSupportingOnlyDeepStackingFor3D( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
104 //.............................................................................
105 } //namespace chart
106 //.............................................................................
107 #endif