38#include <unonames.hxx>
45#include <com/sun/star/chart/ChartAxisPosition.hpp>
46#include <com/sun/star/chart2/AxisType.hpp>
50#include <com/sun/star/lang/XServiceName.hpp>
51#include <com/sun/star/uno/XComponentContext.hpp>
62using ::com::sun::star::uno::Reference;
63using ::com::sun::star::uno::Sequence;
78 aScaleData.AxisType = chart2::AxisType::REALNUMBER;
79 aScaleData.AutoDateAxis =
true;
80 aScaleData.ShiftedCategoryPosition =
false;
82 aScaleData.IncrementData.SubIncrements = aSubIncrements;
89 rScaleData.Minimum = rScaleData.Maximum = rScaleData.Origin = aEmpty;
90 rScaleData.Scaling =
nullptr;
92 rScaleData.IncrementData = aDefaultScale.IncrementData;
93 rScaleData.TimeIncrement = aDefaultScale.TimeIncrement;
99 return xServiceName.is()
100 && xServiceName->getServiceName() ==
"com.sun.star.chart2.LogarithmicScaling";
105 ScaleData aScale = xAxis->getScaleData();
107 if( aScale.AutoDateAxis && aScale.AxisType == AxisType::CATEGORY )
109 sal_Int32 nDimensionIndex=0; sal_Int32 nAxisIndex=0;
112 if( bChartTypeAllowsDateAxis )
113 aScale.AxisType = AxisType::DATE;
115 if( aScale.AxisType == AxisType::DATE )
118 if( !aExplicitCategoriesProvider.
isDateAxis() )
119 aScale.AxisType = AxisType::CATEGORY;
126 if( rScale.AutoDateAxis && rScale.AxisType == AxisType::CATEGORY && bChartTypeAllowsDateAxis )
128 rScale.AxisType = AxisType::DATE;
131 if( rScale.AxisType == AxisType::DATE && (!pExplicitCategoriesProvider || !pExplicitCategoriesProvider->
isDateAxis()) )
133 rScale.AxisType = AxisType::CATEGORY;
142 ,
bool bSearchForParallelAxisIfNothingIsFound )
144 sal_Int32 nNumberFormatKey(0);
145 sal_Int32 nAxisIndex = 0;
146 sal_Int32 nDimensionIndex = 1;
152 bool bLinkToSource =
true;
158 bool bFormatSet =
false;
163 if(
aData.AxisType==AxisType::PERCENT )
166 if( nPercentFormat != -1 )
168 nNumberFormatKey = nPercentFormat;
172 else if(
aData.AxisType==AxisType::DATE )
174 if(
aData.Categories.is() )
177 if( xSeq.is() && !( xChartDoc.is() && xChartDoc->hasInternalDataProvider()) )
178 nNumberFormatKey = xSeq->getNumberFormatKeyByIndex( -1 );
184 else if( xChartDoc.is() && xChartDoc->hasInternalDataProvider() && nDimensionIndex == 0 )
187 if( xDiagram->isSupportingDateAxis() )
196 std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aXValues(
198 if( aXValues.empty() )
201 if( xCategories.is() )
206 bool bHasValidDoubles =
false;
209 sal_Int32
nCount = aCats.getLength();
212 if( (aCats[
i]>>=fTest) && !std::isnan(fTest) )
214 bHasValidDoubles=
true;
218 if( bHasValidDoubles )
231 std::map< sal_Int32, sal_Int32 > aKeyMap;
232 bool bNumberFormatKeyFoundViaAttachedData =
false;
236 OUString aRoleToMatch;
237 if( nDimensionIndex == 0 )
238 aRoleToMatch =
"values-x";
239 const std::vector< rtl::Reference< ChartType > > & aChartTypes( xCorrespondingCoordinateSystem->getChartTypes2());
242 if( nDimensionIndex != 0 )
246 if( nDimensionIndex == 1 )
250 if( nAttachedAxisIndex != nAxisIndex )
257 if( !xLabeledSeq.is() && nDimensionIndex==0 )
259 ScaleData
aData = xAxis->getScaleData();
260 xLabeledSeq =
aData.Categories;
263 if( xLabeledSeq.is() )
268 sal_Int32 nKey = xSeq->getNumberFormatKeyByIndex( -1 );
276 catch(
const uno::Exception & )
281 if( ! aKeyMap.empty())
283 sal_Int32 nMaxFreq = 0;
285 for (
auto const& elem : aKeyMap)
289 "NumberFormatKey " << elem.first <<
" appears "
290 << elem.second <<
" times");
292 if( elem.second > nMaxFreq )
294 nNumberFormatKey = elem.first;
295 bNumberFormatKeyFoundViaAttachedData =
true;
296 nMaxFreq = elem.second;
301 if( bSearchForParallelAxisIfNothingIsFound )
305 if( !bNumberFormatKeyFoundViaAttachedData && nDimensionIndex == 1 )
307 sal_Int32 nParallelAxisIndex = (nAxisIndex==1) ?0 :1;
315 return nNumberFormatKey;
319 sal_Int32 nDimensionIndex
320 , sal_Int32 nAxisIndex
325 if( !xContext.is() || !xCooSys.is() )
327 if( nDimensionIndex >= xCooSys->getDimension() )
332 xCooSys->setAxisByDimension( nDimensionIndex, xAxis, nAxisIndex );
336 css::chart::ChartAxisPosition eNewAxisPos( css::chart::ChartAxisPosition_END );
341 ScaleData aScale = xAxis->getScaleData();
342 ScaleData aMainScale = xMainAxis->getScaleData();
344 aScale.AxisType = aMainScale.AxisType;
345 aScale.AutoDateAxis = aMainScale.AutoDateAxis;
346 aScale.Categories = aMainScale.Categories;
347 aScale.Orientation = aMainScale.Orientation;
348 aScale.ShiftedCategoryPosition = aMainScale.ShiftedCategoryPosition;
350 xAxis->setScaleData( aScale );
353 css::chart::ChartAxisPosition eMainAxisPos( css::chart::ChartAxisPosition_ZERO );
354 xMainAxis->getPropertyValue(
"CrossoverPosition") >>= eMainAxisPos;
355 if( eMainAxisPos == css::chart::ChartAxisPosition_END )
356 eNewAxisPos = css::chart::ChartAxisPosition_START;
359 xAxis->setPropertyValue(
"CrossoverPosition",
uno::Any(eNewAxisPos) );
365 if( pRefSizeProvider )
368 catch(
const uno::Exception& )
377 ,
const Reference< uno::XComponentContext >& xContext
378 , ReferenceSizeProvider * pRefSizeProvider )
380 OSL_ENSURE( xContext.is(),
"need a context to create an axis" );
389 nDimensionIndex, nAxisIndex, xCooSys, xContext, pRefSizeProvider );
400 bool bNewAxisCreated =
false;
402 if( !xAxis.is() && xContext.is() )
405 bNewAxisCreated =
true;
409 OSL_ASSERT( xAxis.is());
410 if( !bNewAxisCreated )
436 std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
437 for(
auto const &
i : aSubGrids )
446 xAxis->setPropertyValue(
"Show",
uno::Any(
true ) );
448 xAxis->setPropertyValue(
"DisplayLabels",
uno::Any(
true ) );
454 if( xGridProperties.is() )
456 xGridProperties->setPropertyValue(
"Show",
uno::Any(
true ) );
471 xAxis->setPropertyValue(
"Show",
uno::Any(
false ) );
478 bool bOtherSeriesAttachedToThisAxis =
false;
479 std::vector< rtl::Reference< DataSeries > > aSeriesVector = xDiagram->getDataSeries();
480 for (
auto const& series : aSeriesVector)
483 if( xCurrentAxis==xAxis )
485 bOtherSeriesAttachedToThisAxis =
true;
489 if(!bOtherSeriesAttachedToThisAxis && !aSeriesVector.empty() )
511 std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
512 for(
auto const &
i : aSubGrids)
519 if( xGridProperties.is() )
521 xGridProperties->setPropertyValue(
"Show",
uno::Any(
false ) );
542 std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
543 if( !aSubGrids.empty() )
555 auto aCooSysList = xDiagram->getBaseCoordinateSystems();
557 return aCooSysList[
nIndex];
570 catch(
const uno::Exception & )
583 if(nDimensionIndex >= xCooSys->getDimension())
586 if(nAxisIndex > xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex))
589 assert(nAxisIndex >= 0);
590 assert(nDimensionIndex >= 0);
591 xRet = xCooSys->getAxisByDimension2( nDimensionIndex, nAxisIndex );
598 sal_Int32 nDimensionIndex = 0;
599 sal_Int32 nAxisIndex = 0;
601 if( nDimensionIndex==2 )
604 bool bSwapXY =
false;
605 if( (xCooSys->getPropertyValue(
"SwapXAndYAxis" ) >>= bSwapXY) && bSwapXY )
608 else if( nDimensionIndex==1 )
620 sal_Int32 nCooSysIndex=-1;
621 sal_Int32 nDimensionIndex=-1;
622 sal_Int32 nAxisIndex=-1;
623 if(
getIndicesForAxis( xAxis, xDiagram, nCooSysIndex, nDimensionIndex, nAxisIndex ) )
625 sal_Int32 nParallelAxisIndex = (nAxisIndex==1) ?0 :1;
629 catch(
const uno::RuntimeException& )
647 xAxis->getPropertyValue(
"Show" ) >>= bRet;
660 xAxis->getPropertyValue(
"DisplayLabels" ) >>= bRet;
669 if( xGridproperties.is() )
671 xGridproperties->getPropertyValue(
"Show" ) >>= bRet;
680 , sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex, sal_Int32 nSubGridIndex )
687 if( nSubGridIndex<0 )
688 xRet = xAxis->getGridProperties2();
691 std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
692 if (nSubGridIndex <
static_cast<sal_Int32
>(aSubGrids.size()))
693 xRet = aSubGrids[nSubGridIndex];
704 sal_Int32 nDimensionIndex = -1;
705 sal_Int32 nCooSysIndex = -1;
706 sal_Int32 nAxisIndex = -1;
708 return nDimensionIndex;
714 , sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex )
718 rOutDimensionIndex = -1;
721 if( !xCooSys || !xAxis )
725 sal_Int32 nDimensionCount( xCooSys->getDimension() );
726 for( sal_Int32 nDimensionIndex = 0; nDimensionIndex < nDimensionCount; nDimensionIndex++ )
728 sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
729 for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ )
731 xCurrentAxis = xCooSys->getAxisByDimension2(nDimensionIndex,nAxisIndex);
732 if( xCurrentAxis == xAxis )
734 rOutDimensionIndex = nDimensionIndex;
735 rOutAxisIndex = nAxisIndex;
744 , sal_Int32& rOutCooSysIndex, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex )
748 rOutCooSysIndex = -1;
749 rOutDimensionIndex = -1;
752 const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList = xDiagram->getBaseCoordinateSystems();
753 for( std::size_t nC=0; nC < aCooSysList.size(); ++nC )
757 rOutCooSysIndex = nC;
767 ,
bool bOnlyVisible )
769 std::vector< rtl::Reference< Axis > > aAxisVector;
773 sal_Int32 nMaxDimensionIndex = xCooSys->getDimension() -1;
774 if( nMaxDimensionIndex>=0 )
776 sal_Int32 nDimensionIndex = 0;
777 for(; nDimensionIndex<=nMaxDimensionIndex; ++nDimensionIndex)
779 const sal_Int32 nMaximumAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
780 for(sal_Int32 nAxisIndex=0; nAxisIndex<=nMaximumAxisIndex; ++nAxisIndex)
787 bool bAddAxis =
true;
790 if( !(xAxis->getPropertyValue(
"Show") >>= bAddAxis) )
794 aAxisVector.push_back( xAxis );
797 catch(
const uno::Exception & )
811 ,
bool bOnlyVisible )
813 std::vector< rtl::Reference< Axis > > aAxisVector;
818 aAxisVector.insert( aAxisVector.end(), aAxesPerCooSys.begin(), aAxesPerCooSys.end() );
827 std::vector< rtl::Reference< GridProperties > > aGridVector;
832 if( xGridProperties.is() )
833 aGridVector.push_back( xGridProperties );
835 std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
839 aGridVector.push_back( xSubGrid );
849 rPossibilityList.realloc(6);
850 sal_Bool* pPossibilityList = rPossibilityList.getArray();
852 sal_Int32 nDimensionCount = -1;
854 nDimensionCount = xDiagram->getDimension();
860 xChartType = xDiagram->getChartTypeByIndex( 0 );
875 const std::vector< rtl::Reference< ChartType > > & aChartTypes( xCooSys->getChartTypes2() );
878 const std::vector< rtl::Reference< DataSeries > > & aSeriesList = chartType->getDataSeries2();
879 for( sal_Int32 nS = aSeriesList.size(); nS-- ; )
881 sal_Int32 nAttachedAxisIndex = 0;
882 if( ( aSeriesList[nS]->
getPropertyValue(
"AttachedAxisIndex" ) >>= nAttachedAxisIndex ) &&
883 nAttachedAxisIndex>0 )
895 if( xAxis.is() && xCooSys.is() )
897 sal_Int32 nDimensionIndex=-1;
898 sal_Int32 nAxisIndex=-1;
901 sal_Int32 nDimensionCount = xCooSys->getDimension();
918 rExistenceList.realloc(6);
919 sal_Bool* pExistenceList = rExistenceList.getArray();
946 bool bChanged =
false;
947 for(sal_Int32 nN=0;nN<6;nN++)
949 if(rOldExistenceList[nN]!=rNewExistenceList[nN])
952 if(rNewExistenceList[nN])
967 bool bChanged =
false;
968 for(sal_Int32 nN=0;nN<6;nN++)
970 if(rOldExistenceList[nN]!=rNewExistenceList[nN])
973 if(rNewExistenceList[nN])
994 auto aFound = std::find( aAllAxis.begin(), aAllAxis.end(), xAxis );
995 if( aFound != aAllAxis.end())
1010 const std::vector< rtl::Reference< ChartType > > aChartTypeList( xCooSys->getChartTypes2() );
1012 xChartType = aChartTypeList[
nIndex];
1027 bool bVertical =
false;
1028 xCooSys->getPropertyValue(
"SwapXAndYAxis" ) >>= bVertical;
1030 sal_Int32 nHorizontalAxisDimension = bVertical ? 1 : 0;
1031 sal_Int32 nVerticalAxisDimension = bVertical ? 0 : 1;
1037 if( xHorizontalMainAxis.is() )
1039 chart2::ScaleData aScale = xHorizontalMainAxis->getScaleData();
1040 aScale.Orientation = chart2::AxisOrientation_REVERSE;
1041 xHorizontalMainAxis->setScaleData(aScale);
1046 if( xVerticalMainAxis.is() )
1048 chart2::ScaleData aScale = xVerticalMainAxis->getScaleData();
1049 aScale.Orientation = chart2::AxisOrientation_MATHEMATICAL;
1050 xVerticalMainAxis->setScaleData(aScale);
1053 catch(
const uno::Exception & )
1062 if( xHorizontalSecondaryAxis.is() )
1064 chart2::ScaleData aScale = xHorizontalSecondaryAxis->getScaleData();
1065 aScale.Orientation = chart2::AxisOrientation_REVERSE;
1066 xHorizontalSecondaryAxis->setScaleData(aScale);
1071 if( xVerticalSecondaryAxis.is() )
1073 chart2::ScaleData aScale = xVerticalSecondaryAxis->getScaleData();
1074 aScale.Orientation = chart2::AxisOrientation_MATHEMATICAL;
1075 xVerticalSecondaryAxis->setScaleData(aScale);
1078 catch(
const uno::Exception & )
1087 std::vector< rtl::Reference< DataSeries > > aSeriesVector = xDiagram->getDataSeries();
1088 for (
auto const& series : aSeriesVector)
1091 if( nAttachedAxisIndex == nCurrentIndex )
1093 xChartType = xDiagram->getChartTypeOfSeries(series);
static bool isLogarithmic(const css::uno::Reference< css::chart2::XScaling > &xScaling)
static std::vector< rtl::Reference< ::chart::GridProperties > > getAllGrids(const rtl::Reference< ::chart::Diagram > &xDiagram)
static rtl::Reference< ::chart::Axis > getCrossingMainAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
static void makeAxisInvisible(const rtl::Reference< ::chart::Axis > &xAxis)
static void getAxisOrGridExistence(css::uno::Sequence< sal_Bool > &rExistenceList, const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAxis=true)
static rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static rtl::Reference< ::chart::Axis > getAxis(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static css::uno::Reference< css::chart2::XScaling > createLinearScaling()
static rtl::Reference< ::chart::Axis > getParallelAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static rtl::Reference< ::chart::Axis > createAxis(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram, const css::uno::Reference< css::uno::XComponentContext > &xContext, ReferenceSizeProvider *pRefSizeProvider=nullptr)
static css::chart2::ScaleData getDateCheckedScale(const rtl::Reference< ::chart::Axis > &xAxis, ChartModel &rModel)
static void makeGridInvisible(const rtl::Reference< ::chart::GridProperties > &xGridProperties)
static std::vector< rtl::Reference< ::chart::Axis > > getAllAxesOfDiagram(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bOnlyVisible=false)
static css::chart2::ScaleData createDefaultScale()
static SAL_DLLPRIVATE bool areAxisLabelsVisible(const rtl::Reference< ::chart::Axis > &xAxisProperties)
static void checkDateAxis(css::chart2::ScaleData &rScale, ExplicitCategoriesProvider *pExplicitCategoriesProvider, bool bChartTypeAllowsDateAxis)
static rtl::Reference< ::chart::ChartType > getChartTypeByIndex(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys, sal_Int32 nIndex)
static rtl::Reference< ::chart::ChartType > getFirstChartTypeWithSeriesAttachedToAxisIndex(const rtl::Reference< ::chart::Diagram > &xDiagram, const sal_Int32 nAttachedAxisIndex)
static bool isAxisShown(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void makeAxisVisible(const rtl::Reference< ::chart::Axis > &xAxis)
static sal_Int32 getExplicitNumberFormatKeyForAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, const rtl::Reference< ::chart::ChartModel > &xChartDoc, bool bSearchForParallelAxisIfNothingIsFound)
static sal_Int32 getDimensionIndexOfAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static bool isGridVisible(const rtl::Reference< ::chart::GridProperties > &xGridProperties)
static rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemByIndex(const rtl::Reference< ::chart::Diagram > &xDiagram, sal_Int32 nIndex)
static void removeExplicitScaling(css::chart2::ScaleData &rScaleData)
static rtl::Reference< ::chart::GridProperties > getGridProperties(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex, sal_Int32 nSubGridIndex)
static bool getIndicesForAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys, sal_Int32 &rOutDimensionIndex, sal_Int32 &rOutAxisIndex)
static SAL_DLLPRIVATE std::vector< rtl::Reference< ::chart::Axis > > getAllAxesOfCoordinateSystem(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys, bool bOnlyVisible=false)
static css::uno::Reference< css::chart2::XScaling > createLogarithmicScaling(double fBase=10.0)
static bool shouldAxisBeDisplayed(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
static void hideAxis(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void hideGrid(sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void setRTLAxisLayout(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
static bool isAxisPositioningEnabled()
static void hideAxisIfNoDataIsAttached(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void makeGridVisible(const rtl::Reference< ::chart::GridProperties > &xGridProperties)
static void showAxis(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram, const css::uno::Reference< css::uno::XComponentContext > &xContext, ReferenceSizeProvider *pRefSizeProvider=nullptr)
static bool isGridShown(sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void getAxisOrGridPossibilities(css::uno::Sequence< sal_Bool > &rPossibilityList, const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAxis=true)
static bool changeVisibilityOfGrids(const rtl::Reference< ::chart::Diagram > &xDiagram, const css::uno::Sequence< sal_Bool > &rOldExistenceList, const css::uno::Sequence< sal_Bool > &rNewExistenceList)
static bool isSecondaryYAxisNeeded(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
static bool isAxisVisible(const rtl::Reference< ::chart::Axis > &xAxis)
static void showGrid(sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid, const rtl::Reference< ::chart::Diagram > &xDiagram)
static bool changeVisibilityOfAxes(const rtl::Reference< ::chart::Diagram > &xDiagram, const css::uno::Sequence< sal_Bool > &rOldExistenceList, const css::uno::Sequence< sal_Bool > &rNewExistenceList, const css::uno::Reference< css::uno::XComponentContext > &xContext, ReferenceSizeProvider *pRefSizeProvider)
static rtl::Reference< ::chart::BaseCoordinateSystem > getFirstCoordinateSystem(const rtl::Reference<::chart::ChartModel > &xModel)
static bool isSupportingDateAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionIndex)
static OUString getRoleOfSequenceForYAxisNumberFormatDetection(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingMainAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex)
static bool isSupportingSecondaryAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static rtl::Reference< ::chart::DataSource > getUsedData(ChartModel &rModel)
static sal_Int32 getPercentNumberFormat(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier)
static sal_Int32 getDateNumberFormat(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier)
SAL_DLLPRIVATE void setValuesAtPropertySet(const css::uno::Reference< css::beans::XPropertySet > &xProp, bool bAdaptFontSizes=true)
Sets the ReferencePageSize according to the internal settings of this class at the XPropertySet,...
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
#define SAL_INFO(area, stream)
constexpr OUStringLiteral aData
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence > getDataSequenceByRole(const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const OUString &aRole, bool bMatchPrefix=false)
Retrieves the data sequence in the given data source that matches the given role.
OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequencesByRole(const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &aDataSequences, const OUString &aRole)
Retrieves all data sequences in the given data source that match the given role prefix.
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(const rtl::Reference< ::chart::DataSeries > &xSeries)
void SetLineVisible(const css::uno::Reference< css::beans::XPropertySet > &xLineProperties)
bool IsLineVisible(const css::uno::Reference< css::beans::XPropertySet > &xLineProperties)
const sal_Int32 SECONDARY_AXIS_INDEX
const sal_Int32 MAIN_AXIS_INDEX
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion()
constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME
constexpr OUStringLiteral CHART_UNONAME_LINK_TO_SRC_NUMFMT
constexpr OUStringLiteral CHART_UNONAME_NUMFMT