1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: seriescontext.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include "oox/drawingml/chart/seriescontext.hxx"
32 #include "oox/drawingml/shapepropertiescontext.hxx"
33 #include "oox/drawingml/textbodycontext.hxx"
34 #include "oox/drawingml/chart/datasourcecontext.hxx"
35 #include "oox/drawingml/chart/seriesmodel.hxx"
36 #include "oox/drawingml/chart/titlecontext.hxx"
38 using ::rtl::OUString
;
39 using ::oox::core::ContextHandler2
;
40 using ::oox::core::ContextHandler2Helper
;
41 using ::oox::core::ContextHandlerRef
;
47 // ============================================================================
51 ContextHandlerRef
lclDataLabelSharedCreateContext(
52 ContextHandler2
& rContext
, sal_Int32 nElement
, const AttributeList
& rAttribs
, DataLabelModelBase
& orModel
)
54 if( rContext
.isRootElement() ) switch( nElement
)
56 case C_TOKEN( delete ):
57 // default is 'false', not 'true' as specified
58 orModel
.mbDeleted
= rAttribs
.getBool( XML_val
, false );
60 case C_TOKEN( dLblPos
):
61 orModel
.monLabelPos
= rAttribs
.getToken( XML_val
, XML_TOKEN_INVALID
);
63 case C_TOKEN( numFmt
):
64 orModel
.maNumberFormat
.setAttributes( rAttribs
);
66 case C_TOKEN( showBubbleSize
):
67 orModel
.mobShowBubbleSize
= rAttribs
.getBool( XML_val
);
69 case C_TOKEN( showCatName
):
70 orModel
.mobShowCatName
= rAttribs
.getBool( XML_val
);
72 case C_TOKEN( showLegendKey
):
73 orModel
.mobShowLegendKey
= rAttribs
.getBool( XML_val
);
75 case C_TOKEN( showPercent
):
76 orModel
.mobShowPercent
= rAttribs
.getBool( XML_val
);
78 case C_TOKEN( showSerName
):
79 orModel
.mobShowSerName
= rAttribs
.getBool( XML_val
);
81 case C_TOKEN( showVal
):
82 orModel
.mobShowVal
= rAttribs
.getBool( XML_val
);
84 case C_TOKEN( separator
):
85 // collect separator text in onEndElement()
88 return new ShapePropertiesContext( rContext
, orModel
.mxShapeProp
.create() );
90 return new TextBodyContext( rContext
, orModel
.mxTextProp
.create() );
95 void lclDataLabelSharedEndElement( ContextHandler2
& rContext
, const OUString
& rChars
, DataLabelModelBase
& orModel
)
97 switch( rContext
.getCurrentElement() )
99 case C_TOKEN( separator
):
100 orModel
.moaSeparator
= rChars
;
107 // ============================================================================
109 DataLabelContext::DataLabelContext( ContextHandler2Helper
& rParent
, DataLabelModel
& rModel
) :
110 ContextBase
< DataLabelModel
>( rParent
, rModel
)
114 DataLabelContext::~DataLabelContext()
118 ContextHandlerRef
DataLabelContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
120 if( isRootElement() ) switch( nElement
)
123 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
125 case C_TOKEN( layout
):
126 return new LayoutContext( *this, mrModel
.mxLayout
.create() );
128 return new TextContext( *this, mrModel
.mxText
.create() );
130 return lclDataLabelSharedCreateContext( *this, nElement
, rAttribs
, mrModel
);
133 void DataLabelContext::onEndElement( const OUString
& rChars
)
135 lclDataLabelSharedEndElement( *this, rChars
, mrModel
);
138 // ============================================================================
140 DataLabelsContext::DataLabelsContext( ContextHandler2Helper
& rParent
, DataLabelsModel
& rModel
) :
141 ContextBase
< DataLabelsModel
>( rParent
, rModel
)
145 DataLabelsContext::~DataLabelsContext()
149 ContextHandlerRef
DataLabelsContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
151 if( isRootElement() ) switch( nElement
)
153 case C_TOKEN( dLbl
):
154 return new DataLabelContext( *this, mrModel
.maPointLabels
.create() );
155 case C_TOKEN( leaderLines
):
156 return new ShapePrWrapperContext( *this, mrModel
.mxLeaderLines
.create() );
157 case C_TOKEN( showLeaderLines
):
158 // default is 'false', not 'true' as specified
159 mrModel
.mbShowLeaderLines
= rAttribs
.getBool( XML_val
, false );
162 return lclDataLabelSharedCreateContext( *this, nElement
, rAttribs
, mrModel
);
165 void DataLabelsContext::onEndElement( const OUString
& rChars
)
167 lclDataLabelSharedEndElement( *this, rChars
, mrModel
);
170 // ============================================================================
172 PictureOptionsContext::PictureOptionsContext( ContextHandler2Helper
& rParent
, PictureOptionsModel
& rModel
) :
173 ContextBase
< PictureOptionsModel
>( rParent
, rModel
)
177 PictureOptionsContext::~PictureOptionsContext()
181 ContextHandlerRef
PictureOptionsContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
183 if( isRootElement() ) switch( nElement
)
185 case C_TOKEN( applyToEnd
):
186 // default is 'false', not 'true' as specified
187 mrModel
.mbApplyToEnd
= rAttribs
.getBool( XML_val
, false );
189 case C_TOKEN( applyToFront
):
190 // default is 'false', not 'true' as specified
191 mrModel
.mbApplyToFront
= rAttribs
.getBool( XML_val
, false );
193 case C_TOKEN( applyToSides
):
194 // default is 'false', not 'true' as specified
195 mrModel
.mbApplyToSides
= rAttribs
.getBool( XML_val
, false );
197 case C_TOKEN( pictureFormat
):
198 mrModel
.mnPictureFormat
= rAttribs
.getToken( XML_val
, XML_stretch
);
200 case C_TOKEN( pictureStackUnit
):
201 mrModel
.mfStackUnit
= rAttribs
.getDouble( XML_val
, 1.0 );
207 // ============================================================================
209 ErrorBarContext::ErrorBarContext( ContextHandler2Helper
& rParent
, ErrorBarModel
& rModel
) :
210 ContextBase
< ErrorBarModel
>( rParent
, rModel
)
214 ErrorBarContext::~ErrorBarContext()
218 ContextHandlerRef
ErrorBarContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
220 if( isRootElement() ) switch( nElement
)
222 case C_TOKEN( errBarType
):
223 mrModel
.mnTypeId
= rAttribs
.getToken( XML_val
, XML_both
);
225 case C_TOKEN( errDir
):
226 mrModel
.mnDirection
= rAttribs
.getToken( XML_val
, XML_TOKEN_INVALID
);
228 case C_TOKEN( errValType
):
229 mrModel
.mnValueType
= rAttribs
.getToken( XML_val
, XML_fixedVal
);
231 case C_TOKEN( minus
):
232 return new DataSourceContext( *this, mrModel
.maSources
.create( ErrorBarModel::MINUS
) );
233 case C_TOKEN( noEndCap
):
234 // default is 'false', not 'true' as specified
235 mrModel
.mbNoEndCap
= rAttribs
.getBool( XML_val
, false );
237 case C_TOKEN( plus
):
238 return new DataSourceContext( *this, mrModel
.maSources
.create( ErrorBarModel::PLUS
) );
239 case C_TOKEN( spPr
):
240 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
242 mrModel
.mfValue
= rAttribs
.getDouble( XML_val
, 0.0 );
248 // ============================================================================
250 TrendlineLabelContext::TrendlineLabelContext( ContextHandler2Helper
& rParent
, TrendlineLabelModel
& rModel
) :
251 ContextBase
< TrendlineLabelModel
>( rParent
, rModel
)
255 TrendlineLabelContext::~TrendlineLabelContext()
259 ContextHandlerRef
TrendlineLabelContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
261 if( isRootElement() ) switch( nElement
)
263 case C_TOKEN( layout
):
264 return new LayoutContext( *this, mrModel
.mxLayout
.create() );
265 case C_TOKEN( numFmt
):
266 mrModel
.maNumberFormat
.setAttributes( rAttribs
);
268 case C_TOKEN( spPr
):
269 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
271 return new TextContext( *this, mrModel
.mxText
.create() );
272 case C_TOKEN( txPr
):
273 return new TextBodyContext( *this, mrModel
.mxTextProp
.create() );
278 // ============================================================================
280 TrendlineContext::TrendlineContext( ContextHandler2Helper
& rParent
, TrendlineModel
& rModel
) :
281 ContextBase
< TrendlineModel
>( rParent
, rModel
)
285 TrendlineContext::~TrendlineContext()
289 ContextHandlerRef
TrendlineContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
291 if( isRootElement() ) switch( nElement
)
293 case C_TOKEN( backward
):
294 mrModel
.mfBackward
= rAttribs
.getDouble( XML_val
, 0.0 );
296 case C_TOKEN( dispEq
):
297 // default is 'false', not 'true' as specified
298 mrModel
.mbDispEquation
= rAttribs
.getBool( XML_val
, false );
300 case C_TOKEN( dispRSqr
):
301 // default is 'false', not 'true' as specified
302 mrModel
.mbDispRSquared
= rAttribs
.getBool( XML_val
, false );
304 case C_TOKEN( forward
):
305 mrModel
.mfForward
= rAttribs
.getDouble( XML_val
, 0.0 );
307 case C_TOKEN( intercept
):
308 mrModel
.mfIntercept
= rAttribs
.getDouble( XML_val
, 0.0 );
310 case C_TOKEN( name
):
311 return this; // collect name in onEndElement()
312 case C_TOKEN( order
):
313 mrModel
.mnOrder
= rAttribs
.getInteger( XML_val
, 2 );
315 case C_TOKEN( period
):
316 mrModel
.mnPeriod
= rAttribs
.getInteger( XML_val
, 2 );
318 case C_TOKEN( spPr
):
319 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
320 case C_TOKEN( trendlineLbl
):
321 return new TrendlineLabelContext( *this, mrModel
.mxLabel
.create() );
322 case C_TOKEN( trendlineType
):
323 mrModel
.mnTypeId
= rAttribs
.getToken( XML_val
, XML_linear
);
329 void TrendlineContext::onEndElement( const ::rtl::OUString
& rChars
)
331 switch( getCurrentElement() )
333 case C_TOKEN( name
):
334 mrModel
.maName
= rChars
;
339 // ============================================================================
341 DataPointContext::DataPointContext( ContextHandler2Helper
& rParent
, DataPointModel
& rModel
) :
342 ContextBase
< DataPointModel
>( rParent
, rModel
)
346 DataPointContext::~DataPointContext()
350 ContextHandlerRef
DataPointContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
352 switch( getCurrentElement() )
357 case C_TOKEN( bubble3D
):
358 mrModel
.mobBubble3d
= rAttribs
.getBool( XML_val
);
360 case C_TOKEN( explosion
):
361 // if the 'val' attribute is missing, series explosion remains unchanged
362 mrModel
.monExplosion
= rAttribs
.getInteger( XML_val
);
365 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
367 case C_TOKEN( invertIfNegative
):
368 // default is 'false', not 'true' as specified (value not derived from series!)
369 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, false );
371 case C_TOKEN( marker
):
373 case C_TOKEN( pictureOptions
):
374 return new PictureOptionsContext( *this, mrModel
.mxPicOptions
.create() );
375 case C_TOKEN( spPr
):
376 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
380 case C_TOKEN( marker
):
383 case C_TOKEN( size
):
384 mrModel
.monMarkerSize
= rAttribs
.getInteger( XML_val
, 5 );
386 case C_TOKEN( spPr
):
387 return new ShapePropertiesContext( *this, mrModel
.mxMarkerProp
.create() );
388 case C_TOKEN( symbol
):
389 mrModel
.monMarkerSymbol
= rAttribs
.getToken( XML_val
, XML_none
);
397 // ============================================================================
399 SeriesContextBase::SeriesContextBase( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
400 ContextBase
< SeriesModel
>( rParent
, rModel
)
404 SeriesContextBase::~SeriesContextBase()
408 ContextHandlerRef
SeriesContextBase::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
410 switch( getCurrentElement() )
416 mrModel
.mnIndex
= rAttribs
.getInteger( XML_val
, -1 );
418 case C_TOKEN( order
):
419 mrModel
.mnOrder
= rAttribs
.getInteger( XML_val
, -1 );
421 case C_TOKEN( spPr
):
422 return new ShapePropertiesContext( *this, mrModel
.mxShapeProp
.create() );
424 return new TextContext( *this, mrModel
.mxText
.create() );
428 case C_TOKEN( marker
):
431 case C_TOKEN( size
):
432 mrModel
.mnMarkerSize
= rAttribs
.getInteger( XML_val
, 5 );
434 case C_TOKEN( spPr
):
435 return new ShapePropertiesContext( *this, mrModel
.mxMarkerProp
.create() );
436 case C_TOKEN( symbol
):
437 mrModel
.mnMarkerSymbol
= rAttribs
.getToken( XML_val
, XML_none
);
445 // ============================================================================
447 AreaSeriesContext::AreaSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
448 SeriesContextBase( rParent
, rModel
)
452 AreaSeriesContext::~AreaSeriesContext()
456 ContextHandlerRef
AreaSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
458 switch( getCurrentElement() )
464 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
465 case C_TOKEN( errBars
):
466 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create() );
467 case C_TOKEN( dLbls
):
468 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
470 return new DataPointContext( *this, mrModel
.maPoints
.create() );
471 case C_TOKEN( trendline
):
472 return new TrendlineContext( *this, mrModel
.maTrendlines
.create() );
474 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
478 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
481 // ============================================================================
483 BarSeriesContext::BarSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
484 SeriesContextBase( rParent
, rModel
)
488 BarSeriesContext::~BarSeriesContext()
492 ContextHandlerRef
BarSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
494 switch( getCurrentElement() )
500 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
501 case C_TOKEN( dLbls
):
502 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
504 return new DataPointContext( *this, mrModel
.maPoints
.create() );
505 case C_TOKEN( errBars
):
506 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create() );
507 case C_TOKEN( invertIfNegative
):
508 // default is 'false', not 'true' as specified
509 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, false );
511 case C_TOKEN( pictureOptions
):
512 return new PictureOptionsContext( *this, mrModel
.mxPicOptions
.create() );
513 case C_TOKEN( shape
):
514 // missing attribute does not change shape type to 'box' as specified
515 mrModel
.monShape
= rAttribs
.getToken( XML_val
);
517 case C_TOKEN( trendline
):
518 return new TrendlineContext( *this, mrModel
.maTrendlines
.create() );
520 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
524 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
527 // ============================================================================
529 BubbleSeriesContext::BubbleSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
530 SeriesContextBase( rParent
, rModel
)
534 BubbleSeriesContext::~BubbleSeriesContext()
538 ContextHandlerRef
BubbleSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
540 switch( getCurrentElement() )
545 case C_TOKEN( bubble3D
):
546 // default is 'false', not 'true' as specified
547 mrModel
.mbBubble3d
= rAttribs
.getBool( XML_val
, false );
549 case C_TOKEN( bubbleSize
):
550 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::POINTS
) );
551 case C_TOKEN( dLbls
):
552 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
554 return new DataPointContext( *this, mrModel
.maPoints
.create() );
555 case C_TOKEN( errBars
):
556 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create() );
557 case C_TOKEN( invertIfNegative
):
558 // default is 'false', not 'true' as specified
559 mrModel
.mbInvertNeg
= rAttribs
.getBool( XML_val
, false );
561 case C_TOKEN( trendline
):
562 return new TrendlineContext( *this, mrModel
.maTrendlines
.create() );
563 case C_TOKEN( xVal
):
564 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
565 case C_TOKEN( yVal
):
566 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
570 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
573 // ============================================================================
575 LineSeriesContext::LineSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
576 SeriesContextBase( rParent
, rModel
)
580 LineSeriesContext::~LineSeriesContext()
584 ContextHandlerRef
LineSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
586 switch( getCurrentElement() )
592 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
593 case C_TOKEN( dLbls
):
594 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
596 return new DataPointContext( *this, mrModel
.maPoints
.create() );
597 case C_TOKEN( errBars
):
598 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create() );
599 case C_TOKEN( marker
):
601 case C_TOKEN( smooth
):
602 // default is 'false', not 'true' as specified
603 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, false );
605 case C_TOKEN( trendline
):
606 return new TrendlineContext( *this, mrModel
.maTrendlines
.create() );
608 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
612 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
615 // ============================================================================
617 PieSeriesContext::PieSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
618 SeriesContextBase( rParent
, rModel
)
622 PieSeriesContext::~PieSeriesContext()
626 ContextHandlerRef
PieSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
628 switch( getCurrentElement() )
634 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
635 case C_TOKEN( dLbls
):
636 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
638 return new DataPointContext( *this, mrModel
.maPoints
.create() );
639 case C_TOKEN( explosion
):
640 mrModel
.mnExplosion
= rAttribs
.getInteger( XML_val
, 0 );
643 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
647 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
650 // ============================================================================
652 RadarSeriesContext::RadarSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
653 SeriesContextBase( rParent
, rModel
)
657 RadarSeriesContext::~RadarSeriesContext()
661 ContextHandlerRef
RadarSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
663 switch( getCurrentElement() )
669 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
670 case C_TOKEN( dLbls
):
671 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
673 return new DataPointContext( *this, mrModel
.maPoints
.create() );
674 case C_TOKEN( marker
):
676 case C_TOKEN( smooth
):
677 // default is 'false', not 'true' as specified
678 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, false );
681 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
685 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
688 // ============================================================================
690 ScatterSeriesContext::ScatterSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
691 SeriesContextBase( rParent
, rModel
)
695 ScatterSeriesContext::~ScatterSeriesContext()
699 ContextHandlerRef
ScatterSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
701 switch( getCurrentElement() )
706 case C_TOKEN( dLbls
):
707 return new DataLabelsContext( *this, mrModel
.mxLabels
.create() );
709 return new DataPointContext( *this, mrModel
.maPoints
.create() );
710 case C_TOKEN( errBars
):
711 return new ErrorBarContext( *this, mrModel
.maErrorBars
.create() );
712 case C_TOKEN( marker
):
714 case C_TOKEN( smooth
):
715 // default is 'false', not 'true' as specified
716 mrModel
.mbSmooth
= rAttribs
.getBool( XML_val
, false );
718 case C_TOKEN( trendline
):
719 return new TrendlineContext( *this, mrModel
.maTrendlines
.create() );
720 case C_TOKEN( xVal
):
721 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
722 case C_TOKEN( yVal
):
723 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
727 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
730 // ============================================================================
732 SurfaceSeriesContext::SurfaceSeriesContext( ContextHandler2Helper
& rParent
, SeriesModel
& rModel
) :
733 SeriesContextBase( rParent
, rModel
)
737 SurfaceSeriesContext::~SurfaceSeriesContext()
741 ContextHandlerRef
SurfaceSeriesContext::onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
)
743 switch( getCurrentElement() )
749 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::CATEGORIES
) );
751 return new DataSourceContext( *this, mrModel
.maSources
.create( SeriesModel::VALUES
) );
755 return SeriesContextBase::onCreateContext( nElement
, rAttribs
);
758 // ============================================================================
761 } // namespace drawingml