LibreOffice Module chart2 (master) 1
PlotterBase.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#pragma once
20
21#include <rtl/ustring.hxx>
22#include <svx/unoshape.hxx>
23#include <vector>
24
25namespace com::sun::star::drawing { struct HomogenMatrix; }
26namespace com::sun::star::drawing { struct Position3D; }
27namespace com::sun::star::drawing { class XShapes; }
28namespace com::sun::star::lang { class XMultiServiceFactory; }
29
30namespace chart { struct ExplicitScaleData; }
31
32namespace chart
33{
34
35class PlottingPositionHelper;
36class ShapeFactory;
37
43{
44public:
45 PlotterBase( sal_Int32 nDimension );
46 virtual ~PlotterBase();
47
49 virtual void initPlotter(
50 const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
51 , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
52 , const OUString& rCID
53 );
54
55 virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis );
56
57 virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix );
58
59 virtual void createShapes() = 0;
60
61 static bool isValidPosition( const css::drawing::Position3D& rPos );
62
63protected: //methods
66 , const OUString& rName=OUString() );
67
68protected: //member
71 OUString m_aCID;
72
73 const sal_Int32 m_nDimension;
74 // needs to be created and deleted by the derived class
76};
77} //namespace chart
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class provides methods for setting axis scales and for performing scene to screen transformation...
Definition: PlotterBase.hxx:43
virtual void setTransformationSceneToScreen(const css::drawing::HomogenMatrix &rMatrix)
Definition: PlotterBase.cxx:60
rtl::Reference< SvxShapeGroupAnyD > m_xLogicTarget
Definition: PlotterBase.hxx:69
PlotterBase(sal_Int32 nDimension)
Definition: PlotterBase.cxx:30
static bool isValidPosition(const css::drawing::Position3D &rPos)
Definition: PlotterBase.cxx:87
virtual void createShapes()=0
PlottingPositionHelper * m_pPosHelper
Definition: PlotterBase.hxx:75
rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget
Definition: PlotterBase.hxx:70
const sal_Int32 m_nDimension
Definition: PlotterBase.hxx:73
virtual void setScales(std::vector< ExplicitScaleData > &&rScales, bool bSwapXAndYAxis)
Definition: PlotterBase.cxx:51
virtual void initPlotter(const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget, const rtl::Reference< SvxShapeGroupAnyD > &xFinalTarget, const OUString &rCID)
Definition: PlotterBase.cxx:36
rtl::Reference< SvxShapeGroupAnyD > createGroupShape(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &rName=OUString())
Definition: PlotterBase.cxx:71
virtual ~PlotterBase()
Definition: PlotterBase.cxx:47