Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / view / inc / PlotterBase.hxx
blob1ddea6f0396e97311f542a5f7faaf5950fe908b4
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_PLOTTERBASE_HXX
20 #define INCLUDED_CHART2_SOURCE_VIEW_INC_PLOTTERBASE_HXX
22 #include <com/sun/star/uno/Reference.h>
23 #include <rtl/ustring.hxx>
24 #include <vector>
26 namespace com { namespace sun { namespace star { namespace drawing { struct HomogenMatrix; } } } }
27 namespace com { namespace sun { namespace star { namespace drawing { struct Position3D; } } } }
28 namespace com { namespace sun { namespace star { namespace drawing { class XShapes; } } } }
29 namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
31 namespace chart { struct ExplicitScaleData; }
33 namespace chart
36 class PlottingPositionHelper;
37 class ShapeFactory;
39 /** This class provides methods for setting axis scales and for performing
40 * scene to screen transformations. It is used as the base class for all
41 * plotter classes.
43 class PlotterBase
45 public:
46 PlotterBase( sal_Int32 nDimension );
47 virtual ~PlotterBase();
49 /// @throws css::uno::RuntimeException
50 virtual void initPlotter(
51 const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
52 , const css::uno::Reference< css::drawing::XShapes >& xFinalTarget
53 , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
54 , const OUString& rCID
57 virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
59 virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix );
61 virtual void createShapes() = 0;
63 static bool isValidPosition( const css::drawing::Position3D& rPos );
65 protected: //methods
66 css::uno::Reference< css::drawing::XShapes >
67 createGroupShape( const css::uno::Reference<
68 css::drawing::XShapes >& xTarget
69 , const OUString& rName=OUString() );
71 protected: //member
72 css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
73 css::uno::Reference< css::drawing::XShapes > m_xFinalTarget;
74 css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
75 ShapeFactory* m_pShapeFactory;
76 OUString m_aCID;
78 const sal_Int32 m_nDimension;
79 // needs to be created and deleted by the derived class
80 PlottingPositionHelper* m_pPosHelper;
82 } //namespace chart
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */