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>
64using ::com::sun::star::uno::Reference;
65using ::com::sun::star::uno::Sequence;
73 ::std::vector< OUString > & mrAddresses;
76 SchXMLDomain2Context( SvXMLImport& rImport,
77 ::std::vector< OUString > & rAddresses );
80 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
override;
83SchXMLDomain2Context::SchXMLDomain2Context(
85 ::std::vector< OUString > & rAddresses ) :
87 mrAddresses( rAddresses )
91void SchXMLDomain2Context::startFastElement(
93 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
98 mrAddresses.push_back( aIter.toString() );
104void lcl_setAutomaticSymbolSize(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const SvXMLImport& rImport )
106 awt::Size aSymbolSize(140,140);
108 uno::Reference< chart::XChartDocument > xChartDoc( rImport.GetModel(), uno::UNO_QUERY );
112 uno::Reference< beans::XPropertySet > xLegendProp( xChartDoc->getLegend(), uno::UNO_QUERY );
113 chart::ChartLegendPosition aLegendPosition = chart::ChartLegendPosition_NONE;
114 if( xLegendProp.is() && (xLegendProp->getPropertyValue(
"Alignment") >>= aLegendPosition)
115 && chart::ChartLegendPosition_NONE != aLegendPosition )
118 double fFontHeight = 6.0;
119 if( xLegendProp->getPropertyValue(
"CharHeight") >>= fFontHeight )
120 fScale = 0.75*fFontHeight/6.0;
124 uno::Reference< embed::XVisualObject > xVisualObject( rImport.GetModel(), uno::UNO_QUERY );
125 if( xVisualObject.is() )
127 awt::Size aPageSize( xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) );
128 fScale = aPageSize.Height/7000.0;
133 aSymbolSize.Height =
static_cast<sal_Int32
>( fScale * aSymbolSize.Height );
134 aSymbolSize.Width = aSymbolSize.Height;
137 xSeriesOrPointProp->setPropertyValue(
"SymbolSize",
uno::Any( aSymbolSize ));
140void lcl_setSymbolSizeIfNeeded(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const SvXMLImport& rImport )
142 if( !xSeriesOrPointProp.is() )
145 sal_Int32 nSymbolType = chart::ChartSymbolType::NONE;
146 if( !(xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue(
"SymbolType") >>= nSymbolType)) )
149 if(chart::ChartSymbolType::NONE!=nSymbolType)
151 if( chart::ChartSymbolType::BITMAPURL==nSymbolType )
154 xSeriesOrPointProp->setPropertyValue(
"SymbolSize",
uno::Any( awt::Size(-1,-1) ));
158 lcl_setAutomaticSymbolSize( xSeriesOrPointProp, rImport );
163void lcl_resetSymbolSizeForPointsIfNecessary(
const uno::Reference< beans::XPropertySet >& xPointProp,
const SvXMLImport& rImport
167 if( !aASymbolSize.hasValue() )
168 lcl_setSymbolSizeIfNeeded( xPointProp, rImport );
171void lcl_setLinkNumberFormatToSourceIfNeeded(
const uno::Reference< beans::XPropertySet >& xPointProp
175 if( aAny.hasValue() )
178 if( !xPointProp.is() )
181 bool bLinkToSource =
false;
182 if( xPointProp.is() && (xPointProp->getPropertyValue(
"LinkNumberFormatToSource") >>= bLinkToSource) )
186 xPointProp->setPropertyValue(
"LinkNumberFormatToSource",
uno::Any(
false));
191void lcl_insertErrorBarLSequencesToMap(
193 const uno::Reference< beans::XPropertySet > & xSeriesProp )
195 Reference< chart2::data::XDataSource > xErrorBarSource;
196 if( ( xSeriesProp->getPropertyValue(
"ErrorBarY" ) >>= xErrorBarSource ) &&
197 xErrorBarSource.is() )
199 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences(
200 xErrorBarSource->getDataSequences());
201 for(
const auto& rLSequence : aLSequences )
210Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSeries(
const OUString& rRole
211 ,
const OUString& rRange
212 ,
const Reference< chart2::XChartDocument >& xChartDoc
213 ,
const Reference< chart2::XDataSeries >& xSeries )
215 Reference< chart2::data::XLabeledDataSequence2 > xLabeledSeq;
217 Reference< chart2::data::XDataSource > xSeriesSource( xSeries,uno::UNO_QUERY );
218 Reference< chart2::data::XDataSink > xSeriesSink( xSeries, uno::UNO_QUERY );
220 if( !(!rRange.isEmpty() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) )
228 Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
230 xSeqProp->setPropertyValue(
"Role",
uno::Any( rRole));
231 xLabeledSeq->setValues( xSeq );
234 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeq( xSeriesSource->getDataSequences());
235 sal_Int32 nOldCount = aOldSeq.getLength();
236 Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeq( nOldCount + 1 );
237 auto pNewSeq = aNewSeq.getArray();
238 pNewSeq[0].set(xLabeledSeq, uno::UNO_QUERY_THROW);
239 std::copy(aOldSeq.begin(), aOldSeq.end(), std::next(pNewSeq));
240 xSeriesSink->setData( aNewSeq );
248 OUString
const & rStyleName )
253 return pPropStyleContext;
260 SvXMLImport& rImport,
261 const Reference< chart2::XChartDocument > & xNewDoc,
262 std::vector< SchXMLAxis >& rAxes,
263 ::std::vector< DataRowPointStyle >& rStyleVector,
264 ::std::vector< RegressionStyle >& rRegressionStyleVector,
265 sal_Int32 nSeriesIndex,
266 bool bStockHasVolume,
268 const OUString & aGlobalChartTypeName,
270 bool& rGlobalChartTypeUsedBySeries,
271 const awt::Size & rChartSize ) :
273 mrImportHelper( rImpHelper ),
276 mrStyleVector( rStyleVector ),
277 mrRegressionStyleVector( rRegressionStyleVector ),
278 mnSeriesIndex( nSeriesIndex ),
279 mnDataPointIndex( 0 ),
280 m_bStockHasVolume( bStockHasVolume ),
281 m_rGlobalSeriesImportInfo(rGlobalSeriesImportInfo),
282 mpAttachedAxis( nullptr ),
284 maGlobalChartTypeName( aGlobalChartTypeName ),
285 maSeriesChartTypeName( aGlobalChartTypeName ),
286 m_bHasDomainContext(false),
287 mrLSequencesPerIndex( rLSequencesPerIndex ),
288 mrGlobalChartTypeUsedBySeries( rGlobalChartTypeUsedBySeries ),
289 mbSymbolSizeIsMissingInFile(false),
290 maChartSize( rChartSize ),
294 if( aGlobalChartTypeName ==
"com.sun.star.chart2.DonutChartType" )
307 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
312 bool bHasRange =
false;
313 OUString aSeriesLabelRange;
314 OUString aSeriesLabelString;
315 bool bHideLegend =
false;
319 OUString aValue = aIter.toString();
320 switch(aIter.getToken())
327 aSeriesLabelRange = aValue;
330 aSeriesLabelString = aValue;
334 sal_Int32 nNumOfAxes =
mrAxes.size();
335 for( sal_Int32 nCurrent = 0; nCurrent < nNumOfAxes; nCurrent++ )
351 sal_uInt16 nClassPrefix =
352 GetImport().GetNamespaceMap().GetKeyByAttrValueQName(
353 aValue, &aClassName );
362 bHideLegend = aValue.toBoolean();
396 bIsCandleStick =
false;
405 sal_Int32
const nCoordinateSystemIndex = 0;
410 Reference< beans::XPropertySet > xSeriesProp(
m_xSeries, uno::UNO_QUERY );
411 if (xSeriesProp.is())
414 xSeriesProp->setPropertyValue(
"ShowLegendEntry",
uno::Any(
false));
419 xSeriesProp->setPropertyValue(
"Color",
425 xSeriesProp->setPropertyValue(
"VaryColorsByPoint",
431 Reference<chart2::data::XDataProvider> xDataProvider(
mxNewDoc->getDataProvider());
432 Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(xDataProvider, uno::UNO_QUERY);
434 Reference<chart2::data::XDataSequence> xSequenceValues;
437 if (xPivotTableDataProvider.is())
439 xSequenceValues.set(xPivotTableDataProvider->createDataSequenceOfValuesByIndex(
mnSeriesIndex));
447 Reference<beans::XPropertySet> xSeqProp(xSequenceValues, uno::UNO_QUERY);
450 OUString aMainRole(
"values-y");
452 aMainRole =
"values-size";
453 xSeqProp->setPropertyValue(
"Role",
uno::Any(aMainRole));
455 xLabeledSeq->setValues(xSequenceValues);
462 Reference<chart2::data::XDataSequence> xSequenceLabel;
464 if (xPivotTableDataProvider.is())
466 xSequenceLabel.set(xPivotTableDataProvider->createDataSequenceOfLabelsByIndex(
mnSeriesIndex));
470 if (!aSeriesLabelRange.isEmpty())
474 else if (!aSeriesLabelString.isEmpty())
481 Reference<beans::XPropertySet> xSeqLabelProp(xSequenceLabel, uno::UNO_QUERY);
482 if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName(
"IncludeHiddenCells"))
484 xSeqLabelProp->setPropertyValue(
"IncludeHiddenCells",
uno::Any(
true));
487 xLabeledSeq->setLabel(xSequenceLabel);
496 Sequence< Reference< chart2::data::XLabeledDataSequence > >
aSeq( &xLabeledSeq, 1 );
497 Reference< chart2::data::XDataSink >
xSink(
m_xSeries, uno::UNO_QUERY_THROW );
500 catch(
const uno::Exception &)
519 , pPropStyleContext, pStylesCtxt ) );
524 catch(
const uno::Exception & )
533 DomainInfo( OUString _aRole, OUString _aRange, sal_Int32 nIndex )
534 : aRole(
std::move(_aRole)), aRange(
std::move(_aRange)), nIndexForLocalData(
nIndex)
539 sal_Int32 nIndexForLocalData;
551 bool bDeleteSeries =
false;
552 std::vector< DomainInfo > aDomainInfos;
555 if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) )
558 bool bCreateXValues =
true;
579 bDeleteSeries =
true;
580 bCreateXValues =
false;
584 aDomainInfos.push_back( aDomainInfo );
586 else if( bIsBubbleChart )
598 aDomainInfos.push_back( aDomainInfo );
604 aDomainInfos.push_back( aDomainInfo );
614 aDomainInfos.push_back( aDomainInfo );
620 aDomainInfos.push_back( aDomainInfo );
628 m_xSeries, Reference< chart2::XChartDocument >(
GetImport().GetModel(), uno::UNO_QUERY ) );
654 for( std::vector< DomainInfo >::reverse_iterator aIt( aDomainInfos.rbegin() ); aIt!= aDomainInfos.rend(); ++aIt )
656 DomainInfo aDomainInfo( *aIt );
657 Reference< chart2::data::XLabeledDataSequence2 > xLabeledSeq =
658 lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange,
mxNewDoc,
m_xSeries );
659 if( xLabeledSeq.is() )
664 Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW) );
672 sal_Int32 nNewIndex = postponedSequence.first.first + nDomainCount;
682 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
692 pContext =
new SchXMLDomain2Context(
745 ,
const uno::Reference< frame::XModel >& xChartModel )
749 ::std::map< Reference< chart2::XDataSeries >, Reference< beans::XPropertySet > > aSeriesMap;
755 if( !seriesStyle.m_xOldAPISeries.is() )
758 aSeriesMap[seriesStyle.m_xSeries] = seriesStyle.m_xOldAPISeries;
767 seriesStyle.m_xOldAPISeries = aSeriesMap[seriesStyle.m_xSeries];
784 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
811 catch( uno::Exception & )
824 = { {
"LineStyle",
"LabelBorderStyle" },
825 {
"LineWidth",
"LabelBorderWidth" },
826 {
"LineColor",
"LabelBorderColor" },
830 {
"LineDashName",
"LabelBorderDashName" },
831 {
"LineTransparence",
"LabelBorderTransparency" },
832 {
"FillStyle",
"LabelFillStyle" },
833 {
"FillBackground",
"LabelFillBackground" },
834 {
"FillHatchName",
"LabelFillHatchName" },
835 {
"FillColor",
"LabelFillColor" } };
842 , OUString& rCurrStyleName
844 ,
const SvXMLImport& rImport
855 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
856 if( !xSeriesProp.is() )
859 if( seriesStyle.mnAttachedAxis != 1 )
861 xSeriesProp->setPropertyValue(
"Axis"
862 ,
uno::Any(chart::ChartAxisAssign::SECONDARY_Y) );
865 if( seriesStyle.msStyleName.isEmpty())
868 if( rCurrStyleName != seriesStyle.msStyleName )
870 rCurrStyleName = seriesStyle.msStyleName;
881 if (!pPropStyleContext)
887 bool bHasErrorBarRangesFromData =
false;
889 static constexpr OUStringLiteral aErrorBarStylePropName(
u"ErrorBarStyle");
894 xSeriesProp->setPropertyValue( aErrorBarStylePropName, aErrorBarStyle );
895 sal_Int32 eEBStyle = chart::ErrorBarStyle::NONE;
896 bHasErrorBarRangesFromData =
897 ( ( aErrorBarStyle >>= eEBStyle ) &&
898 eEBStyle == chart::ErrorBarStyle::FROM_DATA );
907 seriesStyle.m_xSeries,
917 return rStyle.meType == DataRowPointStyle::DATA_LABEL_SERIES
918 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
928 if (pLabelPropStyleContext)
932 uno::Reference<beans::XPropertySetInfo> xSeriesPropInfo(
933 xSeriesProp->getPropertySetInfo());
937 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
939 && xSeriesPropInfo->hasPropertyByName(rPropPair.second))
940 xSeriesProp->setPropertyValue(rPropPair.second, aPropValue);
946 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
947 lcl_setSymbolSizeIfNeeded( xSeriesProp, rImport );
948 if( bHasErrorBarRangesFromData )
949 lcl_insertErrorBarLSequencesToMap( rInOutLSequencesPerIndex, xSeriesProp );
952 catch(
const uno::Exception & )
964 OUString
const & rCurrentStyleName )
971 OUString aServiceName;
974 if (!rCurrentStyleName.isEmpty())
976 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, rCurrentStyleName);
979 pPropStyleContext = pCurrent;
983 aAny >>= aServiceName;
988 if (!regressionStyle.msStyleName.isEmpty())
990 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, regressionStyle.msStyleName);
993 pPropStyleContext = pCurrent;
997 aAny >>= aServiceName;
1002 if( !aServiceName.isEmpty() )
1005 Reference< chart2::XRegressionCurve > xRegCurve( xMSF->createInstance( aServiceName ), uno::UNO_QUERY_THROW );
1006 Reference< chart2::XRegressionCurveContainer > xRegCurveCont( regressionStyle.m_xSeries, uno::UNO_QUERY_THROW );
1008 Reference< beans::XPropertySet > xCurveProperties( xRegCurve, uno::UNO_QUERY );
1009 if( pPropStyleContext !=
nullptr)
1012 xRegCurve->setEquationProperties( regressionStyle.m_xEquationProperties );
1014 xRegCurveCont->addRegressionCurve( xRegCurve );
1017 catch(
const uno::Exception& )
1029 , OUString& rCurrStyleName )
1039 uno::Reference< beans::XPropertySet > xNewSeriesProp(seriesStyle.m_xSeries,uno::UNO_QUERY);
1041 if (seriesStyle.m_xErrorXProperties.is())
1042 xNewSeriesProp->setPropertyValue(
"ErrorBarX",
uno::Any(seriesStyle.m_xErrorXProperties));
1044 if (seriesStyle.m_xErrorYProperties.is())
1045 xNewSeriesProp->setPropertyValue(
"ErrorBarY",
uno::Any(seriesStyle.m_xErrorYProperties));
1050 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1051 if( !xSeriesProp.is() )
1054 if( !seriesStyle.msStyleName.isEmpty())
1056 if( rCurrStyleName != seriesStyle.msStyleName )
1058 rCurrStyleName = seriesStyle.msStyleName;
1067 if( pPropStyleContext )
1069 Reference< beans::XPropertySet > xStatPropSet;
1070 switch( seriesStyle.meType )
1073 xSeriesProp->getPropertyValue(
"DataMeanValueProperties") >>= xStatPropSet;
1076 xSeriesProp->getPropertyValue(
"DataErrorProperties") >>= xStatPropSet;
1081 if( xStatPropSet.is())
1086 catch(
const uno::Exception & )
1098 , OUString& rCurrStyleName
1100 ,
const SvXMLImport& rImport
1101 ,
bool bIsStockChart,
bool bIsDonutChart,
bool bSwitchOffLinesForScatter )
1108 if( seriesStyle.m_nPointIndex == -1 )
1111 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1112 if(!xSeriesProp.is())
1124 for( sal_Int32
i = 0;
i < seriesStyle.m_nPointRepeat;
i++ )
1128 uno::Reference< beans::XPropertySet > xPointProp(
1132 if( !xPointProp.is() )
1138 if( rCurrStyleName != seriesStyle.msSeriesStyleNameForDonuts )
1140 rCurrStyleName = seriesStyle.msSeriesStyleNameForDonuts;
1149 if( pPropStyleContext )
1156 if( bSwitchOffLinesForScatter )
1157 xPointProp->setPropertyValue(
"Lines",
uno::Any(
false));
1159 catch(
const uno::Exception & )
1163 if( rCurrStyleName != seriesStyle.msStyleName )
1165 rCurrStyleName = seriesStyle.msStyleName;
1174 if (pPropStyleContext)
1177 auto pItLabel = std::find_if(
1181 return rStyle.meType == DataRowPointStyle::DATA_LABEL_POINT
1182 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
1194 if (pLabelPropStyleContext)
1198 uno::Reference<beans::XPropertySetInfo> xPointPropInfo(
1199 xPointProp->getPropertySetInfo());
1203 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
1205 && xPointPropInfo->hasPropertyByName(rPropPair.second))
1206 xPointProp->setPropertyValue(rPropPair.second, aPropValue);
1212 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
1213 lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
1215 lcl_setLinkNumberFormatToSourceIfNeeded( xPointProp, pPropStyleContext, pStylesCtxt );
1219 if(
const size_t nLabelCount = seriesStyle.mCustomLabels.mLabels.size(); nLabelCount > 0)
1221 auto& rCustomLabels = seriesStyle.mCustomLabels;
1223 Sequence< Reference<chart2::XDataPointCustomLabelField>> xLabels(nLabelCount);
1224 auto pxLabels = xLabels.getArray();
1226 for(
size_t j = 0; j < nLabelCount; ++j )
1228 Reference< chart2::XDataPointCustomLabelField > xCustomLabel = chart2::DataPointCustomLabelField::create(xContext);
1229 pxLabels[j] = xCustomLabel;
1230 xCustomLabel->setString(rCustomLabels.mLabels[j]);
1231 if ( j == 0 && rCustomLabels.mbDataLabelsRange)
1233 xCustomLabel->setFieldType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE);
1234 xCustomLabel->setGuid(rCustomLabels.msLabelGuid);
1235 xCustomLabel->setCellRange(rCustomLabels.msLabelsCellRange);
1236 xCustomLabel->setDataLabelsRange(
true);
1240 xCustomLabel->setFieldType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT);
1245 uno::Reference<beans::XPropertySetInfo> xPointPropInfo
1246 = xPointProp->getPropertySetInfo();
1247 if (xPointPropInfo.is())
1249 uno::Sequence<beans::Property>
aProperties = xPointPropInfo->getProperties();
1250 for (
const auto& rProperty : std::as_const(
aProperties))
1252 if (!rProperty.Name.startsWith(
"Char")
1253 || rProperty.Name.startsWith(
"Chart"))
1258 xCustomLabel->setPropertyValue(
1259 rProperty.Name, xPointProp->getPropertyValue(rProperty.Name));
1264 xPointProp->setPropertyValue(
"CustomLabelFields",
uno::Any(xLabels));
1265 xPointProp->setPropertyValue(
"DataCaption",
uno::Any(chart::ChartDataCaption::CUSTOM));
1268 if( seriesStyle.mCustomLabelPos[0] != 0.0 || seriesStyle.mCustomLabelPos[1] != 0.0 )
1270 chart2::RelativePosition aCustomlabelPosition;
1271 aCustomlabelPosition.Primary = seriesStyle.mCustomLabelPos[0];
1272 aCustomlabelPosition.Secondary = seriesStyle.mCustomLabelPos[1];
1273 xPointProp->setPropertyValue(
"CustomLabelPosition",
uno::Any(aCustomlabelPosition));
1276 catch(
const uno::Exception & )
1278 TOOLS_INFO_EXCEPTION(
"xmloff.chart",
"Exception caught during setting styles to data points" );
1288 for (
auto const& seriesStyle : rSeriesStyleVector)
1295 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
1299 xSeries->setPropertyValue(
"Lines",
uno::Any(
false));
1301 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()
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