27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/chart/DataLabelPlacement.hpp>
29#include <com/sun/star/chart/MissingValueTreatment.hpp>
30#include <com/sun/star/chart2/AxisType.hpp>
31#include <com/sun/star/chart2/StackingDirection.hpp>
32#include <com/sun/star/chart2/XDataSeries.hpp>
47 if( xChartType.is() &&
51 bool bAmbiguous=
false;
55 OUString aChartTypeName = xChartType->getChartType();
71 if(nDimensionCount==3)
73 OUString aChartTypeName = xChartType->getChartType();
90 if(nDimensionCount==3)
93 OUString aChartTypeName = xChartType->getChartType();
121 if(nDimensionCount==2)
123 OUString aChartTypeName = xChartType->getChartType();
144 if(nDimensionCount==3)
147 OUString aChartTypeName = xChartType->getChartType();
166 OUString aChartTypeName = xChartType->getChartType();
170 if( nDimensionIndex == 2 )
171 return nDimensionCount == 3;
183 if(nDimensionCount==3)
186 OUString aChartTypeName = xChartType->getChartType();
205 if(nDimensionCount==3)
208 OUString aChartTypeName = xChartType->getChartType();
225 if(nDimensionCount==3)
229 bool bAmbiguous=
false;
234 OUString aChartTypeName = xChartType->getChartType();
248 if( !xChartType.is() )
251 OUString aChartTypeName = xChartType->getChartType();
260 sal_Int32* pSeq = aRet.getArray();
261 *pSeq++ = css::chart::DataLabelPlacement::AVOID_OVERLAP;
262 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
263 *pSeq++ = css::chart::DataLabelPlacement::INSIDE;
264 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
265 *pSeq++ = css::chart::DataLabelPlacement::CUSTOM;
270 sal_Int32* pSeq = aRet.getArray();
271 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
280 sal_Int32* pSeq = aRet.getArray();
281 *pSeq++ = css::chart::DataLabelPlacement::TOP;
282 *pSeq++ = css::chart::DataLabelPlacement::BOTTOM;
283 *pSeq++ = css::chart::DataLabelPlacement::LEFT;
284 *pSeq++ = css::chart::DataLabelPlacement::RIGHT;
285 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
291 bool bStacked =
false;
293 chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING;
295 bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
298 aRet.realloc( bStacked ? 3 : 6 );
299 sal_Int32* pSeq = aRet.getArray();
304 *pSeq++ = css::chart::DataLabelPlacement::RIGHT;
305 *pSeq++ = css::chart::DataLabelPlacement::LEFT;
309 *pSeq++ = css::chart::DataLabelPlacement::TOP;
310 *pSeq++ = css::chart::DataLabelPlacement::BOTTOM;
313 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
315 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
316 *pSeq++ = css::chart::DataLabelPlacement::INSIDE;
317 *pSeq++ = css::chart::DataLabelPlacement::NEAR_ORIGIN;
321 bool bStacked =
false;
323 chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING;
325 bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
329 sal_Int32* pSeq = aRet.getArray();
332 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
333 *pSeq++ = css::chart::DataLabelPlacement::TOP;
337 *pSeq++ = css::chart::DataLabelPlacement::TOP;
338 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
344 sal_Int32* pSeq = aRet.getArray();
345 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
346 *pSeq++ = css::chart::DataLabelPlacement::TOP;
347 *pSeq++ = css::chart::DataLabelPlacement::BOTTOM;
348 *pSeq++ = css::chart::DataLabelPlacement::LEFT;
349 *pSeq++ = css::chart::DataLabelPlacement::RIGHT;
350 *pSeq++ = css::chart::DataLabelPlacement::CENTER;
355 sal_Int32* pSeq = aRet.getArray();
356 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
361 sal_Int32* pSeq = aRet.getArray();
362 *pSeq++ = css::chart::DataLabelPlacement::OUTSIDE;
366 OSL_FAIL(
"unknown charttype" );
376 OUString aChartTypeName = xChartType->getChartType();
387 OUString aChartTypeName = xChartType->getChartType();
397 OUString aChartTypeName = xChartType->getChartType();
411 OUString aChartTypeName = xChartType->getChartType();
417 if( nDimensionCount==3 )
418 return nDimensionIndex<2;
424 if( nDimensionIndex!=0 )
426 if( xChartType.is() )
429 if(
nType != AxisType::CATEGORY )
431 OUString aChartTypeName = xChartType->getChartType();
444 if( xChartType.is() )
446 OUString aChartTypeName = xChartType->getChartType();
455 if( xChartType.is() )
457 OUString aChartTypeName = xChartType->getChartType();
462 else if (nDimensionCount == 2 &&
473 OUString aChartTypeName = xChartType->getChartType();
486 OUString aChartTypeName = xChartType->getChartType();
495 sal_Int32 nRet =
static_cast< sal_Int32
>( 0x808080 );
496 if( xChartType .is() )
498 OUString aChartType = xChartType->getChartType();
502 nRet =
static_cast< sal_Int32
>( 0x333333 );
504 nRet =
static_cast< sal_Int32
>( 0xb3b3b3 );
508 nRet =
static_cast< sal_Int32
>( 0x666666 );
515 sal_Int32 nRet =
static_cast< sal_Int32
>( 0x999999 );
516 if( xChartType .is() )
518 OUString aChartType = xChartType->getChartType();
522 nRet =
static_cast< sal_Int32
>( 0xcccccc );
524 nRet =
static_cast< sal_Int32
>( 0x666666 );
532 drawing::Direction3D aRet(0.0, 0.0, 1.0);
533 if( xChartType .is() )
535 OUString aChartType = xChartType->getChartType();
537 aRet = drawing::Direction3D(0.0, 0.8, 0.5);
540 aRet = drawing::Direction3D(0.9, 0.5, 0.05);
547 drawing::Direction3D aRet(0.0, 0.0, 1.0);
548 if( xChartType .is() )
550 OUString aChartType = xChartType->getChartType();
552 aRet = drawing::Direction3D(0.6, 0.6, 0.6);
555 aRet = drawing::Direction3D(0.9, 0.5, 0.05);
561 ChartType >& xChartType, sal_Int32 nDimensionIndex )
567 return AxisType::CATEGORY;
569 OUString aChartTypeName = xChartType->getChartType();
570 if(nDimensionIndex==2)
571 return AxisType::SERIES;
572 if(nDimensionIndex==1)
573 return AxisType::REALNUMBER;
574 if(nDimensionIndex==0)
578 return AxisType::REALNUMBER;
579 return AxisType::CATEGORY;
581 return AxisType::CATEGORY;
586 sal_Int32 nNumberOfSeries )
588 if( xChartType.is() )
592 OUString aChartTypeName = xChartType->getChartType();
599 return nNumberOfSeries>0 ? 1 : 0;
603 catch(
const uno::Exception & )
608 return nNumberOfSeries;
614 if( !xChartType.is() )
618 bool bAmbiguous=
false;
622 OUString aChartTypeName = xChartType->getChartType();
628 sal_Int32* pSeq = aRet.getArray();
629 *pSeq++ = css::chart::MissingValueTreatment::LEAVE_GAP;
630 *pSeq++ = css::chart::MissingValueTreatment::USE_ZERO;
634 aRet.realloc( bStacked ? 1 : 2 );
635 sal_Int32* pSeq = aRet.getArray();
636 *pSeq++ = css::chart::MissingValueTreatment::USE_ZERO;
638 *pSeq++ = css::chart::MissingValueTreatment::CONTINUE;
644 aRet.realloc( bStacked ? 2 : 3 );
645 sal_Int32* pSeq = aRet.getArray();
646 *pSeq++ = css::chart::MissingValueTreatment::LEAVE_GAP;
647 *pSeq++ = css::chart::MissingValueTreatment::USE_ZERO;
649 *pSeq++ = css::chart::MissingValueTreatment::CONTINUE;
654 sal_Int32* pSeq = aRet.getArray();
655 *pSeq++ = css::chart::MissingValueTreatment::CONTINUE;
656 *pSeq++ = css::chart::MissingValueTreatment::LEAVE_GAP;
657 *pSeq++ = css::chart::MissingValueTreatment::USE_ZERO;
666 OSL_FAIL(
"unknown charttype" );
674 if( xChartType.is() )
676 OUString aChartTypeName = xChartType->getChartType();
685 OUString aRet(
"values-y" );
686 if( !xChartType.is() )
688 OUString aChartTypeName = xChartType->getChartType();
690 aRet = xChartType->getRoleOfSequenceForSeriesLabel();
696 OUString aRet(
"values-y" );
697 if( !xChartType.is() )
699 OUString aChartTypeName = xChartType->getChartType();
702 aRet = xChartType->getRoleOfSequenceForSeriesLabel();
709 if( !xChartType.is() )
712 OUString aChartTypeName = xChartType->getChartType();
static bool isSupportingRegressionProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static SAL_DLLPRIVATE sal_Int32 getDefaultAmbientLightColor(bool bSimple, const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingAxisSideBySide(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static sal_Int32 getNumberOfDisplayedSeries(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nNumberOfSeries)
static bool isSupportingAxisPositioning(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex)
static css::uno::Sequence< sal_Int32 > getSupportedLabelPlacements(const rtl::Reference< ::chart::ChartType > &xChartType, bool bSwapXAndY, const rtl::Reference< ::chart::DataSeries > &xSeries)
static bool isSupportingBaseValue(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingOnlyDeepStackingFor3D(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool shiftCategoryPosAtXAxisPerDefault(const rtl::Reference< ::chart::ChartType > &xChartType)
static css::uno::Sequence< sal_Int32 > getSupportedMissingValueTreatments(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingAreaProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSeriesInFrontOfAxisLine(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingDateAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionIndex)
static bool isSupportingBarConnectors(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingComplexCategory(const rtl::Reference< ::chart::ChartType > &xChartType)
static OUString getRoleOfSequenceForYAxisNumberFormatDetection(const rtl::Reference< ::chart::ChartType > &xChartType)
static SAL_DLLPRIVATE sal_Int32 getDefaultDirectLightColor(bool bSimple, const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingCategoryPositioning(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static SAL_DLLPRIVATE css::drawing::Direction3D getDefaultRealisticLightDirection(const rtl::Reference< ::chart::ChartType > &xChartType)
static OUString getRoleOfSequenceForDataLabelNumberFormatDetection(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingMainAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex)
static bool isSupportingOverlapAndGapWidthProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static sal_Int32 getAxisType(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionIndex)
static bool isSupportingStatisticProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingStartingAngle(const rtl::Reference< ::chart::ChartType > &xChartType)
static SAL_DLLPRIVATE bool noBordersForSimpleScheme(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingGeometryProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingRightAngledAxes(const rtl::Reference< ::chart::ChartType > &xChartType)
static SAL_DLLPRIVATE css::drawing::Direction3D getDefaultSimpleLightDirection(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingSymbolProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingSecondaryAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static StackMode getStackModeFromChartType(const rtl::Reference< ::chart::ChartType > &xChartType, bool &rbFound, bool &rbAmbiguous, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem)
Retrieves the stackmode of the first DataSeries or none.
#define DBG_UNHANDLED_EXCEPTION(...)
@ PROP_DATASERIES_STACKING_DIRECTION
@ PROP_PIECHARTTYPE_USE_RINGS
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_PIE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BAR
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_AREA
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_LINE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_NET