LibreOffice Module chart2 (master) 1
NetChart.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#pragma once
21
22#include <memory>
23#include <VSeriesPlotter.hxx>
24
25namespace chart
26{
27
29{
30 // public methods
31public:
32 NetChart() = delete;
33
35 , sal_Int32 nDimensionCount
36 , bool bNoArea
37 , std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper //takes ownership
38 );
39 virtual ~NetChart() override;
40
41 virtual void createShapes() override;
42
43 virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
44
45 // MinimumAndMaximumSupplier
46 virtual double getMaximumX() override;
47 virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex ) override;
48 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override;
49
50 virtual LegendSymbolStyle getLegendSymbolStyle() override;
51 virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex/*-1 for series symbol*/ ) override;
52
53private: //methods
55 bool impl_createArea( VDataSeries* pSeries
56 , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
57 , std::vector<std::vector<css::drawing::Position3D>> const * pPreviousSeriesPoly
58 , PlottingPositionHelper const * pPosHelper );
59 bool impl_createLine( VDataSeries* pSeries
60 , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
61 , PlottingPositionHelper const * pPosHelper );
62
63private: //member
64 std::unique_ptr<PlottingPositionHelper> m_pMainPosHelper;
65
66 bool m_bArea;//false -> line or symbol only
67 bool m_bLine;
68
71};
72} //namespace chart
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool impl_createLine(VDataSeries *pSeries, const std::vector< std::vector< css::drawing::Position3D > > *pSeriesPoly, PlottingPositionHelper const *pPosHelper)
Definition: NetChart.cxx:114
virtual double getMaximumX() override
Definition: NetChart.cxx:72
void impl_createSeriesShapes()
Definition: NetChart.cxx:236
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override
a value <= 0 for a directions means that this direction can be stretched arbitrary
Definition: NetChart.cxx:109
NetChart()=delete
virtual bool isExpandIfValuesCloseToBorder(sal_Int32 nDimensionIndex) override
Definition: NetChart.cxx:78
rtl::Reference< SvxShapeGroupAnyD > m_xSeriesTarget
Definition: NetChart.hxx:69
virtual void createShapes() override
Definition: NetChart.cxx:318
virtual css::uno::Any getExplicitSymbol(const VDataSeries &rSeries, sal_Int32 nPointIndex) override
Definition: NetChart.cxx:96
rtl::Reference< SvxShapeGroupAnyD > m_xTextTarget
Definition: NetChart.hxx:70
NetChart(const rtl::Reference< ::chart::ChartType > &xChartTypeModel, sal_Int32 nDimensionCount, bool bNoArea, std::unique_ptr< PlottingPositionHelper > pPlottingPositionHelper)
virtual ~NetChart() override
Definition: NetChart.cxx:68
std::unique_ptr< PlottingPositionHelper > m_pMainPosHelper
Definition: NetChart.hxx:64
bool impl_createArea(VDataSeries *pSeries, const std::vector< std::vector< css::drawing::Position3D > > *pSeriesPoly, std::vector< std::vector< css::drawing::Position3D > > const *pPreviousSeriesPoly, PlottingPositionHelper const *pPosHelper)
Definition: NetChart.cxx:166
virtual LegendSymbolStyle getLegendSymbolStyle() override
Definition: NetChart.cxx:89
virtual bool isSeparateStackingForDifferentSigns(sal_Int32 nDimensionIndex) override
Definition: NetChart.cxx:83