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_VPOLARGRID_HXX
28 #define _CHART2_VPOLARGRID_HXX
29 
30 #include "VAxisOrGridBase.hxx"
31 #include "Tickmarks.hxx"
32 #include "VLineProperties.hxx"
33 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
34 
35 //.............................................................................
36 namespace chart
37 {
38 //.............................................................................
39 
40 //-----------------------------------------------------------------------------
41 /**
42 */
43 class PolarPlottingPositionHelper;
44 
45 class VPolarGrid : public VAxisOrGridBase
46 {
47 //-------------------------------------------------------------------------
48 // public methods
49 //-------------------------------------------------------------------------
50 public:
51     VPolarGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
52         , const ::com::sun::star::uno::Sequence<
53             ::com::sun::star::uno::Reference<
54                 ::com::sun::star::beans::XPropertySet > > & rGridPropertiesList //main grid, subgrid, subsubgrid etc
55         );
56     virtual ~VPolarGrid();
57 
58     virtual void createShapes();
59 
60     void setIncrements( const std::vector< ExplicitIncrementData >& rIncrements );
61 
62     static void createLinePointSequence_ForAngleAxis(
63                     ::com::sun::star::drawing::PointSequenceSequence& rPoints
64                     , ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos
65                     , const ExplicitIncrementData& rIncrement
66                     , const ExplicitScaleData& rScale
67                     , PolarPlottingPositionHelper* pPosHelper
68                     , double fLogicRadius, double fLogicZ );
69 
70 private: //member
71     ::com::sun::star::uno::Sequence<
72         ::com::sun::star::uno::Reference<
73             ::com::sun::star::beans::XPropertySet > > m_aGridPropertiesList;//main grid, subgrid, subsubgrid etc
74     PolarPlottingPositionHelper* m_pPosHelper;
75     ::std::vector< ExplicitIncrementData >   m_aIncrements;
76 
77     void    getAllTickInfos( sal_Int32 nDimensionIndex, ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const;
78 
79     void    create2DRadiusGrid( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xLogicTarget
80                     , ::std::vector< ::std::vector< TickInfo > >& rRadiusTickInfos
81                     , ::std::vector< ::std::vector< TickInfo > >& rAngleTickInfos
82                     , const ::std::vector<VLineProperties>& rLinePropertiesList );
83 #if NOTYET
84     void    create2DAngleGrid( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xLogicTarget
85                     , ::std::vector< ::std::vector< TickInfo > >& rRadiusTickInfos
86                     , ::std::vector< ::std::vector< TickInfo > >& rAngleTickInfos
87                     , const ::std::vector<VLineProperties>& rLinePropertiesList );
88 #endif
89 };
90 
91 //.............................................................................
92 } //namespace chart
93 //.............................................................................
94 #endif
95