Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / view / inc / PlotterBase.hxx
bloba6753561348edd505c3665712831d845960c77d5
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 <chartview/ExplicitScaleValues.hxx>
24 #include <com/sun/star/drawing/HomogenMatrix.hpp>
25 #include <com/sun/star/drawing/XShapes.hpp>
26 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <com/sun/star/drawing/Position3D.hpp>
30 #include <com/sun/star/beans/XPropertySet.hpp>
31 #include <com/sun/star/chart2/XTransformation.hpp>
33 #include <vector>
35 namespace chart
38 class AbstractShapeFactory;
39 class PlottingPositionHelper;
41 /** This class provides methods for setting axis scales and for performing
42 * scene to screen transformations. It is used as the base class for all
43 * plotter classes.
45 class PlotterBase
47 public:
48 PlotterBase( sal_Int32 nDimension );
49 virtual ~PlotterBase();
51 /// @throws css::uno::RuntimeException
52 virtual void initPlotter(
53 const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
54 , const css::uno::Reference< css::drawing::XShapes >& xFinalTarget
55 , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
56 , const OUString& rCID
59 virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
61 virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix );
63 virtual void createShapes() = 0;
65 static bool isValidPosition( const css::drawing::Position3D& rPos );
67 protected: //methods
68 css::uno::Reference< css::drawing::XShapes >
69 createGroupShape( const css::uno::Reference<
70 css::drawing::XShapes >& xTarget
71 , const OUString& rName=OUString() );
73 protected: //member
74 css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
75 css::uno::Reference< css::drawing::XShapes > m_xFinalTarget;
76 css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
77 AbstractShapeFactory* m_pShapeFactory;
78 OUString m_aCID;
80 const sal_Int32 m_nDimension;
81 // needs to be created and deleted by the derived class
82 PlottingPositionHelper* m_pPosHelper;
84 } //namespace chart
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */