Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / view / charttypes / NetChart.hxx
blob2d948d2e213806bea46c5875392c100c31523a0a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #ifndef INCLUDED_CHART2_SOURCE_VIEW_CHARTTYPES_NETCHART_HXX
21 #define INCLUDED_CHART2_SOURCE_VIEW_CHARTTYPES_NETCHART_HXX
23 #include <memory>
24 #include <VSeriesPlotter.hxx>
26 namespace chart
29 class NetChart : public VSeriesPlotter
31 // public methods
32 public:
33 NetChart() = delete;
35 NetChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
36 , sal_Int32 nDimensionCount
37 , bool bNoArea
38 , std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper //takes ownership
40 virtual ~NetChart() override;
42 virtual void createShapes() override;
44 virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
46 // MinimumAndMaximumSupplier
47 virtual double getMaximumX() override;
48 virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) override;
49 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override;
51 virtual LegendSymbolStyle getLegendSymbolStyle() override;
52 virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex/*-1 for series symbol*/ ) override;
54 private: //methods
55 void impl_createSeriesShapes();
56 bool impl_createArea( VDataSeries* pSeries
57 , css::drawing::PolyPolygonShape3D* pSeriesPoly
58 , css::drawing::PolyPolygonShape3D const * pPreviousSeriesPoly
59 , PlottingPositionHelper const * pPosHelper );
60 bool impl_createLine( VDataSeries* pSeries
61 , css::drawing::PolyPolygonShape3D* pSeriesPoly
62 , PlottingPositionHelper const * pPosHelper );
64 private: //member
65 std::unique_ptr<PlottingPositionHelper> m_pMainPosHelper;
67 bool m_bArea;//false -> line or symbol only
68 bool m_bLine;
70 css::uno::Reference< css::drawing::XShapes > m_xSeriesTarget;
71 css::uno::Reference< css::drawing::XShapes > m_xTextTarget;
73 } //namespace chart
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */