fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / view / inc / PlotterBase.hxx
blob8cf01a9bdf6195405b6a36dde4db9ec3b8e581c6
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 <cppuhelper/implbase1.hxx>
34 #include <vector>
36 namespace chart
39 class AbstractShapeFactory;
40 class PlottingPositionHelper;
42 /** This class provides methods for setting axis scales and for performing
43 * scene to screen transformations. It is used as the base class for all
44 * plotter classes.
46 class PlotterBase
48 public:
49 PlotterBase( sal_Int32 nDimension );
50 virtual ~PlotterBase();
52 virtual void initPlotter(
53 const ::com::sun::star::uno::Reference<
54 ::com::sun::star::drawing::XShapes >& xLogicTarget
55 , const ::com::sun::star::uno::Reference<
56 ::com::sun::star::drawing::XShapes >& xFinalTarget
57 , const ::com::sun::star::uno::Reference<
58 ::com::sun::star::lang::XMultiServiceFactory >& xFactory
59 , const OUString& rCID
60 ) throw (::com::sun::star::uno::RuntimeException );
62 virtual void setScales( const ::std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
64 virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix );
66 virtual void createShapes() = 0;
68 static bool isValidPosition( const ::com::sun::star::drawing::Position3D& rPos );
70 protected: //methods
71 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
72 createGroupShape( const ::com::sun::star::uno::Reference<
73 ::com::sun::star::drawing::XShapes >& xTarget
74 , const OUString& rName=OUString() );
76 protected: //member
77 ::com::sun::star::uno::Reference<
78 ::com::sun::star::drawing::XShapes > m_xLogicTarget;
79 ::com::sun::star::uno::Reference<
80 ::com::sun::star::drawing::XShapes > m_xFinalTarget;
81 ::com::sun::star::uno::Reference<
82 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory;
83 AbstractShapeFactory* m_pShapeFactory;
84 OUString m_aCID;
86 const sal_Int32 m_nDimension;
87 // needs to be created and deleted by the derived class
88 PlottingPositionHelper* m_pPosHelper;
90 } //namespace chart
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */