LibreOffice Module oox (master) 1
seriesconverter.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_SERIESCONVERTER_HXX
21#define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONVERTER_HXX
22
25
26namespace com::sun::star {
27 namespace chart2 { class XDataSeries; }
28 namespace chart2::data { class XLabeledDataSequence; }
29}
30
31namespace oox::drawingml::chart {
32
33class TypeGroupConverter;
34
35// #i66858# enable this when Chart2 supports smoothed lines per data series
36#define OOX_CHART_SMOOTHED_PER_SERIES 0
37
38
39class DataLabelConverter final : public ConverterBase< DataLabelModel >
40{
41public:
42 explicit DataLabelConverter( const ConverterRoot& rParent, DataLabelModel& rModel );
43 virtual ~DataLabelConverter() override;
44
47 const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
48 const TypeGroupConverter& rTypeGroup );
49};
50
51
52class DataLabelsConverter final : public ConverterBase< DataLabelsModel >
53{
54public:
55 explicit DataLabelsConverter( const ConverterRoot& rParent, DataLabelsModel& rModel );
56 virtual ~DataLabelsConverter() override;
57
60 const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
61 const TypeGroupConverter& rTypeGroup );
62};
63
64
65class ErrorBarConverter final : public ConverterBase< ErrorBarModel >
66{
67public:
68 explicit ErrorBarConverter( const ConverterRoot& rParent, ErrorBarModel& rModel );
69 virtual ~ErrorBarConverter() override;
70
73 const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries );
74
75private:
76 css::uno::Reference< css::chart2::data::XLabeledDataSequence >
78};
79
80
81class TrendlineLabelConverter final : public ConverterBase< TrendlineLabelModel >
82{
83public:
84 explicit TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel );
85 virtual ~TrendlineLabelConverter() override;
86
88 void convertFromModel( PropertySet& rPropSet );
89};
90
91
92class TrendlineConverter final : public ConverterBase< TrendlineModel >
93{
94public:
95 explicit TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel );
96 virtual ~TrendlineConverter() override;
97
100 const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries );
101};
102
103
104class DataPointConverter final : public ConverterBase< DataPointModel >
105{
106public:
107 explicit DataPointConverter( const ConverterRoot& rParent, DataPointModel& rModel );
108 virtual ~DataPointConverter() override;
109
111 void convertFromModel(
112 const css::uno::Reference< css::chart2::XDataSeries >& rxDataSeries,
113 const TypeGroupConverter& rTypeGroup,
114 const SeriesModel& rSeries );
115};
116
117
118class SeriesConverter final : public ConverterBase< SeriesModel >
119{
120public:
121 explicit SeriesConverter( const ConverterRoot& rParent, SeriesModel& rModel );
122 virtual ~SeriesConverter() override;
123
125 css::uno::Reference< css::chart2::data::XLabeledDataSequence >
126 createCategorySequence( const OUString& rRole );
128 css::uno::Reference< css::chart2::data::XLabeledDataSequence >
129 createValueSequence( const OUString& rRole );
131 css::uno::Reference< css::chart2::XDataSeries >
132 createDataSeries( const TypeGroupConverter& rTypeGroup, bool bVaryColorsByPoint );
133
134private:
135 css::uno::Reference< css::chart2::data::XLabeledDataSequence >
137 SeriesModel::SourceType eSourceType,
138 const OUString& rRole,
139 bool bUseTextLabel );
140};
141
142
143} // namespace oox::drawingml::chart
144
145#endif
146
147/* 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 convertFromModel(const css::uno::Reference< css::chart2::XDataSeries > &rxDataSeries, const TypeGroupConverter &rTypeGroup)
Converts OOXML data label settings for the passed data point.
DataLabelConverter(const ConverterRoot &rParent, DataLabelModel &rModel)
DataLabelsConverter(const ConverterRoot &rParent, DataLabelsModel &rModel)
void convertFromModel(const css::uno::Reference< css::chart2::XDataSeries > &rxDataSeries, const TypeGroupConverter &rTypeGroup)
Converts OOXML data label settings for the passed data series.
DataPointConverter(const ConverterRoot &rParent, DataPointModel &rModel)
void convertFromModel(const css::uno::Reference< css::chart2::XDataSeries > &rxDataSeries, const TypeGroupConverter &rTypeGroup, const SeriesModel &rSeries)
Converts settings for a data point in the passed series.
css::uno::Reference< css::chart2::data::XLabeledDataSequence > createLabeledDataSequence(ErrorBarModel::SourceType eSourceType)
ErrorBarConverter(const ConverterRoot &rParent, ErrorBarModel &rModel)
void convertFromModel(const css::uno::Reference< css::chart2::XDataSeries > &rxDataSeries)
Converts an OOXML errorbar and inserts it into the passed data series.
css::uno::Reference< css::chart2::XDataSeries > createDataSeries(const TypeGroupConverter &rTypeGroup, bool bVaryColorsByPoint)
Creates a data series object with initialized source links.
css::uno::Reference< css::chart2::data::XLabeledDataSequence > createCategorySequence(const OUString &rRole)
Creates a labeled data sequence object from category data link.
css::uno::Reference< css::chart2::data::XLabeledDataSequence > createValueSequence(const OUString &rRole)
Creates a labeled data sequence object from value data link.
SeriesConverter(const ConverterRoot &rParent, SeriesModel &rModel)
css::uno::Reference< css::chart2::data::XLabeledDataSequence > createLabeledDataSequence(SeriesModel::SourceType eSourceType, const OUString &rRole, bool bUseTextLabel)
void convertFromModel(const css::uno::Reference< css::chart2::XDataSeries > &rxDataSeries)
Converts an OOXML trendline and inserts it into the passed data series.
TrendlineConverter(const ConverterRoot &rParent, TrendlineModel &rModel)
TrendlineLabelConverter(const ConverterRoot &rParent, TrendlineLabelModel &rModel)
void convertFromModel(PropertySet &rPropSet)
Converts the OOXML trendline label.