1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _CHART2_PLOTTERBASE_HXX 24 #define _CHART2_PLOTTERBASE_HXX 25 26 #include "chartview/ExplicitScaleValues.hxx" 27 28 #include <com/sun/star/drawing/HomogenMatrix.hpp> 29 #include <com/sun/star/drawing/XShapes.hpp> 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <com/sun/star/uno/XComponentContext.hpp> 32 #include <com/sun/star/drawing/Position3D.hpp> 33 #include <com/sun/star/beans/XPropertySet.hpp> 34 #include <com/sun/star/chart2/XTransformation.hpp> 35 36 #include <cppuhelper/implbase1.hxx> 37 #include <vector> 38 39 //............................................................................. 40 namespace chart 41 { 42 //............................................................................. 43 44 class ShapeFactory; 45 class PlottingPositionHelper; 46 47 class PlotterBase 48 { 49 public: 50 PlotterBase( sal_Int32 nDimension ); 51 virtual ~PlotterBase(); 52 53 virtual void initPlotter( 54 const ::com::sun::star::uno::Reference< 55 ::com::sun::star::drawing::XShapes >& xLogicTarget 56 , const ::com::sun::star::uno::Reference< 57 ::com::sun::star::drawing::XShapes >& xFinalTarget 58 , const ::com::sun::star::uno::Reference< 59 ::com::sun::star::lang::XMultiServiceFactory >& xFactory 60 , const rtl::OUString& rCID 61 ) throw (::com::sun::star::uno::RuntimeException ); 62 63 virtual void setScales( const ::std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ); 64 65 virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix ); 66 67 virtual void createShapes() = 0; 68 69 static bool isValidPosition( const ::com::sun::star::drawing::Position3D& rPos ); 70 71 //------------------------------------------------------------------------- 72 //------------------------------------------------------------------------- 73 //------------------------------------------------------------------------- 74 private: //methods 75 //no default constructor 76 PlotterBase(); 77 78 protected: //methods 79 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > 80 createGroupShape( const ::com::sun::star::uno::Reference< 81 ::com::sun::star::drawing::XShapes >& xTarget 82 , ::rtl::OUString rName=::rtl::OUString() ); 83 84 protected: //member 85 ::com::sun::star::uno::Reference< 86 ::com::sun::star::drawing::XShapes > m_xLogicTarget; 87 ::com::sun::star::uno::Reference< 88 ::com::sun::star::drawing::XShapes > m_xFinalTarget; 89 ::com::sun::star::uno::Reference< 90 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory; 91 ShapeFactory* m_pShapeFactory; 92 //::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; 93 94 rtl::OUString m_aCID; 95 96 sal_Int32 m_nDimension; 97 // needs to be created and deleted by the derived class 98 PlottingPositionHelper* m_pPosHelper; 99 }; 100 //............................................................................. 101 } //namespace chart 102 //............................................................................. 103 #endif 104