Update ooo320-m1
[ooovba.git] / chart2 / source / view / inc / PlotterBase.hxx
blobfb5b59faf7b395a16f23a6acb2c7d0ff19f424a7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PlotterBase.hxx,v $
10 * $Revision: 1.14 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART2_PLOTTERBASE_HXX
31 #define _CHART2_PLOTTERBASE_HXX
33 #include <com/sun/star/drawing/HomogenMatrix.hpp>
34 #include <com/sun/star/drawing/XShapes.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/uno/XComponentContext.hpp>
37 #include <com/sun/star/drawing/Position3D.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
40 #include <com/sun/star/lang/XComponent.hpp>
43 //----
44 #include <vector>
46 //---- chart2
47 #include <com/sun/star/chart2/ExplicitScaleData.hpp>
48 #include <com/sun/star/chart2/XTransformation.hpp>
50 #include <com/sun/star/chart2/XPlotter.hpp>
53 //----
54 #include <cppuhelper/implbase1.hxx>
56 //.............................................................................
57 namespace chart
59 //.............................................................................
61 class ShapeFactory;
62 class PlottingPositionHelper;
64 class PlotterBase
66 public:
67 PlotterBase( sal_Int32 nDimension );
68 virtual ~PlotterBase();
70 // ___chart2::XPlotter___
71 virtual void SAL_CALL initPlotter(
72 const ::com::sun::star::uno::Reference<
73 ::com::sun::star::drawing::XShapes >& xLogicTarget
74 , const ::com::sun::star::uno::Reference<
75 ::com::sun::star::drawing::XShapes >& xFinalTarget
76 , const ::com::sun::star::uno::Reference<
77 ::com::sun::star::lang::XMultiServiceFactory >& xFactory
78 , const rtl::OUString& rCID
79 ) throw (::com::sun::star::uno::RuntimeException );
81 virtual void SAL_CALL setScales(
82 const ::com::sun::star::uno::Sequence<
83 ::com::sun::star::chart2::ExplicitScaleData >& rScales
84 , sal_Bool bSwapXAndYAxis )
85 throw (::com::sun::star::uno::RuntimeException);
87 virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix );
89 virtual void SAL_CALL createShapes() = 0;
91 static bool isValidPosition( const ::com::sun::star::drawing::Position3D& rPos );
93 virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException);
97 //-------------------------------------------------------------------------
98 //-------------------------------------------------------------------------
99 //-------------------------------------------------------------------------
100 private: //methods
101 //no default constructor
102 PlotterBase();
104 protected: //methods
105 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
106 createGroupShape( const ::com::sun::star::uno::Reference<
107 ::com::sun::star::drawing::XShapes >& xTarget
108 , ::rtl::OUString rName=::rtl::OUString() );
110 protected: //member
111 ::com::sun::star::uno::Reference<
112 ::com::sun::star::drawing::XShapes > m_xLogicTarget;
113 ::com::sun::star::uno::Reference<
114 ::com::sun::star::drawing::XShapes > m_xFinalTarget;
115 ::com::sun::star::uno::Reference<
116 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory;
117 ShapeFactory* m_pShapeFactory;
118 //::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC;
120 rtl::OUString m_aCID;
122 sal_Int32 m_nDimension;
123 // needs to be created and deleted by the derived class
124 PlottingPositionHelper* m_pPosHelper;
126 //.............................................................................
127 } //namespace chart
128 //.............................................................................
129 #endif