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>
63 using ::com::sun::star::uno::Reference;
64 using ::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;
82 SchXMLDomain2Context::SchXMLDomain2Context(
84 ::std::vector< OUString > & rAddresses ) :
86 mrAddresses( rAddresses )
90 void SchXMLDomain2Context::startFastElement(
92 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
97 mrAddresses.push_back( aIter.toString() );
103 void 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::makeAny( aSymbolSize ));
139 void lcl_setSymbolSizeIfNeeded(
const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
const SvXMLImport& rImport )
141 if( !xSeriesOrPointProp.is() )
145 if( !(xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue(
"SymbolType") >>= nSymbolType)) )
150 if( chart::ChartSymbolType::BITMAPURL==nSymbolType )
153 xSeriesOrPointProp->setPropertyValue(
"SymbolSize",uno::makeAny( awt::Size(-1,-1) ));
157 lcl_setAutomaticSymbolSize( xSeriesOrPointProp, rImport );
162 void lcl_resetSymbolSizeForPointsIfNecessary(
const uno::Reference< beans::XPropertySet >& xPointProp,
const SvXMLImport& rImport
166 if( !aASymbolSize.hasValue() )
167 lcl_setSymbolSizeIfNeeded( xPointProp, rImport );
170 void 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::makeAny(
false));
190 void 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 )
209 Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSeries(
const OUString& rRole
210 ,
const OUString& rRange
211 ,
const Reference< chart2::XChartDocument >& xChartDoc
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()) )
229 xSeqProp->setPropertyValue(
"Role", uno::makeAny( rRole));
230 xLabeledSeq->setValues( xSeq );
233 Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeq( xSeriesSource->getDataSequences());
234 sal_Int32 nOldCount = aOldSeq.getLength();
235 Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeq( nOldCount + 1 );
236 aNewSeq[0].set(xLabeledSeq, uno::UNO_QUERY_THROW);
237 std::copy(aOldSeq.begin(), aOldSeq.end(), std::next(aNewSeq.begin()));
238 xSeriesSink->setData( aNewSeq );
246 OUString
const & rStyleName )
251 return pPropStyleContext;
259 const Reference< chart2::XChartDocument > & xNewDoc,
260 std::vector< SchXMLAxis >& rAxes,
261 ::std::vector< DataRowPointStyle >& rStyleVector,
262 ::std::vector< RegressionStyle >& rRegressionStyleVector,
263 sal_Int32 nSeriesIndex,
264 bool bStockHasVolume,
266 const OUString & aGlobalChartTypeName,
268 bool& rGlobalChartTypeUsedBySeries,
269 const awt::Size & rChartSize ) :
271 mrImportHelper( rImpHelper ),
274 mrStyleVector( rStyleVector ),
275 mrRegressionStyleVector( rRegressionStyleVector ),
276 mnSeriesIndex( nSeriesIndex ),
277 mnDataPointIndex( 0 ),
278 m_bStockHasVolume( bStockHasVolume ),
279 m_rGlobalSeriesImportInfo(rGlobalSeriesImportInfo),
280 mpAttachedAxis( nullptr ),
282 maGlobalChartTypeName( aGlobalChartTypeName ),
283 maSeriesChartTypeName( aGlobalChartTypeName ),
284 m_bHasDomainContext(false),
285 mrLSequencesPerIndex( rLSequencesPerIndex ),
286 mrGlobalChartTypeUsedBySeries( rGlobalChartTypeUsedBySeries ),
287 mbSymbolSizeIsMissingInFile(false),
288 maChartSize( rChartSize ),
292 if( aGlobalChartTypeName ==
"com.sun.star.chart2.DonutChartType" )
294 maSeriesChartTypeName =
"com.sun.star.chart2.PieChartType";
295 maGlobalChartTypeName = maSeriesChartTypeName;
305 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
310 bool bHasRange =
false;
311 OUString aSeriesLabelRange;
312 OUString aSeriesLabelString;
313 bool bHideLegend =
false;
317 OUString aValue = aIter.toString();
318 switch(aIter.getToken())
325 aSeriesLabelRange = aValue;
328 aSeriesLabelString = aValue;
332 sal_Int32 nNumOfAxes =
mrAxes.size();
333 for( sal_Int32 nCurrent = 0; nCurrent < nNumOfAxes; nCurrent++ )
349 sal_uInt16 nClassPrefix =
351 aValue, &aClassName );
360 bHideLegend = aValue.toBoolean();
394 bIsCandleStick =
false;
403 sal_Int32
const nCoordinateSystemIndex = 0;
409 if (xSeriesProp.is())
412 xSeriesProp->setPropertyValue(
"ShowLegendEntry", uno::makeAny(
false));
417 xSeriesProp->setPropertyValue(
"Color",
418 uno::makeAny( sal_Int32( 0x000000 )));
423 xSeriesProp->setPropertyValue(
"VaryColorsByPoint",
424 uno::makeAny(
true ));
429 Reference<chart2::data::XDataProvider> xDataProvider(
mxNewDoc->getDataProvider());
430 Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(xDataProvider, uno::UNO_QUERY);
432 Reference<chart2::data::XDataSequence> xSequenceValues;
435 if (xPivotTableDataProvider.is())
437 xSequenceValues.set(xPivotTableDataProvider->createDataSequenceOfValuesByIndex(
mnSeriesIndex));
448 OUString aMainRole(
"values-y");
450 aMainRole =
"values-size";
451 xSeqProp->setPropertyValue(
"Role", uno::makeAny(aMainRole));
453 xLabeledSeq->setValues(xSequenceValues);
460 Reference<chart2::data::XDataSequence> xSequenceLabel;
462 if (xPivotTableDataProvider.is())
464 xSequenceLabel.set(xPivotTableDataProvider->createDataSequenceOfLabelsByIndex(
mnSeriesIndex));
468 if (!aSeriesLabelRange.isEmpty())
472 else if (!aSeriesLabelString.isEmpty())
480 if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName(
"IncludeHiddenCells"))
482 xSeqLabelProp->setPropertyValue(
"IncludeHiddenCells",
uno::Any(
true));
485 xLabeledSeq->setLabel(xSequenceLabel);
494 Sequence< Reference< chart2::data::XLabeledDataSequence > >
aSeq( &xLabeledSeq, 1 );
495 Reference< chart2::data::XDataSink >
xSink(
m_xSeries, uno::UNO_QUERY_THROW );
496 xSink->setData( aSeq );
498 catch(
const uno::Exception &)
517 , pPropStyleContext, pStylesCtxt ) );
522 catch(
const uno::Exception & )
531 DomainInfo(
const OUString& rRole,
const OUString& rRange, sal_Int32 nIndex )
532 : aRole(rRole), aRange(rRange), nIndexForLocalData(nIndex)
537 sal_Int32 nIndexForLocalData;
549 bool bDeleteSeries =
false;
550 std::vector< DomainInfo > aDomainInfos;
553 if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) )
556 bool bCreateXValues =
true;
577 bDeleteSeries =
true;
578 bCreateXValues =
false;
582 aDomainInfos.push_back( aDomainInfo );
584 else if( bIsBubbleChart )
596 aDomainInfos.push_back( aDomainInfo );
602 aDomainInfos.push_back( aDomainInfo );
612 aDomainInfos.push_back( aDomainInfo );
618 aDomainInfos.push_back( aDomainInfo );
626 m_xSeries, Reference< chart2::XChartDocument >(
GetImport().GetModel(), uno::UNO_QUERY ) );
652 for( std::vector< DomainInfo >::reverse_iterator aIt( aDomainInfos.rbegin() ); aIt!= aDomainInfos.rend(); ++aIt )
654 DomainInfo aDomainInfo( *aIt );
655 Reference< chart2::data::XLabeledDataSequence2 > xLabeledSeq =
656 lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange,
mxNewDoc,
m_xSeries );
657 if( xLabeledSeq.is() )
670 sal_Int32 nNewIndex = postponedSequence.first.first + nDomainCount;
680 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
690 pContext =
new SchXMLDomain2Context(
743 ,
const uno::Reference< frame::XModel >& xChartModel )
753 if( !seriesStyle.m_xOldAPISeries.is() )
756 aSeriesMap[seriesStyle.m_xSeries] = seriesStyle.m_xOldAPISeries;
765 seriesStyle.m_xOldAPISeries = aSeriesMap[seriesStyle.m_xSeries];
782 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
809 catch( uno::Exception & )
822 = { {
"LineStyle",
"LabelBorderStyle" },
823 {
"LineWidth",
"LabelBorderWidth" },
824 {
"LineColor",
"LabelBorderColor" },
828 {
"LineDashName",
"LabelBorderDashName" },
829 {
"LineTransparence",
"LabelBorderTransparency" },
830 {
"FillStyle",
"LabelFillStyle" },
831 {
"FillBackground",
"LabelFillBackground" },
832 {
"FillHatchName",
"LabelFillHatchName" },
833 {
"FillColor",
"LabelFillColor" } };
840 , OUString& rCurrStyleName
853 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
854 if( !xSeriesProp.is() )
857 if( seriesStyle.mnAttachedAxis != 1 )
859 xSeriesProp->setPropertyValue(
"Axis"
860 , uno::makeAny(chart::ChartAxisAssign::SECONDARY_Y) );
863 if( seriesStyle.msStyleName.isEmpty())
866 if( rCurrStyleName != seriesStyle.msStyleName )
868 rCurrStyleName = seriesStyle.msStyleName;
879 if (!pPropStyleContext)
885 bool bHasErrorBarRangesFromData =
false;
887 const OUString aErrorBarStylePropName(
"ErrorBarStyle");
892 xSeriesProp->setPropertyValue( aErrorBarStylePropName, aErrorBarStyle );
894 bHasErrorBarRangesFromData =
895 ( ( aErrorBarStyle >>= eEBStyle ) &&
896 eEBStyle == chart::ErrorBarStyle::FROM_DATA );
905 seriesStyle.m_xSeries,
916 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
926 if (pLabelPropStyleContext)
930 uno::Reference<beans::XPropertySetInfo> xSeriesPropInfo(
931 xSeriesProp->getPropertySetInfo());
935 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
937 && xSeriesPropInfo->hasPropertyByName(rPropPair.second))
938 xSeriesProp->setPropertyValue(rPropPair.second, aPropValue);
944 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
945 lcl_setSymbolSizeIfNeeded( xSeriesProp, rImport );
946 if( bHasErrorBarRangesFromData )
947 lcl_insertErrorBarLSequencesToMap( rInOutLSequencesPerIndex, xSeriesProp );
950 catch(
const uno::Exception & )
962 OUString
const & rCurrentStyleName )
969 OUString aServiceName;
972 if (!rCurrentStyleName.isEmpty())
974 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, rCurrentStyleName);
977 pPropStyleContext = pCurrent;
981 aAny >>= aServiceName;
986 if (!regressionStyle.msStyleName.isEmpty())
988 XMLPropStyleContext* pCurrent = lcl_GetStylePropContext(pStylesCtxt, rpStyle, regressionStyle.msStyleName);
991 pPropStyleContext = pCurrent;
995 aAny >>= aServiceName;
1000 if( !aServiceName.isEmpty() )
1003 Reference< chart2::XRegressionCurve > xRegCurve( xMSF->createInstance( aServiceName ), uno::UNO_QUERY_THROW );
1004 Reference< chart2::XRegressionCurveContainer > xRegCurveCont( regressionStyle.m_xSeries, uno::UNO_QUERY_THROW );
1007 if( pPropStyleContext !=
nullptr)
1010 xRegCurve->setEquationProperties( regressionStyle.m_xEquationProperties );
1012 xRegCurveCont->addRegressionCurve( xRegCurve );
1015 catch(
const uno::Exception& )
1027 , OUString& rCurrStyleName )
1037 uno::Reference< beans::XPropertySet > xNewSeriesProp(seriesStyle.m_xSeries,uno::UNO_QUERY);
1039 if (seriesStyle.m_xErrorXProperties.is())
1040 xNewSeriesProp->setPropertyValue(
"ErrorBarX",uno::makeAny(seriesStyle.m_xErrorXProperties));
1042 if (seriesStyle.m_xErrorYProperties.is())
1043 xNewSeriesProp->setPropertyValue(
"ErrorBarY",uno::makeAny(seriesStyle.m_xErrorYProperties));
1048 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1049 if( !xSeriesProp.is() )
1052 if( !seriesStyle.msStyleName.isEmpty())
1054 if( rCurrStyleName != seriesStyle.msStyleName )
1056 rCurrStyleName = seriesStyle.msStyleName;
1065 if( pPropStyleContext )
1068 switch( seriesStyle.meType )
1071 xSeriesProp->getPropertyValue(
"DataMeanValueProperties") >>= xStatPropSet;
1074 xSeriesProp->getPropertyValue(
"DataErrorProperties") >>= xStatPropSet;
1079 if( xStatPropSet.is())
1084 catch(
const uno::Exception & )
1096 , OUString& rCurrStyleName
1099 ,
bool bIsStockChart,
bool bIsDonutChart,
bool bSwitchOffLinesForScatter )
1106 if( seriesStyle.m_nPointIndex == -1 )
1109 uno::Reference< beans::XPropertySet > xSeriesProp( seriesStyle.m_xOldAPISeries );
1110 if(!xSeriesProp.is())
1122 for( sal_Int32
i = 0;
i < seriesStyle.m_nPointRepeat;
i++ )
1126 uno::Reference< beans::XPropertySet > xPointProp(
1130 if( !xPointProp.is() )
1136 if( rCurrStyleName != seriesStyle.msSeriesStyleNameForDonuts )
1138 rCurrStyleName = seriesStyle.msSeriesStyleNameForDonuts;
1147 if( pPropStyleContext )
1154 if( bSwitchOffLinesForScatter )
1155 xPointProp->setPropertyValue(
"Lines",uno::makeAny(
false));
1157 catch(
const uno::Exception & )
1161 if( rCurrStyleName != seriesStyle.msStyleName )
1163 rCurrStyleName = seriesStyle.msStyleName;
1172 if (pPropStyleContext)
1175 auto pItLabel = std::find_if(
1180 && rStyle.msStyleNameOfParent == seriesStyle.msStyleName;
1192 if (pLabelPropStyleContext)
1196 uno::Reference<beans::XPropertySetInfo> xPointPropInfo(
1197 xPointProp->getPropertySetInfo());
1201 rPropPair.first, pLabelPropStyleContext, pStylesCtxt));
1203 && xPointPropInfo->hasPropertyByName(rPropPair.second))
1204 xPointProp->setPropertyValue(rPropPair.second, aPropValue);
1210 if( seriesStyle.mbSymbolSizeForSeriesIsMissingInFile )
1211 lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
1213 lcl_setLinkNumberFormatToSourceIfNeeded( xPointProp, pPropStyleContext, pStylesCtxt );
1217 if(
auto nLabelCount = seriesStyle.mCustomLabels.size(); nLabelCount > 0)
1219 Sequence< Reference<chart2::XDataPointCustomLabelField>> xLabels(nLabelCount);
1221 for(
auto j = 0; j< xLabels.getLength(); ++j )
1223 Reference< chart2::XDataPointCustomLabelField > xCustomLabel = chart2::DataPointCustomLabelField::create(xContext);
1224 xLabels[j] = xCustomLabel;
1225 xCustomLabel->setString(seriesStyle.mCustomLabels[j]);
1226 xCustomLabel->setFieldType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT);
1230 uno::Reference<beans::XPropertySetInfo> xPointPropInfo
1231 = xPointProp->getPropertySetInfo();
1232 if (xPointPropInfo.is())
1234 uno::Sequence<beans::Property>
aProperties = xPointPropInfo->getProperties();
1235 for (
const auto& rProperty : std::as_const(aProperties))
1237 if (!rProperty.Name.startsWith(
"Char")
1238 || rProperty.Name.startsWith(
"Chart"))
1243 xCustomLabel->setPropertyValue(
1244 rProperty.Name, xPointProp->getPropertyValue(rProperty.Name));
1248 xPointProp->setPropertyValue(
"CustomLabelFields",
uno::Any(xLabels));
1249 xPointProp->setPropertyValue(
"DataCaption",
uno::Any(chart::ChartDataCaption::CUSTOM));
1252 if( seriesStyle.mCustomLabelPos[0] != 0.0 || seriesStyle.mCustomLabelPos[1] != 0.0 )
1254 chart2::RelativePosition aCustomlabelPosition;
1255 aCustomlabelPosition.Primary = seriesStyle.mCustomLabelPos[0];
1256 aCustomlabelPosition.Secondary = seriesStyle.mCustomLabelPos[1];
1257 xPointProp->setPropertyValue(
"CustomLabelPosition",
uno::Any(aCustomlabelPosition));
1260 catch(
const uno::Exception & )
1262 TOOLS_INFO_EXCEPTION(
"xmloff.chart",
"Exception caught during setting styles to data points" );
1272 for (
auto const& seriesStyle : rSeriesStyleVector)
1279 uno::Reference< beans::XPropertySet > xSeries( seriesStyle.m_xOldAPISeries );
1283 xSeries->setPropertyValue(
"Lines",uno::makeAny(
false));
1285 catch( uno::Exception & )
tools::SvRef< SvBaseLink > xSink
OUString maGlobalChartTypeName
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
OUString maSeriesChartTypeName
bool & mrGlobalChartTypeUsedBySeries
constexpr sal_uInt16 XML_NAMESPACE_CHART
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)
static void switchSeriesLinesOff(::std::vector< DataRowPointStyle > &rSeriesStyleVector)
tSchXMLLSequencesPerIndex maPostponedSequences
bool mbSymbolSizeIsMissingInFile
static css::uno::Reference< css::beans::XPropertySet > createOldAPISeriesPropertySet(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::frame::XModel > &xChartModel)
virtual void SAL_CALL startFastElement(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
SvXMLStylesContext * GetAutoStylesContext() const
SvXMLImport & GetImport()
css::uno::Any maSymbolTypeDefault
css::uno::Reference< css::chart2::XDataSeries > m_xSeries
SvXMLNamespaceMap & GetNamespaceMap()
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
static void setDefaultsToSeries(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles)
tSchXMLLSequencesPerIndex & mrLSequencesPerIndex
PropertiesInfo aProperties
static void setStylesToStatisticsObjects(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString &rCurrStyleName)
css::uno::Any maDataCaptionDefault
static void DeleteDataSeries(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::chart2::XChartDocument > &xDoc)
css::awt::Size maChartSize
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
#define XMLOFF_WARN_UNKNOWN(area, rIter)
SchXMLAxis * mpAttachedAxis
sal_uInt16 GetKeyByAttrValueQName(const OUString &rAttrName, OUString *pLocalName) const
::std::pair< tSchXMLIndex, SchXMLLabeledSequencePart > tSchXMLIndexWithPart
static bool isCandleStickSeries(const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::frame::XModel > &xChartModel)
virtual ~SchXMLSeries2Context() override
#define DBG_UNHANDLED_EXCEPTION(...)
::std::vector< OUString > maDomainAddresses
css::uno::Any maErrorMarginDefault
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
static css::uno::Reference< css::chart2::XDataSeries > GetNewDataSeries(const css::uno::Reference< css::chart2::XChartDocument > &xDoc, sal_Int32 nCoordinateSystemIndex, const OUString &rChartTypeName, bool bPushLastChartType)
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 void initSeriesPropertySets(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, 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)
sal_Int32 nCurrentDataIndex
css::uno::Any maConstantErrorHighDefault
sal_Int32 nFirstFirstDomainIndex
OUString aFirstFirstDomainAddress
virtual bool isEmptyDataStyleName()
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
::std::vector< RegressionStyle > & mrRegressionStyleVector
const std::pair< OUString, OUString > aApiToLabelFooPairs[]
static void setStylesToSeries(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString &rCurrStyleName, const SchXMLImportHelper &rImportHelper, const SvXMLImport &rImport, bool bIsStockChart, tSchXMLLSequencesPerIndex &rInOutLSequencesPerIndex)
static void setStylesToRegressionCurves(SeriesDefaultsAndStyles &rSeriesDefaultsAndStyles, const SvXMLStylesContext *pStylesCtxt, const SvXMLStyleContext *&rpStyle, OUString const &rCurrStyleName)
css::uno::Any maRegressionCurvesDefault
static XmlStyleFamily GetChartFamilyID()
sal_Int32 mnDataPointIndex
DataRowPointStyle mDataLabel
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)
::std::vector< RegressionStyle > maRegressionStyleVector
css::uno::Any maPercentageErrorDefault
With this class you can import a
element containing its data as element o...
OUString msStyleNameOfParent
bool mbSymbolSizeForSeriesIsMissingInFile
OUString aFirstSecondDomainAddress
This class deliberately does not support XWeak, to improve performance when loading large documents...
GlobalSeriesImportInfo & m_rGlobalSeriesImportInfo
#define TOOLS_INFO_EXCEPTION(area, stream)
css::uno::Any maMeanValueDefault
Reference< XMultiServiceFactory > getProcessServiceFactory()
const css::uno::Reference< css::chart::XChartDocument > & GetChartDocument() const
::std::vector< DataRowPointStyle > maSeriesStyleVector
#define SAL_WARN_IF(condition, area, stream)
::std::vector< SchXMLAxis > & mrAxes
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)
css::uno::Reference< css::chart2::XChartDocument > mxNewDoc
const css::uno::Reference< css::frame::XModel > & GetModel() const
Reference< XComponentContext > getProcessComponentContext()
Sequence< sal_Int8 > aSeq
css::uno::Any maErrorCategoryDefault
::std::vector< DataRowPointStyle > & mrStyleVector
css::uno::Any maErrorIndicatorDefault
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
sal_Int32 nFirstSecondDomainIndex
::std::vector< OUString > mCustomLabels
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
::std::multimap< tSchXMLIndexWithPart, css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tSchXMLLSequencesPerIndex
SchXMLImportHelper & mrImportHelper
bool & rbAllRangeAddressesAvailable
css::uno::Any maConstantErrorLowDefault