1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CHART2_SOURCE_INC_CHARTTYPEHELPER_HXX
21 #define INCLUDED_CHART2_SOURCE_INC_CHARTTYPEHELPER_HXX
23 #include <com/sun/star/chart2/XChartType.hpp>
24 #include <com/sun/star/chart2/AxisType.hpp>
25 #include <com/sun/star/chart2/XDataSeries.hpp>
26 #include <com/sun/star/chart2/XDiagram.hpp>
27 #include <com/sun/star/drawing/Direction3D.hpp>
28 #include "charttoolsdllapi.hxx"
36 class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
39 static bool isSupportingGeometryProperties( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
40 static bool isSupportingStatisticProperties( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
41 static bool isSupportingRegressionProperties(const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
42 static bool isSupportingMainAxis( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
43 static bool isSupportingSecondaryAxis( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
44 static bool isSupportingAreaProperties( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
45 static bool isSupportingSymbolProperties( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
46 static bool isSupportingOverlapAndGapWidthProperties( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
47 static bool isSupportingBarConnectors( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
48 static bool isSupportingRightAngledAxes( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
49 static bool isSupportingAxisSideBySide( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
50 static bool isSupportingStartingAngle( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
51 //starting value for bars or baseline for areas for example
52 static bool isSupportingBaseValue( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
53 static bool shiftCategoryPosAtXAxisPerDefault( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
54 static bool isSupportingAxisPositioning( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
55 static bool isSupportingDateAxis( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
57 //returns sequence of ::com::sun::star::chart::DataLabelPlacement
58 static ::com::sun::star::uno::Sequence
< sal_Int32
> getSupportedLabelPlacements(
59 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, bool bSwapXAndY
60 , const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& xSeries
);
62 //returns sequence of ::com::sun::star::chart::MissingValueTreatment
63 static ::com::sun::star::uno::Sequence
< sal_Int32
> getSupportedMissingValueTreatments(
64 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
66 SAL_DLLPRIVATE
static ::com::sun::star::drawing::Direction3D
getDefaultSimpleLightDirection( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
67 SAL_DLLPRIVATE
static ::com::sun::star::drawing::Direction3D
getDefaultRealisticLightDirection( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
68 SAL_DLLPRIVATE
static sal_Int32
getDefaultDirectLightColor( bool bSimple
, const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
69 SAL_DLLPRIVATE
static sal_Int32
getDefaultAmbientLightColor( bool bSimple
, const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
70 static sal_Int32
getNumberOfDisplayedSeries( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
, sal_Int32 nNumberOfSeries
);
71 SAL_DLLPRIVATE
static bool noBordersForSimpleScheme( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
73 static bool isSeriesInFrontOfAxisLine( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
75 static sal_Int32
//one of ::com::sun::star::chart2::AxisType
76 getAxisType( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
77 , sal_Int32 nDimensionIndex
);
79 static OUString
getRoleOfSequenceForYAxisNumberFormatDetection( const ::com::sun::star::uno::Reference
<
80 ::com::sun::star::chart2::XChartType
>& xChartType
);
82 static OUString
getRoleOfSequenceForDataLabelNumberFormatDetection( const ::com::sun::star::uno::Reference
<
83 ::com::sun::star::chart2::XChartType
>& xChartType
);
85 static bool shouldLabelNumberFormatKeyBeDetectedFromYAxis( const ::com::sun::star::uno::Reference
<
86 ::com::sun::star::chart2::XChartType
>& xChartType
);
88 static bool isSupportingOnlyDeepStackingFor3D( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>& xChartType
);
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */