Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / chart2 / source / view / inc / PlotterBase.hxx
blob25d0989420daded71034e4ade23d2e27cb9685a6
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 _CHART2_PLOTTERBASE_HXX
20 #define _CHART2_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/XServiceInfo.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/drawing/Position3D.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/chart2/XTransformation.hpp>
32 #include <cppuhelper/implbase1.hxx>
33 #include <vector>
35 //.............................................................................
36 namespace chart
38 //.............................................................................
40 class ShapeFactory;
41 class PlottingPositionHelper;
43 class PlotterBase
45 public:
46 PlotterBase( sal_Int32 nDimension );
47 virtual ~PlotterBase();
49 virtual void initPlotter(
50 const ::com::sun::star::uno::Reference<
51 ::com::sun::star::drawing::XShapes >& xLogicTarget
52 , const ::com::sun::star::uno::Reference<
53 ::com::sun::star::drawing::XShapes >& xFinalTarget
54 , const ::com::sun::star::uno::Reference<
55 ::com::sun::star::lang::XMultiServiceFactory >& xFactory
56 , const rtl::OUString& rCID
57 ) throw (::com::sun::star::uno::RuntimeException );
59 virtual void setScales( const ::std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
61 virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix );
63 virtual void createShapes() = 0;
65 static bool isValidPosition( const ::com::sun::star::drawing::Position3D& rPos );
67 private: //methods
68 //no default constructor
69 PlotterBase();
71 protected: //methods
72 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
73 createGroupShape( const ::com::sun::star::uno::Reference<
74 ::com::sun::star::drawing::XShapes >& xTarget
75 , ::rtl::OUString rName=::rtl::OUString() );
77 protected: //member
78 ::com::sun::star::uno::Reference<
79 ::com::sun::star::drawing::XShapes > m_xLogicTarget;
80 ::com::sun::star::uno::Reference<
81 ::com::sun::star::drawing::XShapes > m_xFinalTarget;
82 ::com::sun::star::uno::Reference<
83 ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory;
84 ShapeFactory* m_pShapeFactory;
85 rtl::OUString m_aCID;
87 sal_Int32 m_nDimension;
88 // needs to be created and deleted by the derived class
89 PlottingPositionHelper* m_pPosHelper;
91 //.............................................................................
92 } //namespace chart
93 //.............................................................................
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */