29#include <oox/token/namespaces.hxx>
30#include <oox/token/tokens.hxx>
34using ::oox::core::ContextHandler2;
35using ::oox::core::ContextHandler2Helper;
41 sal_Int32 nElement,
const AttributeList& rAttribs, DataLabelModelBase& orModel,
bool bMSO2007 )
43 if( rContext.isRootElement() )
switch( nElement )
45 case C_TOKEN(
delete ):
46 orModel.mbDeleted = rAttribs.getBool( XML_val, !bMSO2007 );
48 case C_TOKEN( dLblPos ):
51 case C_TOKEN( numFmt ):
52 orModel.maNumberFormat.setAttributes( rAttribs );
54 case C_TOKEN( showBubbleSize ):
55 orModel.mobShowBubbleSize = rAttribs.getBool( XML_val );
57 case C_TOKEN( showCatName ):
58 orModel.mobShowCatName = rAttribs.getBool( XML_val );
60 case C_TOKEN( showLegendKey ):
61 orModel.mobShowLegendKey = rAttribs.getBool( XML_val );
63 case C_TOKEN( showPercent ):
64 orModel.mobShowPercent = rAttribs.getBool( XML_val );
66 case C_TOKEN( showSerName ):
67 orModel.mobShowSerName = rAttribs.getBool( XML_val );
69 case C_TOKEN( showVal ):
70 orModel.mobShowVal = rAttribs.getBool( XML_val );
72 case C_TOKEN( separator ):
76 return new ShapePropertiesContext( rContext, orModel.mxShapeProp.
create() );
78 return new TextBodyContext( rContext, orModel.mxTextProp.
create() );
83void lclDataLabelSharedCharacters( ContextHandler2
const & rContext,
const OUString& rChars, DataLabelModelBase& orModel )
85 if( rContext.isCurrentElement( C_TOKEN( separator ) ) )
86 orModel.moaSeparator = rChars;
103 if( isRootElement() )
110 case C_TOKEN( layout ):
114 case C_TOKEN( extLst ):
120 switch( getCurrentElement() )
122 case C_TOKEN( extLst ):
123 if ( nElement == C_TOKEN( ext ) )
127 if ( nElement == C15_TOKEN( showDataLabelsRange ) )
136 return lclDataLabelSharedCreateContext( *
this, nElement, rAttribs,
mrModel, bMSO2007 );
141 lclDataLabelSharedCharacters( *
this, rChars,
mrModel );
157 if( isRootElement() )
switch( nElement )
159 case C_TOKEN( dLbl ):
161 case C_TOKEN( leaderLines ):
163 case C_TOKEN( showLeaderLines ):
164 case C15_TOKEN( showLeaderLines ):
167 case C_TOKEN( extLst ):
171 return lclDataLabelSharedCreateContext( *
this, nElement, rAttribs,
mrModel, bMSO2007Doc );
176 lclDataLabelSharedCharacters( *
this, rChars,
mrModel );
191 if( isRootElement() )
switch( nElement )
193 case C_TOKEN( applyToEnd ):
196 case C_TOKEN( applyToFront ):
199 case C_TOKEN( applyToSides ):
202 case C_TOKEN( pictureFormat ):
205 case C_TOKEN( pictureStackUnit ):
224 if( isRootElement() )
switch( nElement )
226 case C_TOKEN( errBarType ):
229 case C_TOKEN( errDir ):
232 case C_TOKEN( errValType ):
235 case C_TOKEN( minus ):
237 case C_TOKEN( noEndCap ):
240 case C_TOKEN( plus ):
242 case C_TOKEN( spPr ):
262 if( isRootElement() )
switch( nElement )
264 case C_TOKEN( layout ):
266 case C_TOKEN( numFmt ):
269 case C_TOKEN( spPr ):
273 case C_TOKEN( txPr ):
291 if( isRootElement() )
switch( nElement )
296 case C_TOKEN( dispEq ):
299 case C_TOKEN( dispRSqr ):
305 case C_TOKEN( intercept ):
308 case C_TOKEN(
name ):
310 case C_TOKEN( order ):
313 case C_TOKEN( period ):
316 case C_TOKEN( spPr ):
318 case C_TOKEN( trendlineLbl ):
320 case C_TOKEN( trendlineType ):
329 if( isCurrentElement( C_TOKEN(
name ) ) )
345 switch( getCurrentElement() )
350 case C_TOKEN( bubble3D ):
353 case C_TOKEN( explosion ):
360 case C_TOKEN( invertIfNegative ):
363 case C_TOKEN( marker ):
365 case C_TOKEN( pictureOptions ):
367 case C_TOKEN( spPr ):
372 case C_TOKEN( marker ):
375 case C_TOKEN(
size ):
378 case C_TOKEN( spPr ):
380 case C_TOKEN( symbol ):
400 switch( getCurrentElement() )
408 case C_TOKEN( order ):
411 case C_TOKEN( spPr ):
415 case C_TOKEN( extLst ):
420 case C_TOKEN( marker ):
423 case C_TOKEN(
size ):
426 case C_TOKEN( spPr ):
428 case C_TOKEN( symbol ):
434 case C_TOKEN( extLst ):
462 switch( getCurrentElement() )
469 case C_TOKEN( errBars ):
471 case C_TOKEN( dLbls ):
475 case C_TOKEN( trendline ):
497 switch( getCurrentElement() )
504 case C_TOKEN( dLbls ):
508 case C_TOKEN( errBars ):
510 case C_TOKEN( invertIfNegative ):
513 case C_TOKEN( pictureOptions ):
515 case C_TOKEN( shape ):
518 case C_TOKEN( trendline ):
540 switch( getCurrentElement() )
545 case C_TOKEN( bubble3D ):
548 case C_TOKEN( bubbleSize ):
550 case C_TOKEN( dLbls ):
554 case C_TOKEN( errBars ):
556 case C_TOKEN( invertIfNegative ):
559 case C_TOKEN( trendline ):
561 case C_TOKEN( xVal ):
563 case C_TOKEN( yVal ):
583 switch( getCurrentElement() )
590 case C_TOKEN( dLbls ):
594 case C_TOKEN( errBars ):
596 case C_TOKEN( marker ):
598 case C_TOKEN( smooth ):
601 case C_TOKEN( trendline ):
623 switch( getCurrentElement() )
630 case C_TOKEN( dLbls ):
634 case C_TOKEN( explosion ):
657 switch( getCurrentElement() )
664 case C_TOKEN( dLbls ):
668 case C_TOKEN( marker ):
670 case C_TOKEN( smooth ):
693 switch( getCurrentElement() )
698 case C_TOKEN( dLbls ):
702 case C_TOKEN( errBars ):
704 case C_TOKEN( marker ):
706 case C_TOKEN( smooth ):
709 case C_TOKEN( trendline ):
711 case C_TOKEN( xVal ):
713 case C_TOKEN( yVal ):
732 switch( getCurrentElement() )
Provides access to attribute values of an element.
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
std::optional< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.
std::optional< double > getDouble(sal_Int32 nAttrToken) const
Returns the double value of the specified attribute.
bool has(key_type nKey) const
Returns true, if the object associated to the passed key exists.
XmlFilterBase & getFilter() const
Returns the filter instance.
bool isMSO2007Document() const
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ~AreaSeriesContext() override
AreaSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
BarSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ~BarSeriesContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ~BubbleSeriesContext() override
BubbleSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
Handler for a chart data point label context (c:dLbl element).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
DataLabelContext(::oox::core::ContextHandler2Helper &rParent, DataLabelModel &rModel)
virtual ~DataLabelContext() override
virtual void onCharacters(const OUString &rChars) override
Handler for a chart data point label context (c:dLbls element).
DataLabelsContext(::oox::core::ContextHandler2Helper &rParent, DataLabelsModel &rModel)
virtual ~DataLabelsContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onCharacters(const OUString &rChars) override
Handler for a chart data point context (c:dPt element).
virtual ~DataPointContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
DataPointContext(::oox::core::ContextHandler2Helper &rParent, DataPointModel &rModel)
Handler for a data source context (c:bubbleSize, c:cat, c:minus, c:plus, c:val, c:xVal,...
Handler for a series error bar context (c:errBars element).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ~ErrorBarContext() override
ErrorBarContext(::oox::core::ContextHandler2Helper &rParent, ErrorBarModel &rModel)
Handler for a chart layout context (c:layout element).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
LineSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ~LineSeriesContext() override
ModelType & create(KeyType eKey)
Handler for fill bitmap settings (c:pictureOptions element).
PictureOptionsContext(::oox::core::ContextHandler2Helper &rParent, PictureOptionsModel &rModel)
virtual ~PictureOptionsContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
PieSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ~PieSeriesContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
RadarSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ~RadarSeriesContext() override
ScatterSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ~ScatterSeriesContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Handler base class for chart data series contexts (c:ser element).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
SeriesContextBase(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
virtual ~SeriesContextBase() override
Help class for all contexts that have only the c:spPr child element.
virtual ~SurfaceSeriesContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
SurfaceSeriesContext(::oox::core::ContextHandler2Helper &rParent, SeriesModel &rModel)
Handler for a chart text context (c:tx element).
Handler for a series trendline context (c:trendline element).
virtual ~TrendlineContext() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onCharacters(const OUString &rChars) override
TrendlineContext(::oox::core::ContextHandler2Helper &rParent, TrendlineModel &rModel)
Handler for a series trendline label context (c:trendlineLbl element).
TrendlineLabelContext(::oox::core::ContextHandler2Helper &rParent, TrendlineLabelModel &rModel)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ~TrendlineLabelContext() override
sal_Int32 getToken(const Context &rContext, const char *pToken)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
::rtl::Reference< ContextHandler > ContextHandlerRef
std::optional< bool > mobShowDataLabelsRange
True = show data point value.
sal_Int32 mnIndex
Reference to the labels container.
TextRef mxText
Layout/position of the data point label frame.
ShapeRef mxLeaderLines
Settings for individual data point labels.
DataLabelVector maPointLabels
std::optional< sal_Int32 > monMarkerSize
Pie slice moved from pie center.
sal_Int32 mnIndex
True = show bubbles with 3D shade.
std::optional< sal_Int32 > monExplosion
Data point marker formatting.
bool mbInvertNeg
Unique data point index.
ShapeRef mxMarkerProp
Fill bitmap settings.
std::optional< sal_Int32 > monMarkerSymbol
Size of the series line marker (2...72).
PictureOptionsRef mxPicOptions
Data point formatting.
std::optional< bool > mobBubble3d
Series line marker symbol.
@ MINUS
Plus error bar values.
sal_Int32 mnValueType
Type of the error bars (plus/minus/both).
bool mbNoEndCap
Type of the values.
sal_Int32 mnTypeId
Direction of the error bars (x/y).
ShapeRef mxShapeProp
Source ranges for manual error bar values.
double mfValue
Error line formatting.
sal_Int32 mnDirection
Fixed value for several error bar types.
bool mbApplyToEnd
True = draw picture at left/right side of 3D data points.
sal_Int32 mnPictureFormat
Bitmap stacking unit.
bool mbApplyToSides
True = draw picture at front/back side of 3D data points.
bool mbApplyToFront
Bitmap mode (stretch/tile).
sal_Int32 mnMarkerSymbol
Size of the series line marker (2...72).
DataPointVector maPoints
All trendlines of this series.
sal_Int32 mnOrder
Series line marker symbol.
TrendlineVector maTrendlines
All error bars of this series.
sal_Int32 mnExplosion
3D bar shape type.
DataLabelsRef mxLabels
Series title source.
bool mbInvertNeg
True = show bubbles with 3D shade.
ErrorBarVector maErrorBars
Series source ranges.
@ DATALABELS
Data point size (e.g. bubble size in bubble charts).
@ VALUES
Data point categories.
@ POINTS
Data point values.
sal_Int32 mnMarkerSize
Series index used for automatic formatting.
bool mbBubble3d
Series order.
sal_Int32 mnIndex
Pie slice moved from pie center.
std::optional< sal_Int32 > monShape
Data point label settings for all points.
PictureOptionsRef mxPicOptions
Series formatting.
ShapeRef mxMarkerProp
Fill bitmap settings.
TextRef mxText
Data point marker formatting.
ShapeRef mxShapeProp
Explicit formatted data points.
bool mbSmooth
True = invert negative data points.
NumberFormat maNumberFormat
Text source of the label.
TextRef mxText
Layout/position of the frame.
LayoutRef mxLayout
Label text formatting.
TextBodyRef mxTextProp
Label frame formatting.
TrendlineLabelRef mxLabel
Trendline formatting.
sal_Int32 mnTypeId
Moving average period in range [2, 255].
std::optional< double > mfBackward
User-defined name of the trendline.
bool mbDispRSquared
True = show equation of the trendline.
bool mbDispEquation
Type of the trendline.
OUString maName
Trendline label text object.
std::optional< double > mfIntercept
Size of trendline behind last data point.
sal_Int32 mnPeriod
Polynomial order in range [2, 6].
sal_Int32 mnOrder
Crossing point with Y axis.
std::optional< double > mfForward
Size of trendline before first data point.