1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _CHART2_PLOTTERBASE_HXX 28 #define _CHART2_PLOTTERBASE_HXX 29 30 #include "chartview/ExplicitScaleValues.hxx" 31 32 #include <com/sun/star/drawing/HomogenMatrix.hpp> 33 #include <com/sun/star/drawing/XShapes.hpp> 34 #include <com/sun/star/lang/XServiceInfo.hpp> 35 #include <com/sun/star/uno/XComponentContext.hpp> 36 #include <com/sun/star/drawing/Position3D.hpp> 37 #include <com/sun/star/beans/XPropertySet.hpp> 38 #include <com/sun/star/chart2/XTransformation.hpp> 39 40 #include <cppuhelper/implbase1.hxx> 41 #include <vector> 42 43 //............................................................................. 44 namespace chart 45 { 46 //............................................................................. 47 48 class ShapeFactory; 49 class PlottingPositionHelper; 50 51 class PlotterBase 52 { 53 public: 54 PlotterBase( sal_Int32 nDimension ); 55 virtual ~PlotterBase(); 56 57 virtual void initPlotter( 58 const ::com::sun::star::uno::Reference< 59 ::com::sun::star::drawing::XShapes >& xLogicTarget 60 , const ::com::sun::star::uno::Reference< 61 ::com::sun::star::drawing::XShapes >& xFinalTarget 62 , const ::com::sun::star::uno::Reference< 63 ::com::sun::star::lang::XMultiServiceFactory >& xFactory 64 , const rtl::OUString& rCID 65 ) throw (::com::sun::star::uno::RuntimeException ); 66 67 virtual void setScales( const ::std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ); 68 69 virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix ); 70 71 virtual void createShapes() = 0; 72 73 static bool isValidPosition( const ::com::sun::star::drawing::Position3D& rPos ); 74 75 //------------------------------------------------------------------------- 76 //------------------------------------------------------------------------- 77 //------------------------------------------------------------------------- 78 private: //methods 79 //no default constructor 80 PlotterBase(); 81 82 protected: //methods 83 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > 84 createGroupShape( const ::com::sun::star::uno::Reference< 85 ::com::sun::star::drawing::XShapes >& xTarget 86 , ::rtl::OUString rName=::rtl::OUString() ); 87 88 protected: //member 89 ::com::sun::star::uno::Reference< 90 ::com::sun::star::drawing::XShapes > m_xLogicTarget; 91 ::com::sun::star::uno::Reference< 92 ::com::sun::star::drawing::XShapes > m_xFinalTarget; 93 ::com::sun::star::uno::Reference< 94 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory; 95 ShapeFactory* m_pShapeFactory; 96 //::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; 97 98 rtl::OUString m_aCID; 99 100 sal_Int32 m_nDimension; 101 // needs to be created and deleted by the derived class 102 PlottingPositionHelper* m_pPosHelper; 103 }; 104 //............................................................................. 105 } //namespace chart 106 //............................................................................. 107 #endif 108