26#include <com/sun/star/chart2/XChartDocument.hpp>
27#include <com/sun/star/chart2/XRegressionCurve.hpp>
28#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
29#include <com/sun/star/chart2/data/XDataSink.hpp>
30#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
31#include <com/sun/star/chart2/RelativePosition.hpp>
33#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
34#include <com/sun/star/chart2/DataPointCustomLabelFieldType.hpp>
35#include <com/sun/star/chart2/DataPointCustomLabelField.hpp>
37#include <com/sun/star/chart/ChartAxisAssign.hpp>
38#include <com/sun/star/chart/ChartSymbolType.hpp>
39#include <com/sun/star/chart/ChartDataCaption.hpp>
40#include <com/sun/star/chart/ErrorBarStyle.hpp>
41#include <com/sun/star/chart/XChartDocument.hpp>
42#include <com/sun/star/lang/XMultiServiceFactory.hpp>
43#include <com/sun/star/chart/ChartLegendPosition.hpp>
44#include <com/sun/star/embed/Aspects.hpp>
45#include <com/sun/star/embed/XVisualObject.hpp>
63using ::com::sun::star::uno::Reference;
64using ::com::sun::star::uno::Sequence;
72 ::std::vector< OUString > & mrAddresses;
76 ::std::vector< OUString > & rAddresses );
79 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
override;
82SchXMLDomain2Context::SchXMLDomain2Context(
84 ::std::vector< OUString > & rAddresses ) :
86 mrAddresses( rAddresses )
90void SchXMLDomain2Context::startFastElement(
92 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
97 mrAddresses.push_back( aIter.toString() );
103void lcl_setAutomaticSymbolSize(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const SvXMLImport& rImport )
105 awt::Size aSymbolSize(140,140);
107 uno::Reference< chart::XChartDocument > xChartDoc( rImport.
GetModel(), uno::UNO_QUERY );
111 uno::Reference< beans::XPropertySet > xLegendProp( xChartDoc->getLegend(), uno::UNO_QUERY );
112 chart::ChartLegendPosition aLegendPosition = chart::ChartLegendPosition_NONE;
113 if( xLegendProp.is() && (xLegendProp->getPropertyValue(
"Alignment") >>= aLegendPosition)
114 && chart::ChartLegendPosition_NONE != aLegendPosition )
117 double fFontHeight = 6.0;
118 if( xLegendProp->getPropertyValue(
"CharHeight") >>= fFontHeight )
119 fScale = 0.75*fFontHeight/6.0;
123 uno::Reference< embed::XVisualObject > xVisualObject( rImport.
GetModel(), uno::UNO_QUERY );
124 if( xVisualObject.is() )
126 awt::Size aPageSize( xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) );
127 fScale = aPageSize.Height/7000.0;
132 aSymbolSize.Height =
static_cast<sal_Int32
>( fScale * aSymbolSize.Height );
133 aSymbolSize.Width = aSymbolSize.Height;
136 xSeriesOrPointProp->setPropertyValue(
"SymbolSize",
uno::Any( aSymbolSize ));
139void lcl_setSymbolSizeIfNeeded(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const SvXMLImport& rImport )
141 if( !xSeriesOrPointProp.is() )
144 sal_Int32 nSymbolType = chart::ChartSymbolType::NONE;
145 if( !(xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue(
"SymbolType") >>= nSymbolType)) )
148 if(chart::ChartSymbolType::NONE!=nSymbolType)
150 if( chart::ChartSymbolType::BITMAPURL==nSymbolType )
153 xSeriesOrPointProp->setPropertyValue(
"SymbolSize",
uno::Any( awt::Size(-1,-1) ));
157 lcl_setAutomaticSymbolSize( xSeriesOrPointProp, rImport );
162void lcl_resetSymbolSizeForPointsIfNecessary(
const uno::Reference< beans::XPropertySet >& xPointProp,
const SvXMLImport& rImport
166 if( !aASymbolSize.hasValue() )
167 lcl_setSymbolSizeIfNeeded( xPointProp, rImport );
170void lcl_setLinkNumberFormatToSourceIfNeeded(
const uno::Reference< beans::XPropertySet >& xPointProp
174 if( aAny.hasValue() )
177 if( !xPointProp.is() )
180 bool bLinkToSource =
false;
181 if( xPointProp.is() && (xPointProp->getPropertyValue(
"LinkNumberFormatToSource") >>= bLinkToSource) )
185 xPointProp->setPropertyValue(
"LinkNumberFormatToSource",
uno::Any(
false));
190void lcl_insertErrorBarLSequencesToMap(
192 const uno::Reference< beans::XPropertySet > & xSeriesProp )
194 Reference< chart2::data::XDataSource > xErrorBarSource;
195 if( ( xSeriesProp->getPropertyValue(
"ErrorBarY" ) >>= xErrorBarSource ) &&
196 xErrorBarSource.is() )
198 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences(
199 xErrorBarSource->getDataSequences());
200 for(
const auto& rLSequence : aLSequences )
209Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSeries(
const OUString& rRole
210 ,
const OUString& rRange
211 ,
const Reference< chart2::XChartDocument >& xChartDoc
212 ,
const Reference< chart2::XDataSeries >& xSeries )
214 Reference< chart2::data::XLabeledDataSequence2 > xLabeledSeq;
216 Reference< chart2::data::XDataSource > xSeriesSource( xSeries,uno::UNO_QUERY );
217 Reference< chart2::data::XDataSink > xSeriesSink( xSeries, uno::UNO_QUERY );
219 if( !(!rRange.isEmpty() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) )
227 Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
229 xSeqProp->setPropertyValue(
"Role",
uno::Any( rRole));
230 xLabeledSeq->setValues( xSeq );
233 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeq( xSeriesSource->getDataSequences());
234 sal_Int32 nOldCount = aOldSeq.getLength();
235 Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeq( nOldCount + 1 );
236 auto pNewSeq = aNewSeq.getArray();
237 pNewSeq[0].set(xLabeledSeq, uno::UNO_QUERY_THROW);
238 std::copy(aOldSeq.begin(), aOldSeq.end(), std::next(pNewSeq));
239 xSeriesSink->setData( aNewSeq );
247 OUString
const & rStyleName )
252 return pPropStyleContext;
260 const Reference< chart2::XChartDocument > & xNewDoc,
261 std::vector< SchXMLAxis >& rAxes,
262 ::std::vector< DataRowPointStyle >& rStyleVector,
263 ::std::vector< RegressionStyle >& rRegressionStyleVector,
264 sal_Int32 nSeriesIndex,
265 bool bStockHasVolume,
267 const OUString & aGlobalChartTypeName,
269 bool& rGlobalChartTypeUsedBySeries,
270 const awt::Size & rChartSize ) :
272 mrImportHelper( rImpHelper ),
275 mrStyleVector( rStyleVector ),
276 mrRegressionStyleVector( rRegressionStyleVector ),
277 mnSeriesIndex( nSeriesIndex ),
278 mnDataPointIndex( 0 ),
279 m_bStockHasVolume( bStockHasVolume ),
280 m_rGlobalSeriesImportInfo(rGlobalSeriesImportInfo),
281 mpAttachedAxis( nullptr ),
283 maGlobalChartTypeName( aGlobalChartTypeName ),
284 maSeriesChartTypeName( aGlobalChartTypeName ),
285 m_bHasDomainContext(false),
286 mrLSequencesPerIndex( rLSequencesPerIndex ),
287 mrGlobalChartTypeUsedBySeries( rGlobalChartTypeUsedBySeries ),
288 mbSymbolSizeIsMissingInFile(false),
289 maChartSize( rChartSize ),
293 if( aGlobalChartTypeName ==
"com.sun.star.chart2.DonutChartType" )
306 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
311 bool bHasRange =
false;
312 OUString aSeriesLabelRange;
313 OUString aSeriesLabelString;
314 bool bHideLegend =
false;
318 OUString aValue = aIter.toString();
319 switch(aIter.getToken())
326 aSeriesLabelRange = aValue;
329 aSeriesLabelString = aValue;
333 sal_Int32 nNumOfAxes =
mrAxes.size();
334 for( sal_Int32 nCurrent = 0; nCurrent < nNumOfAxes; nCurrent++ )
350 sal_uInt16 nClassPrefix =
352 aValue, &aClassName );
361 bHideLegend = aValue.toBoolean();
395 bIsCandleStick =
false;
404 sal_Int32
const nCoordinateSystemIndex = 0;
409 Reference< beans::XPropertySet > xSeriesProp(
m_xSeries, uno::UNO_QUERY );
410 if (xSeriesProp.is())
413 xSeriesProp->setPropertyValue(
"ShowLegendEntry",
uno::Any(
false));
418 xSeriesProp->setPropertyValue(
"Color",
424 xSeriesProp->setPropertyValue(
"VaryColorsByPoint",
430 Reference<chart2::data::XDataProvider> xDataProvider(
mxNewDoc->getDataProvider());
431 Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(xDataProvider, uno::UNO_QUERY);
433 Reference<chart2::data::XDataSequence> xSequenceValues;
436 if (xPivotTableDataProvider.is())
438 xSequenceValues.set(xPivotTableDataProvider->createDataSequenceOfValuesByIndex(
mnSeriesIndex));
446 Reference<beans::XPropertySet> xSeqProp(xSequenceValues, uno::UNO_QUERY);
449 OUString aMainRole(
"values-y");
451 aMainRole =
"values-size";
452 xSeqProp->setPropertyValue(
"Role",
uno::Any(aMainRole));
454 xLabeledSeq->setValues(xSequenceValues);
461 Reference<chart2::data::XDataSequence> xSequenceLabel;
463 if (xPivotTableDataProvider.is())
465 xSequenceLabel.set(xPivotTableDataProvider->createDataSequenceOfLabelsByIndex(
mnSeriesIndex));
469 if (!aSeriesLabelRange.isEmpty())
473 else if (!aSeriesLabelString.isEmpty())
480 Reference<beans::XPropertySet> xSeqLabelProp(xSequenceLabel, uno::UNO_QUERY);
481 if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName(
"IncludeHiddenCells"))
483 xSeqLabelProp->setPropertyValue(
"IncludeHiddenCells",
uno::Any(
true));
486 xLabeledSeq->setLabel(xSequenceLabel);
495 Sequence< Reference< chart2::data::XLabeledDataSequence > >
aSeq( &xLabeledSeq, 1 );
496 Reference< chart2::data::XDataSink >
xSink(
m_xSeries, uno::UNO_QUERY_THROW );
499 catch(
const uno::Exception &)
518 , pPropStyleContext, pStylesCtxt ) );
523 catch(
const uno::Exception & )
532 DomainInfo(
const OUString& rRole,
const OUString& rRange, sal_Int32 nIndex )
533 : aRole(rRole), aRange(rRange), nIndexForLocalData(
nIndex)
538 sal_Int32 nIndexForLocalData;
550 bool bDeleteSeries =
false;
551 std::vector< DomainInfo > aDomainInfos;
554 if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) )
557 bool bCreateXValues =
true;
578 bDeleteSeries =
true;
579 bCreateXValues =
false;
583 aDomainInfos.push_back( aDomainInfo );
585 else if( bIsBubbleChart )
597 aDomainInfos.push_back( aDomainInfo );
603 aDomainInfos.push_back( aDomainInfo );
613 aDomainInfos.push_back( aDomainInfo );
619 aDomainInfos.push_back( aDomainInfo );
627 m_xSeries, Reference< chart2::XChartDocument >(
GetImport().GetModel(), uno::UNO_QUERY ) );
653 for( std::vector< DomainInfo >::reverse_iterator aIt( aDomainInfos.rbegin() ); aIt!= aDomainInfos.rend(); ++aIt )
655 DomainInfo aDomainInfo( *aIt );
656 Reference< chart2::data::XLabeledDataSequence2 > xLabeledSeq =
657 lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange,
mxNewDoc,
m_xSeries );
658 if( xLabeledSeq.is() )
663 Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW) );
671 sal_Int32 nNewIndex = postponedSequence.first.first + nDomainCount;
681 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
691 pContext =
new SchXMLDomain2Context(
744 ,
const uno::Reference< frame::XModel >& xChartModel )
748 ::std::map< Reference< chart2::XDataSeries >, Reference< beans::XPropertySet > > aSeriesMap;
754 if( !seriesStyle.m_xOldAPISeries.is() )
757 aSeriesMap[seriesStyle.m_xSeries] = seriesStyle.m_xOldAPISeries;
766 seriesStyle.m_xOldAPISeries = aSeriesMap[seriesStyle.m_xSeries];
783 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
810 catch( uno::Exception & )
823 = { {
"LineStyle",
"LabelBorderStyle" },
824 {
"LineWidth",
"LabelBorderWidth" },
825 {
"LineColor",
"LabelBorderColor" },
829 {
"LineDashName",
"LabelBorderDashName" },
830 {
"LineTransparence",
"LabelBorderTransparency" },
831 {
"FillStyle",
"LabelFillStyle" },
832 {
"FillBackground",
"LabelFillBackground" },
833 {
"FillHatchName",
"LabelFillHatchName" },
834 {
"FillColor",
"LabelFillColor" } };
841 , OUString& rCurrStyleName
854 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
855 if( !xSeriesProp.is() )
858 if( seriesStyle.mnAttachedAxis != 1 )
860 xSeriesProp->setPropertyValue(
"Axis"
861 ,
uno::Any(chart::ChartAxisAssign::SECONDARY_Y) );
864 if( seriesStyle.msStyleName.isEmpty())
867 if( rCurrStyleName != seriesStyle.msStyleName )
869 rCurrStyleName = seriesStyle.msStyleName;
880 if (!pPropStyleContext)
886 bool bHasErrorBarRangesFromData =
false;
888 static const OUStringLiteral aErrorBarStylePropName(
u"ErrorBarStyle");
893 xSeriesProp->setPropertyValue( aErrorBarStylePropName, aErrorBarStyle );
894 sal_Int32 eEBStyle = chart::ErrorBarStyle::NONE;
895 bHasErrorBarRangesFromData =
896 ( ( aErrorBarStyle >>= eEBStyle ) &&
897 eEBStyle == chart::ErrorBarStyle::FROM_DATA );
906 seriesStyle.m_xSeries,
916 return rStyle.meType == DataRowPointStyle::DATA_LABEL_SERIES
917 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
927 if (pLabelPropStyleContext)
931 uno::Reference<beans::XPropertySetInfo> xSeriesPropInfo(
932 xSeriesProp->getPropertySetInfo());
936 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
938 && xSeriesPropInfo->hasPropertyByName(rPropPair.second))
939 xSeriesProp->setPropertyValue(rPropPair.second, aPropValue);
945 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
946 lcl_setSymbolSizeIfNeeded( xSeriesProp, rImport );
947 if( bHasErrorBarRangesFromData )
948 lcl_insertErrorBarLSequencesToMap( rInOutLSequencesPerIndex, xSeriesProp );
951 catch(
const uno::Exception & )
963 OUString
const & rCurrentStyleName )
970 OUString aServiceName;
973 if (!rCurrentStyleName.isEmpty())
975 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, rCurrentStyleName);
978 pPropStyleContext = pCurrent;
982 aAny >>= aServiceName;
987 if (!regressionStyle.msStyleName.isEmpty())
989 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, regressionStyle.msStyleName);
992 pPropStyleContext = pCurrent;
996 aAny >>= aServiceName;
1001 if( !aServiceName.isEmpty() )
1004 Reference< chart2::XRegressionCurve > xRegCurve( xMSF->createInstance( aServiceName ), uno::UNO_QUERY_THROW );
1005 Reference< chart2::XRegressionCurveContainer > xRegCurveCont( regressionStyle.m_xSeries, uno::UNO_QUERY_THROW );
1007 Reference< beans::XPropertySet > xCurveProperties( xRegCurve, uno::UNO_QUERY );
1008 if( pPropStyleContext !=
nullptr)
1011 xRegCurve->setEquationProperties( regressionStyle.m_xEquationProperties );
1013 xRegCurveCont->addRegressionCurve( xRegCurve );
1016 catch(
const uno::Exception& )
1028 , OUString& rCurrStyleName )
1038 uno::Reference< beans::XPropertySet > xNewSeriesProp(seriesStyle.m_xSeries,uno::UNO_QUERY);
1040 if (seriesStyle.m_xErrorXProperties.is())
1041 xNewSeriesProp->setPropertyValue(
"ErrorBarX",
uno::Any(seriesStyle.m_xErrorXProperties));
1043 if (seriesStyle.m_xErrorYProperties.is())
1044 xNewSeriesProp->setPropertyValue(
"ErrorBarY",
uno::Any(seriesStyle.m_xErrorYProperties));
1049 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1050 if( !xSeriesProp.is() )
1053 if( !seriesStyle.msStyleName.isEmpty())
1055 if( rCurrStyleName != seriesStyle.msStyleName )
1057 rCurrStyleName = seriesStyle.msStyleName;
1066 if( pPropStyleContext )
1068 Reference< beans::XPropertySet > xStatPropSet;
1069 switch( seriesStyle.meType )
1072 xSeriesProp->getPropertyValue(
"DataMeanValueProperties") >>= xStatPropSet;
1075 xSeriesProp->getPropertyValue(
"DataErrorProperties") >>= xStatPropSet;
1080 if( xStatPropSet.is())
1085 catch(
const uno::Exception & )
1097 , OUString& rCurrStyleName
1100 ,
bool bIsStockChart,
bool bIsDonutChart,
bool bSwitchOffLinesForScatter )
1107 if( seriesStyle.m_nPointIndex == -1 )
1110 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1111 if(!xSeriesProp.is())
1123 for( sal_Int32
i = 0;
i < seriesStyle.m_nPointRepeat;
i++ )
1127 uno::Reference< beans::XPropertySet > xPointProp(
1131 if( !xPointProp.is() )
1137 if( rCurrStyleName != seriesStyle.msSeriesStyleNameForDonuts )
1139 rCurrStyleName = seriesStyle.msSeriesStyleNameForDonuts;
1148 if( pPropStyleContext )
1155 if( bSwitchOffLinesForScatter )
1156 xPointProp->setPropertyValue(
"Lines",
uno::Any(
false));
1158 catch(
const uno::Exception & )
1162 if( rCurrStyleName != seriesStyle.msStyleName )
1164 rCurrStyleName = seriesStyle.msStyleName;
1173 if (pPropStyleContext)
1176 auto pItLabel = std::find_if(
1180 return rStyle.meType == DataRowPointStyle::DATA_LABEL_POINT
1181 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
1193 if (pLabelPropStyleContext)
1197 uno::Reference<beans::XPropertySetInfo> xPointPropInfo(
1198 xPointProp->getPropertySetInfo());
1202 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
1204 && xPointPropInfo->hasPropertyByName(rPropPair.second))
1205 xPointProp->setPropertyValue(rPropPair.second, aPropValue);
1211 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
1212 lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
1214 lcl_setLinkNumberFormatToSourceIfNeeded( xPointProp, pPropStyleContext, pStylesCtxt );
1218 if(
const size_t nLabelCount = seriesStyle.mCustomLabels.mLabels.size(); nLabelCount > 0)
1220 auto& rCustomLabels = seriesStyle.mCustomLabels;
1222 Sequence< Reference<chart2::XDataPointCustomLabelField>> xLabels(nLabelCount);
1223 auto pxLabels = xLabels.getArray();
1225 for(
size_t j = 0; j < nLabelCount; ++j )
1227 Reference< chart2::XDataPointCustomLabelField > xCustomLabel = chart2::DataPointCustomLabelField::create(xContext);
1228 pxLabels[j] = xCustomLabel;
1229 xCustomLabel->setString(rCustomLabels.mLabels[j]);
1230 if ( j == 0 && rCustomLabels.mbDataLabelsRange)
1232 xCustomLabel->setFieldType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE);
1233 xCustomLabel->setGuid(rCustomLabels.msLabelGuid);
1234 xCustomLabel->setCellRange(rCustomLabels.msLabelsCellRange);
1235 xCustomLabel->setDataLabelsRange(
true);
1239 xCustomLabel->setFieldType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT);
1244 uno::Reference<beans::XPropertySetInfo> xPointPropInfo
1245 = xPointProp->getPropertySetInfo();
1246 if (xPointPropInfo.is())
1248 uno::Sequence<beans::Property>
aProperties = xPointPropInfo->getProperties();
1249 for (
const auto& rProperty : std::as_const(
aProperties))
1251 if (!rProperty.Name.startsWith(
"Char")
1252 || rProperty.Name.startsWith(
"Chart"))
1257 xCustomLabel->setPropertyValue(
1258 rProperty.Name, xPointProp->getPropertyValue(rProperty.Name));
1263 xPointProp->setPropertyValue(
"CustomLabelFields",
uno::Any(xLabels));
1264 xPointProp->setPropertyValue(
"DataCaption",
uno::Any(chart::ChartDataCaption::CUSTOM));
1267 if( seriesStyle.mCustomLabelPos[0] != 0.0 || seriesStyle.mCustomLabelPos[1] != 0.0 )
1269 chart2::RelativePosition aCustomlabelPosition;
1270 aCustomlabelPosition.Primary = seriesStyle.mCustomLabelPos[0];
1271 aCustomlabelPosition.Secondary = seriesStyle.mCustomLabelPos[1];
1272 xPointProp->setPropertyValue(
"CustomLabelPosition",
uno::Any(aCustomlabelPosition));
1275 catch(
const uno::Exception & )
1277 TOOLS_INFO_EXCEPTION(
"xmloff.chart",
"Exception caught during setting styles to data points" );
1287 for (
auto const& seriesStyle : rSeriesStyleVector)
1294 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
1298 xSeries->setPropertyValue(
"Lines",
uno::Any(
false));
1300 catch( uno::Exception & )
const std::pair< OUString, OUString > aApiToLabelFooPairs[]
PropertiesInfo aProperties
With this class you can import a <chart:chart> element containing its data as <table:table> element o...
const css::uno::Reference< css::chart::XChartDocument > & GetChartDocument() const
static void DeleteDataSeries(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::chart2::XChartDocument > &xDoc)
SvXMLStylesContext * GetAutoStylesContext() const
static css::uno::Reference< css::chart2::XDataSeries > GetNewDataSeries(const css::uno::Reference< css::chart2::XChartDocument > &xDoc, sal_Int32 nCoordinateSystemIndex, const OUString &rChartTypeName, bool bPushLastChartType)
static XmlStyleFamily GetChartFamilyID()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
::std::vector< DataRowPointStyle > & mrStyleVector
sal_Int32 mnDataPointIndex
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
bool mbSymbolSizeIsMissingInFile
static void initSeriesPropertySets(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const css::uno::Reference< css::frame::XModel > &xChartModel)
SchXMLImportHelper & mrImportHelper
tSchXMLLSequencesPerIndex & mrLSequencesPerIndex
static void setDefaultsToSeries(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles)
css::uno::Reference< css::chart2::XChartDocument > mxNewDoc
static void switchSeriesLinesOff(::std::vector< DataRowPointStyle > &rSeriesStyleVector)
bool & mrGlobalChartTypeUsedBySeries
::std::vector< RegressionStyle > & mrRegressionStyleVector
::std::vector< SchXMLAxis > & mrAxes
OUString maGlobalChartTypeName
::std::vector< OUString > maDomainAddresses
static void setStylesToSeries(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString &rCurrStyleName, const SchXMLImportHelper &rImportHelper, const SvXMLImport &rImport, bool bIsStockChart, tSchXMLLSequencesPerIndex &rInOutLSequencesPerIndex)
tSchXMLLSequencesPerIndex maPostponedSequences
SchXMLSeries2Context(SchXMLImportHelper &rImpHelper, SvXMLImport &rImport, const css::uno::Reference< css::chart2::XChartDocument > &xNewDoc, std::vector< SchXMLAxis > &rAxes, ::std::vector< DataRowPointStyle > &rStyleVector, ::std::vector< RegressionStyle > &rRegressionStyleVector, sal_Int32 nSeriesIndex, bool bStockHasVolume, GlobalSeriesImportInfo &rGlobalSeriesImportInfo, const OUString &aGlobalChartTypeName, tSchXMLLSequencesPerIndex &rLSequencesPerIndex, bool &rGlobalChartTypeUsedBySeries, const css::awt::Size &rChartSize)
css::awt::Size maChartSize
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SchXMLSeries2Context() override
static void setStylesToRegressionCurves(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString const &rCurrStyleName)
static void setStylesToStatisticsObjects(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString &rCurrStyleName)
DataRowPointStyle mDataLabel
SchXMLAxis * mpAttachedAxis
OUString maSeriesChartTypeName
static void setStylesToDataPoints(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString &rCurrStyleName, const SchXMLImportHelper &rImportHelper, const SvXMLImport &rImport, bool bIsStockChart, bool bIsDonutChart, bool bSwitchOffLinesForScatter)
GlobalSeriesImportInfo & m_rGlobalSeriesImportInfo
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
static bool isCandleStickSeries(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::frame::XModel > &xChartModel)
static css::uno::Reference< css::beans::XPropertySet > createOldAPIDataPointPropertySet(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, sal_Int32 nPointIndex, const css::uno::Reference< css::frame::XModel > &xChartModel)
static css::uno::Reference< css::beans::XPropertySet > createOldAPISeriesPropertySet(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::frame::XModel > &xChartModel)
@ CONTEXT_TYPE_MEAN_VALUE_LINE
@ CONTEXT_TYPE_ERROR_INDICATOR
This class deliberately does not support XWeak, to improve performance when loading large documents.
virtual void SAL_CALL startFastElement(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
SvXMLImport & GetImport()
SvXMLNamespaceMap & GetNamespaceMap()
const css::uno::Reference< css::frame::XModel > & GetModel() const
sal_uInt16 GetKeyByAttrValueQName(const OUString &rAttrName, OUString *pLocalName) const
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
virtual bool isEmptyDataStyleName()
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
#define TOOLS_INFO_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
tools::SvRef< SvBaseLink > xSink
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
Reference< XMultiServiceFactory > getProcessServiceFactory()
Reference< XComponentContext > getProcessComponentContext()
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
@ XML_VALUES_CELL_RANGE_ADDRESS
bool mbSymbolSizeForSeriesIsMissingInFile
CustomLabelsInfo mCustomLabels
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
OUString msStyleNameOfParent
OUString aFirstFirstDomainAddress
sal_Int32 nFirstFirstDomainIndex
bool & rbAllRangeAddressesAvailable
OUString aFirstSecondDomainAddress
sal_Int32 nFirstSecondDomainIndex
sal_Int32 nCurrentDataIndex
css::uno::Any maConstantErrorLowDefault
css::uno::Any maDataCaptionDefault
css::uno::Any maConstantErrorHighDefault
css::uno::Any maSymbolTypeDefault
css::uno::Any maMeanValueDefault
css::uno::Any maErrorIndicatorDefault
css::uno::Any maErrorMarginDefault
css::uno::Any maErrorCategoryDefault
::std::vector< RegressionStyle > maRegressionStyleVector
css::uno::Any maRegressionCurvesDefault
css::uno::Any maPercentageErrorDefault
::std::vector< DataRowPointStyle > maSeriesStyleVector
@ SCH_XML_PART_ERROR_BARS
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)
constexpr sal_uInt16 XML_NAMESPACE_CHART