xref: /aoo4110/main/chart2/source/view/main/VTitle.hxx (revision b1cdbd2c)
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_VTITLE_HXX
24 #define _CHART2_VTITLE_HXX
25 
26 #include <com/sun/star/chart2/XTitle.hpp>
27 #include <com/sun/star/drawing/XShapes.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 
30 //.............................................................................
31 namespace chart
32 {
33 //.............................................................................
34 
35 //-----------------------------------------------------------------------------
36 /**
37 */
38 
39 class VTitle
40 {
41 public:
42     VTitle( const ::com::sun::star::uno::Reference<
43                   ::com::sun::star::chart2::XTitle > & xTitle );
44     virtual ~VTitle();
45 
46     void    init( const ::com::sun::star::uno::Reference<
47                      ::com::sun::star::drawing::XShapes >& xTargetPage
48              , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory
49              , const rtl::OUString& rCID );
50 
51     void    createShapes( const ::com::sun::star::awt::Point& rPos
52                           , const ::com::sun::star::awt::Size& rReferenceSize );
53 
54     double getRotationAnglePi() const;
55     ::com::sun::star::awt::Size getUnrotatedSize() const;
56     ::com::sun::star::awt::Size getFinalSize() const;
57     void    changePosition( const ::com::sun::star::awt::Point& rPos );
58 
59 private:
60     ::com::sun::star::uno::Reference<
61                     ::com::sun::star::drawing::XShapes >            m_xTarget;
62     ::com::sun::star::uno::Reference<
63                     ::com::sun::star::lang::XMultiServiceFactory>	m_xShapeFactory;
64     ::com::sun::star::uno::Reference<
65         ::com::sun::star::chart2::XTitle >                  m_xTitle;
66     ::com::sun::star::uno::Reference<
67                     ::com::sun::star::drawing::XShape >             m_xShape;
68     rtl::OUString   m_aCID;
69 
70     double      m_fRotationAngleDegree;
71     sal_Int32   m_nXPos;
72     sal_Int32   m_nYPos;
73 };
74 
75 //.............................................................................
76 } //namespace chart
77 //.............................................................................
78 #endif
79 
80