LibreOffice Module oox (master) 1
typegroupconverter.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX
21#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX
22
24
25namespace com::sun::star {
26 namespace chart2 { class XChartType; }
27 namespace chart2 { class XCoordinateSystem; }
28 namespace chart2 { class XDataSeries; }
29 namespace chart2 { class XDiagram; }
30 namespace chart2::data { class XLabeledDataSequence; }
31}
32
33namespace oox::drawingml::chart {
34
37{
52};
53
56{
63};
64
67{
71};
72
75{
78 const char* mpcServiceName;
80 sal_Int32 mnDefLabelPos;
88};
89
91
92struct UpDownBarsModel;
93
94class UpDownBarsConverter final : public ConverterBase< UpDownBarsModel >
95{
96public:
97 explicit UpDownBarsConverter( const ConverterRoot& rParent, UpDownBarsModel& rModel );
98 virtual ~UpDownBarsConverter() override;
99
101 void convertFromModel(
102 const css::uno::Reference< css::chart2::XChartType >& rxChartType );
103};
104
105struct TypeGroupModel;
106struct View3DModel;
107
108class TypeGroupConverter final : public ConverterBase< TypeGroupModel >
109{
110public:
111 explicit TypeGroupConverter( const ConverterRoot& rParent, TypeGroupModel& rModel );
112 virtual ~TypeGroupConverter() override;
113
115 const TypeGroupInfo& getTypeInfo() const { return maTypeInfo; }
116
118 bool isStacked() const;
120 bool isPercent() const;
122 bool is3dChart() const { return mb3dChart;}
124 bool isWall3dChart() const;
126 bool isDeep3dChart() const;
127
129 bool isSeriesFrameFormat() const;
132
134 OUString getSingleSeriesTitle() const;
135
137 css::uno::Reference< css::chart2::XCoordinateSystem >
140 css::uno::Reference< css::chart2::data::XLabeledDataSequence >
142
144 void convertFromModel(
145 const css::uno::Reference< css::chart2::XDiagram >& rxDiagram,
146 const css::uno::Reference< css::chart2::XCoordinateSystem >& rxCoordSystem,
147 sal_Int32 nAxesSetIdx, bool bSupportsVaryColorsByPoint );
148
150 void convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize,
151 const ModelRef< Shape >& xShapeProps ) const;
153 void convertLineSmooth( PropertySet& rPropSet, bool bOoxSmooth ) const;
155 void convertBarGeometry( PropertySet& rPropSet, sal_Int32 nOoxShape ) const;
157 void convertPieRotation( PropertySet& rPropSet, sal_Int32 nOoxAngle ) const;
159 void convertPieExplosion( PropertySet& rPropSet, sal_Int32 nOoxExplosion ) const;
160
161private:
163 void insertDataSeries(
164 const css::uno::Reference< css::chart2::XChartType >& rxChartType,
165 const css::uno::Reference< css::chart2::XDataSeries >& rxSeries,
166 sal_Int32 nAxesSetIdx );
167
168private:
171};
172
173} // namespace oox::drawingml::chart
174
175#endif
176
177/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A wrapper for a UNO property set.
Definition: propertyset.hxx:58
Base class of all converter classes.
void convertBarGeometry(PropertySet &rPropSet, sal_Int32 nOoxShape) const
Sets the passed OOXML bar 3D geometry at the passed property set.
bool is3dChart() const
Returns true, if the chart is three-dimensional.
void convertPieExplosion(PropertySet &rPropSet, sal_Int32 nOoxExplosion) const
Sets the passed OOXML pie explosion at the passed property set.
bool isWall3dChart() const
Returns true, if chart type supports wall and floor format in 3D mode.
void insertDataSeries(const css::uno::Reference< css::chart2::XChartType > &rxChartType, const css::uno::Reference< css::chart2::XDataSeries > &rxSeries, sal_Int32 nAxesSetIdx)
Inserts the passed series into the chart type.
bool isSeriesFrameFormat() const
Returns true, if this chart type supports area formatting for its series.
css::uno::Reference< css::chart2::data::XLabeledDataSequence > createCategorySequence()
Creates a labeled data sequence object for axis categories.
css::uno::Reference< css::chart2::XCoordinateSystem > createCoordinateSystem()
Creates a coordinate system according to the contained chart type.
void convertMarker(PropertySet &rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize, const ModelRef< Shape > &xShapeProps) const
Sets the passed OOXML marker style at the passed property set.
TypeGroupConverter(const ConverterRoot &rParent, TypeGroupModel &rModel)
ObjectType getSeriesObjectType() const
Returns the object type for a series depending on the chart type.
bool mb3dChart
Extended type info for contained chart type model.
void convertPieRotation(PropertySet &rPropSet, sal_Int32 nOoxAngle) const
Sets the passed OOXML pie rotation at the passed property set.
OUString getSingleSeriesTitle() const
Returns series title, if the chart type group contains only one single series.
void convertLineSmooth(PropertySet &rPropSet, bool bOoxSmooth) const
Sets the passed OOXML line smoothing at the passed property set.
bool isDeep3dChart() const
Returns true, if the series in this chart type group are ordered on the Z axis.
bool isStacked() const
Returns true, if the series in this chart type group are stacked on each other (no percentage).
void convertFromModel(const css::uno::Reference< css::chart2::XDiagram > &rxDiagram, const css::uno::Reference< css::chart2::XCoordinateSystem > &rxCoordSystem, sal_Int32 nAxesSetIdx, bool bSupportsVaryColorsByPoint)
Converts the OOXML type group model into a chart2 coordinate system.
bool isPercent() const
Returns true, if the series in this chart type group are stacked on each other as percentage.
const TypeGroupInfo & getTypeInfo() const
Returns the type info struct that describes this chart type group.
UpDownBarsConverter(const ConverterRoot &rParent, UpDownBarsModel &rModel)
void convertFromModel(const css::uno::Reference< css::chart2::XChartType > &rxChartType)
Converts the OOXML up/down bars.
TypeCategory
Enumerates different categories of similar chart types.
@ TYPECATEGORY_RADAR
Line charts (line, area, stock charts).
@ TYPECATEGORY_SURFACE
Scatter and bubble charts.
@ TYPECATEGORY_SCATTER
Pie and donut charts.
@ TYPECATEGORY_PIE
Radar charts (linear or filled).
@ TYPECATEGORY_LINE
Bar charts (horizontal or vertical).
const TypeGroupInfo & GetTypeGroupInfo(TypeId eType)
ObjectType
Enumerates different object types for specific automatic formatting behaviour.
TypeId
Enumerates different chart types.
@ TYPEID_OFPIE
Doughnut (ring) chart.
@ TYPEID_LINE
Horizontal bar chart.
@ TYPEID_HORBAR
Vertical bar chart.
@ TYPEID_PIE
Filled radar chart.
@ TYPEID_UNKNOWN
Surface chart.
@ TYPEID_BUBBLE
Scatter (XY) chart.
@ TYPEID_RADARAREA
Linear radar chart.
@ TYPEID_SCATTER
Pie-to-pie or pie-to-bar chart.
VarPointMode
Enumerates modes for varying point colors in a series.
@ VARPOINTMODE_MULTI
Only supported, if type group contains only one series.
@ VARPOINTMODE_SINGLE
No varied colors supported.
Contains info for a chart type related to the OpenOffice.org chart module.
VarPointMode meVarPointMode
Service name of the type.
bool mbSeriesIsFrame2d
True = polar, false = cartesian.
bool mbSingleSeriesVis
True = 2D type series with area formatting.
bool mbSwappedAxesSet
True = X axis contains categories.
bool mbSupportsStacking
True = X axis and Y axis are swapped.
sal_Int32 mnDefLabelPos
Mode for varying point colors.
bool mbPictureOptions
True = data points can be stacked on each other.
bool mbPolarCoordSystem
Default data label position (API constant).
bool mbCategoryAxis
True = only first series visible (e.g. pie charts).
const char * mpcServiceName
Category this chart type belongs to.
TypeCategory meTypeCategory
Unique chart type identifier.