1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "drawingml/chart/seriescontext.hxx"
22 #include "drawingml/shapepropertiescontext.hxx"
23 #include "drawingml/textbodycontext.hxx"
24 #include "drawingml/chart/datasourcecontext.hxx"
25 #include "drawingml/chart/seriesmodel.hxx"
26 #include "drawingml/chart/titlecontext.hxx"
32 using ::oox::core::ContextHandler2
;
33 using ::oox::core::ContextHandler2Helper
;
34 using ::oox::core::ContextHandlerRef
;
38 ContextHandlerRef
lclDataLabelSharedCreateContext( ContextHandler2
& rContext
,
39 sal_Int32 nElement
, const AttributeList
& rAttribs
, DataLabelModelBase
& orModel
, bool bMSO2007
)
41 if( rContext
.isRootElement() ) switch( nElement
)
43 case C_TOKEN( delete ):
44 orModel
.mbDeleted
= rAttribs
.getBool( XML_val
, !bMSO2007
);
46 case C_TOKEN( dLblPos
):
47 orModel
.monLabelPos
= rAttribs
.getToken( XML_val
, XML_TOKEN_INVALID
);
49 case C_TOKEN( numFmt
):
50 orModel
.maNumberFormat
.setAttributes( rAttribs
);
52 case C_TOKEN( showBubbleSize
):
53 orModel
.mobShowBubbleSize
= rAttribs
.getBool( XML_val
);
55 case C_TOKEN( showCatName
):
56 orModel
.mobShowCatName
= rAttribs
.getBool( XML_val
);
58 case C_TOKEN( showLegendKey
):
59 orModel
.mobShowLegendKey
= rAttribs
.getBool( XML_val
);
61 case C_TOKEN( showPercent
):
62 orModel
.mobShowPercent
= rAttribs
.getBool( XML_val
);
64 case C_TOKEN( showSerName
):
65 orModel
.mobShowSerName
= rAttribs
.getBool( XML_val
);
67 case C_TOKEN( showVal
):
68 orModel
.mobShowVal
= rAttribs
.getBool( XML_val
);
70 case C_TOKEN( separator
):
71 // collect separator text in onCharacters()
74 return new ShapePropertiesContext( rContext
, orModel
.mxShapeProp
.create() );
76 return new TextBodyContext( rContext
, orModel
.mxTextProp
.create() );
81 void lclDataLabelSharedCharacters( ContextHandler2
& rContext
, const OUString
& rChars
, DataLabelModelBase
& orModel
)
83 if( rContext
.isCurrentElement( C_TOKEN( separator
) ) )
84 orModel
.moaSeparator
= rChars
;
89 DataLabelContext::DataLabelContext( ContextHandler2Helper
& rParent
, DataLabelModel
& rModel
) :
90 ContextBase
< DataLabelModel
>( rParent
, rModel
)
94 DataLabelContext::~DataLabelContext()
98 ContextHandlerRef
DataLabelContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
100 mrModel
.mbDeleted
= false;
101 if( isRootElement() ) switch( nElement
)
104 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
106 case C_TOKEN( layout
):
107 return new LayoutContext( *this, mrModel
.mxLayout
.create() );
109 return new TextContext( *this, mrModel
.mxText
.create() );
111 bool bMSO2007
= getFilter().isMSO2007Document();
112 return lclDataLabelSharedCreateContext( *this, nElement
, rAttribs
, mrModel
, bMSO2007
);
115 void DataLabelContext::onCharacters( const OUString
& rChars
)
117 lclDataLabelSharedCharacters( *this, rChars
, mrModel
);
120 DataLabelsContext::DataLabelsContext( ContextHandler2Helper
& rParent
, DataLabelsModel
& rModel
) :
121 ContextBase
< DataLabelsModel
>( rParent
, rModel
)
125 DataLabelsContext::~DataLabelsContext()
129 ContextHandlerRef
DataLabelsContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
131 mrModel
.mbDeleted
= false;
132 bool bMSO2007Doc
= getFilter().isMSO2007Document();
133 if( isRootElement() ) switch( nElement
)
135 case C_TOKEN( dLbl
):
136 return new DataLabelContext( *this, mrModel
.maPointLabels
.create(bMSO2007Doc
) );
137 case C_TOKEN( leaderLines
):
138 return new ShapePrWrapperContext( *this, mrModel
.mxLeaderLines
.create() );
139 case C_TOKEN( showLeaderLines
):
140 mrModel
.mbShowLeaderLines
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
143 return lclDataLabelSharedCreateContext( *this, nElement
, rAttribs
, mrModel
, bMSO2007Doc
);
146 void DataLabelsContext::onCharacters( const OUString
& rChars
)
148 lclDataLabelSharedCharacters( *this, rChars
, mrModel
);
151 PictureOptionsContext::PictureOptionsContext( ContextHandler2Helper
& rParent
, PictureOptionsModel
& rModel
) :
152 ContextBase
< PictureOptionsModel
>( rParent
, rModel
)
156 PictureOptionsContext::~PictureOptionsContext()
160 ContextHandlerRef
PictureOptionsContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
162 bool bMSO2007Doc
= getFilter().isMSO2007Document();
163 if( isRootElement() ) switch( nElement
)
165 case C_TOKEN( applyToEnd
):
166 mrModel
.mbApplyToEnd
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
168 case C_TOKEN( applyToFront
):
169 mrModel
.mbApplyToFront
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
171 case C_TOKEN( applyToSides
):
172 mrModel
.mbApplyToSides
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
174 case C_TOKEN( pictureFormat
):
175 mrModel
.mnPictureFormat
= rAttribs
.getToken( XML_val
, XML_stretch
);
177 case C_TOKEN( pictureStackUnit
):
178 mrModel
.mfStackUnit
= rAttribs
.getDouble( XML_val
, 1.0 );
184 ErrorBarContext::ErrorBarContext( ContextHandler2Helper
& rParent
, ErrorBarModel
& rModel
) :
185 ContextBase
< ErrorBarModel
>( rParent
, rModel
)
189 ErrorBarContext::~ErrorBarContext()
193 ContextHandlerRef
ErrorBarContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
195 bool bMSO2007Doc
= getFilter().isMSO2007Document();
196 if( isRootElement() ) switch( nElement
)
198 case C_TOKEN( errBarType
):
199 mrModel
.mnTypeId
= rAttribs
.getToken( XML_val
, XML_both
);
201 case C_TOKEN( errDir
):
202 mrModel
.mnDirection
= rAttribs
.getToken( XML_val
, XML_TOKEN_INVALID
);
204 case C_TOKEN( errValType
):
205 mrModel
.mnValueType
= rAttribs
.getToken( XML_val
, XML_fixedVal
);
207 case C_TOKEN( minus
):
208 return new DataSourceContext( *this, mrModel
.maSources
.create( ErrorBarModel::MINUS
) );
209 case C_TOKEN( noEndCap
):
210 mrModel
.mbNoEndCap
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
212 case C_TOKEN( plus
):
213 return new DataSourceContext( *this, mrModel
.maSources
.create( ErrorBarModel::PLUS
) );
214 case C_TOKEN( spPr
):
215 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
217 mrModel
.mfValue
= rAttribs
.getDouble( XML_val
, 0.0 );
223 TrendlineLabelContext::TrendlineLabelContext( ContextHandler2Helper
& rParent
, TrendlineLabelModel
& rModel
) :
224 ContextBase
< TrendlineLabelModel
>( rParent
, rModel
)
228 TrendlineLabelContext::~TrendlineLabelContext()
232 ContextHandlerRef
TrendlineLabelContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
234 if( isRootElement() ) switch( nElement
)
236 case C_TOKEN( layout
):
237 return new LayoutContext( *this, mrModel
.mxLayout
.create() );
238 case C_TOKEN( numFmt
):
239 mrModel
.maNumberFormat
.setAttributes( rAttribs
);
241 case C_TOKEN( spPr
):
242 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
244 return new TextContext( *this, mrModel
.mxText
.create() );
245 case C_TOKEN( txPr
):
246 return new TextBodyContext( *this, mrModel
.mxTextProp
.create() );
251 TrendlineContext::TrendlineContext( ContextHandler2Helper
& rParent
, TrendlineModel
& rModel
) :
252 ContextBase
< TrendlineModel
>( rParent
, rModel
)
256 TrendlineContext::~TrendlineContext()
260 ContextHandlerRef
TrendlineContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
262 bool bMSO2007Doc
= getFilter().isMSO2007Document();
263 if( isRootElement() ) switch( nElement
)
265 case C_TOKEN( backward
):
266 mrModel
.mfBackward
= rAttribs
.getDouble( XML_val
, 0.0 );
268 case C_TOKEN( dispEq
):
269 mrModel
.mbDispEquation
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
271 case C_TOKEN( dispRSqr
):
272 mrModel
.mbDispRSquared
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
274 case C_TOKEN( forward
):
275 mrModel
.mfForward
= rAttribs
.getDouble( XML_val
, 0.0 );
277 case C_TOKEN( intercept
):
278 mrModel
.mfIntercept
= rAttribs
.getDouble( XML_val
, 0.0 );
280 case C_TOKEN( name
):
281 return this; // collect name in onCharacters()
282 case C_TOKEN( order
):
283 mrModel
.mnOrder
= rAttribs
.getInteger( XML_val
, 2 );
285 case C_TOKEN( period
):
286 mrModel
.mnPeriod
= rAttribs
.getInteger( XML_val
, 2 );
288 case C_TOKEN( spPr
):
289 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
290 case C_TOKEN( trendlineLbl
):
291 return new TrendlineLabelContext( *this, mrModel
.mxLabel
.create() );
292 case C_TOKEN( trendlineType
):
293 mrModel
.mnTypeId
= rAttribs
.getToken( XML_val
, XML_linear
);
299 void TrendlineContext::onCharacters( const OUString
& rChars
)
301 if( isCurrentElement( C_TOKEN( name
) ) )
302 mrModel
.maName
= rChars
;
305 DataPointContext::DataPointContext( ContextHandler2Helper
& rParent
, DataPointModel
& rModel
) :
306 ContextBase
< DataPointModel
>( rParent
, rModel
)
310 DataPointContext::~DataPointContext()
314 ContextHandlerRef
DataPointContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
316 bool bMSO2007Doc
= getFilter().isMSO2007Document();
317 switch( getCurrentElement() )
322 case C_TOKEN( bubble3D
):
323 mrModel
.mobBubble3d
= rAttribs
.getBool( XML_val
);
325 case C_TOKEN( explosion
):
326 // if the 'val' attribute is missing, series explosion remains unchanged
327 mrModel
.monExplosion
= rAttribs
.getInteger( XML_val
);
330 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
332 case C_TOKEN( invertIfNegative
):
333 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
335 case C_TOKEN( marker
):
337 case C_TOKEN( pictureOptions
):
338 return new PictureOptionsContext( *this, mrModel
.mxPicOptions
.create(bMSO2007Doc
) );
339 case C_TOKEN( spPr
):
340 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
344 case C_TOKEN( marker
):
347 case C_TOKEN( size
):
348 mrModel
.monMarkerSize
= rAttribs
.getInteger( XML_val
, 5 );
350 case C_TOKEN( spPr
):
351 return new ShapePropertiesContext( *this, mrModel
.mxMarkerProp
.create() );
352 case C_TOKEN( symbol
):
353 mrModel
.monMarkerSymbol
= rAttribs
.getToken( XML_val
, XML_none
);
361 SeriesContextBase::SeriesContextBase( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
362 ContextBase
< SeriesModel
>( rParent
, rModel
)
366 SeriesContextBase::~SeriesContextBase()
370 ContextHandlerRef
SeriesContextBase::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
372 switch( getCurrentElement() )
378 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
380 case C_TOKEN( order
):
381 mrModel
.mnOrder
= rAttribs
.getInteger( XML_val
, -1 );
383 case C_TOKEN( spPr
):
384 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
386 return new TextContext( *this, mrModel
.mxText
.create() );
390 case C_TOKEN( marker
):
393 case C_TOKEN( size
):
394 mrModel
.mnMarkerSize
= rAttribs
.getInteger( XML_val
, 5 );
396 case C_TOKEN( spPr
):
397 return new ShapePropertiesContext( *this, mrModel
.mxMarkerProp
.create() );
398 case C_TOKEN( symbol
):
399 mrModel
.mnMarkerSymbol
= rAttribs
.getToken( XML_val
, XML_none
);
407 AreaSeriesContext::AreaSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
408 SeriesContextBase( rParent
, rModel
)
412 AreaSeriesContext::~AreaSeriesContext()
416 ContextHandlerRef
AreaSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
418 bool bMSO2007Doc
= getFilter().isMSO2007Document();
419 switch( getCurrentElement() )
425 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
426 case C_TOKEN( errBars
):
427 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create(bMSO2007Doc
) );
428 case C_TOKEN( dLbls
):
429 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
431 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
432 case C_TOKEN( trendline
):
433 return new TrendlineContext( *this, mrModel
.maTrendlines
.create(bMSO2007Doc
) );
435 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
439 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
442 BarSeriesContext::BarSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
443 SeriesContextBase( rParent
, rModel
)
447 BarSeriesContext::~BarSeriesContext()
451 ContextHandlerRef
BarSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
453 bool bMSO2007Doc
= getFilter().isMSO2007Document();
454 switch( getCurrentElement() )
460 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
461 case C_TOKEN( dLbls
):
462 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
464 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
465 case C_TOKEN( errBars
):
466 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create(bMSO2007Doc
) );
467 case C_TOKEN( invertIfNegative
):
468 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
470 case C_TOKEN( pictureOptions
):
471 return new PictureOptionsContext( *this, mrModel
.mxPicOptions
.create(bMSO2007Doc
) );
472 case C_TOKEN( shape
):
473 mrModel
.monShape
= rAttribs
.getToken( bMSO2007Doc
? XML_val
: XML_box
);
475 case C_TOKEN( trendline
):
476 return new TrendlineContext( *this, mrModel
.maTrendlines
.create(bMSO2007Doc
) );
478 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
482 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
485 BubbleSeriesContext::BubbleSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
486 SeriesContextBase( rParent
, rModel
)
490 BubbleSeriesContext::~BubbleSeriesContext()
494 ContextHandlerRef
BubbleSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
496 bool bMSO2007Doc
= getFilter().isMSO2007Document();
497 switch( getCurrentElement() )
502 case C_TOKEN( bubble3D
):
503 mrModel
.mbBubble3d
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
505 case C_TOKEN( bubbleSize
):
506 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::POINTS
) );
507 case C_TOKEN( dLbls
):
508 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
510 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
511 case C_TOKEN( errBars
):
512 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create(bMSO2007Doc
) );
513 case C_TOKEN( invertIfNegative
):
514 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
516 case C_TOKEN( trendline
):
517 return new TrendlineContext( *this, mrModel
.maTrendlines
.create(bMSO2007Doc
) );
518 case C_TOKEN( xVal
):
519 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
520 case C_TOKEN( yVal
):
521 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
525 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
528 LineSeriesContext::LineSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
529 SeriesContextBase( rParent
, rModel
)
533 LineSeriesContext::~LineSeriesContext()
537 ContextHandlerRef
LineSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
539 bool bMSO2007Doc
= getFilter().isMSO2007Document();
540 switch( getCurrentElement() )
546 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
547 case C_TOKEN( dLbls
):
548 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
550 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
551 case C_TOKEN( errBars
):
552 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create(bMSO2007Doc
) );
553 case C_TOKEN( marker
):
555 case C_TOKEN( smooth
):
556 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
558 case C_TOKEN( trendline
):
559 return new TrendlineContext( *this, mrModel
.maTrendlines
.create(bMSO2007Doc
) );
561 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
565 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
568 PieSeriesContext::PieSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
569 SeriesContextBase( rParent
, rModel
)
573 PieSeriesContext::~PieSeriesContext()
577 ContextHandlerRef
PieSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
579 bool bMSO2007Doc
= getFilter().isMSO2007Document();
580 switch( getCurrentElement() )
586 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
587 case C_TOKEN( dLbls
):
588 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
590 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
591 case C_TOKEN( explosion
):
592 mrModel
.mnExplosion
= rAttribs
.getInteger( XML_val
, 0 );
595 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
599 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
602 RadarSeriesContext::RadarSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
603 SeriesContextBase( rParent
, rModel
)
607 RadarSeriesContext::~RadarSeriesContext()
611 ContextHandlerRef
RadarSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
613 bool bMSO2007Doc
= getFilter().isMSO2007Document();
614 switch( getCurrentElement() )
620 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
621 case C_TOKEN( dLbls
):
622 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
624 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
625 case C_TOKEN( marker
):
627 case C_TOKEN( smooth
):
628 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, bMSO2007Doc
);
631 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
635 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
638 ScatterSeriesContext::ScatterSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
639 SeriesContextBase( rParent
, rModel
)
643 ScatterSeriesContext::~ScatterSeriesContext()
647 ContextHandlerRef
ScatterSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
649 bool bMSO2007Doc
= getFilter().isMSO2007Document();
650 switch( getCurrentElement() )
655 case C_TOKEN( dLbls
):
656 return new DataLabelsContext( *this, mrModel
.mxLabels
.create(bMSO2007Doc
) );
658 return new DataPointContext( *this, mrModel
.maPoints
.create(bMSO2007Doc
) );
659 case C_TOKEN( errBars
):
660 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create(bMSO2007Doc
) );
661 case C_TOKEN( marker
):
663 case C_TOKEN( smooth
):
664 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, !bMSO2007Doc
);
666 case C_TOKEN( trendline
):
667 return new TrendlineContext( *this, mrModel
.maTrendlines
.create(bMSO2007Doc
) );
668 case C_TOKEN( xVal
):
669 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
670 case C_TOKEN( yVal
):
671 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
675 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
678 SurfaceSeriesContext::SurfaceSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
679 SeriesContextBase( rParent
, rModel
)
683 SurfaceSeriesContext::~SurfaceSeriesContext()
687 ContextHandlerRef
SurfaceSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
689 switch( getCurrentElement() )
695 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
697 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
701 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
705 } // namespace drawingml
708 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */