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_VPOLARRADIUSAXIS_HXX
24 #define _CHART2_VPOLARRADIUSAXIS_HXX
25 
26 #include "VPolarAxis.hxx"
27 
28 #include <memory>
29 
30 //.............................................................................
31 namespace chart
32 {
33 //.............................................................................
34 
35 //-----------------------------------------------------------------------------
36 /**
37 */
38 
39 class VCartesianAxis;
40 
41 class VPolarRadiusAxis : public VPolarAxis
42 {
43 public:
44     VPolarRadiusAxis( const AxisProperties& rAxisProperties
45            , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier
46            , sal_Int32 nDimensionCount );
47     virtual ~VPolarRadiusAxis();
48 
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 );
58 
59     virtual void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix );
60 
61     virtual void setScales( const ::std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
62 
63     virtual void setExplicitScaleAndIncrement(
64             const ExplicitScaleData& rScale
65           , const ExplicitIncrementData& rIncrement )
66                 throw (::com::sun::star::uno::RuntimeException);
67 
68     virtual void initAxisLabelProperties(
69                     const ::com::sun::star::awt::Size& rFontReferenceSize
70                   , const ::com::sun::star::awt::Rectangle& rMaximumSpaceForLabels );
71 
72     virtual sal_Int32 estimateMaximumAutoMainIncrementCount();
73 
74     virtual void createMaximumLabels();
75     virtual void createLabels();
76     virtual void updatePositions();
77 
78     virtual void createShapes();
79 
80 protected: //methods
81     virtual bool prepareShapeCreation();
82 
83 private: //member
84     std::auto_ptr<VCartesianAxis>  m_apAxisWithLabels;
85 };
86 
87 //.............................................................................
88 } //namespace chart
89 //.............................................................................
90 #endif
91