/src/libreoffice/oox/inc/drawingml/chart/plotareaconverter.hxx
Line | Count | Source |
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_PLOTAREACONVERTER_HXX |
21 | | #define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONVERTER_HXX |
22 | | |
23 | | #include <drawingml/chart/converterbase.hxx> |
24 | | #include <drawingml/chart/seriesmodel.hxx> |
25 | | #include <oox/drawingml/chart/datasourcemodel.hxx> |
26 | | |
27 | | namespace com::sun::star { |
28 | | namespace chart2 { class XDiagram; } |
29 | | } |
30 | | |
31 | | namespace oox::drawingml::chart { |
32 | | |
33 | | |
34 | | struct View3DModel; |
35 | | class TypeGroupConverter; |
36 | | |
37 | | class View3DConverter final : public ConverterBase< View3DModel > |
38 | | { |
39 | | public: |
40 | | explicit View3DConverter( const ConverterRoot& rParent, View3DModel& rModel ); |
41 | | virtual ~View3DConverter() override; |
42 | | |
43 | | /** Converts the OOXML plot area model to a chart2 diagram. */ |
44 | | void convertFromModel( |
45 | | const css::uno::Reference< css::chart2::XDiagram >& rxDiagram, |
46 | | TypeGroupConverter const & rTypeGroup ); |
47 | | }; |
48 | | |
49 | | |
50 | | struct WallFloorModel; |
51 | | |
52 | | class WallFloorConverter final : public ConverterBase< WallFloorModel > |
53 | | { |
54 | | public: |
55 | | explicit WallFloorConverter( const ConverterRoot& rParent, WallFloorModel& rModel ); |
56 | | virtual ~WallFloorConverter() override; |
57 | | |
58 | | /** Converts the OOXML wall/floor model to a chart2 diagram. */ |
59 | | void convertFromModel( |
60 | | const css::uno::Reference< css::chart2::XDiagram >& rxDiagram, |
61 | | ObjectType eObjType ); |
62 | | }; |
63 | | |
64 | | struct PlotAreaModel; |
65 | | |
66 | | class PlotAreaConverter final : public ConverterBase< PlotAreaModel > |
67 | | { |
68 | | public: |
69 | | explicit PlotAreaConverter( const ConverterRoot& rParent, PlotAreaModel& rModel ); |
70 | | virtual ~PlotAreaConverter() override; |
71 | | |
72 | | /** Converts the OOXML plot area model to a chart2 diagram. */ |
73 | | void convertFromModel( View3DModel& rView3DModel, |
74 | | DataSourceCxModel& raDataMap ); |
75 | | /** Converts the manual plot area position and size, if set. */ |
76 | | void convertPositionFromModel(); |
77 | | |
78 | | /** Returns the automatic chart title if the chart contains only one series. */ |
79 | 0 | const OUString& getAutomaticTitle() const { return maAutoTitle; } |
80 | | /** Returns true, if the chart contains only one series and have title textbox (even empty). */ |
81 | 0 | bool isSingleSeriesTitle() const { return mbSingleSeriesTitle; } |
82 | | /** Returns true, if chart type supports wall and floor format in 3D mode. */ |
83 | 0 | bool isWall3dChart() const { return mbWall3dChart; } |
84 | | |
85 | | private: |
86 | | OUString maAutoTitle; |
87 | | bool mb3dChart; |
88 | | bool mbWall3dChart; |
89 | | bool mbPieChart; |
90 | | bool mbSingleSeriesTitle;; |
91 | | }; |
92 | | |
93 | | |
94 | | } // namespace oox::drawingml::chart |
95 | | |
96 | | #endif |
97 | | |
98 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |