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/drawing/Direction3D.hpp>
24 #include "charttoolsdllapi.hxx"
26 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XChartType
; } } } }
27 namespace com
{ namespace sun
{ namespace star
{ namespace chart2
{ class XDataSeries
; } } } }
32 class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
35 static bool isSupportingGeometryProperties( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
36 static bool isSupportingStatisticProperties( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
37 static bool isSupportingRegressionProperties(const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
38 static bool isSupportingMainAxis( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
39 static bool isSupportingSecondaryAxis( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
40 static bool isSupportingAreaProperties( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
41 static bool isSupportingSymbolProperties( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
42 static bool isSupportingOverlapAndGapWidthProperties( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
43 static bool isSupportingBarConnectors( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
44 static bool isSupportingRightAngledAxes( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
45 static bool isSupportingAxisSideBySide( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
);
46 static bool isSupportingStartingAngle( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
47 //starting value for bars or baseline for areas for example
48 static bool isSupportingBaseValue( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
49 static bool shiftCategoryPosAtXAxisPerDefault( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
50 static bool isSupportingAxisPositioning( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionCount
, sal_Int32 nDimensionIndex
);
51 static bool isSupportingDateAxis( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nDimensionIndex
);
53 //returns sequence of css::chart::DataLabelPlacement
54 static css::uno::Sequence
< sal_Int32
> getSupportedLabelPlacements(
55 const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, bool bSwapXAndY
56 , const css::uno::Reference
< css::chart2::XDataSeries
>& xSeries
);
58 //returns sequence of css::chart::MissingValueTreatment
59 static css::uno::Sequence
< sal_Int32
> getSupportedMissingValueTreatments(
60 const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
62 SAL_DLLPRIVATE
static css::drawing::Direction3D
getDefaultSimpleLightDirection( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
63 SAL_DLLPRIVATE
static css::drawing::Direction3D
getDefaultRealisticLightDirection( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
64 SAL_DLLPRIVATE
static sal_Int32
getDefaultDirectLightColor( bool bSimple
, const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
65 SAL_DLLPRIVATE
static sal_Int32
getDefaultAmbientLightColor( bool bSimple
, const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
66 static sal_Int32
getNumberOfDisplayedSeries( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
, sal_Int32 nNumberOfSeries
);
67 SAL_DLLPRIVATE
static bool noBordersForSimpleScheme( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
69 static bool isSeriesInFrontOfAxisLine( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
71 static sal_Int32
//one of css::chart2::AxisType
72 getAxisType( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
73 , sal_Int32 nDimensionIndex
);
75 static OUString
getRoleOfSequenceForYAxisNumberFormatDetection( const css::uno::Reference
<
76 css::chart2::XChartType
>& xChartType
);
78 static OUString
getRoleOfSequenceForDataLabelNumberFormatDetection( const css::uno::Reference
<
79 css::chart2::XChartType
>& xChartType
);
81 static bool shouldLabelNumberFormatKeyBeDetectedFromYAxis( const css::uno::Reference
<
82 css::chart2::XChartType
>& xChartType
);
84 static bool isSupportingOnlyDeepStackingFor3D( const css::uno::Reference
< css::chart2::XChartType
>& xChartType
);
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */