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_DRAGMETHOD_ROTATEDIAGRAM_HXX
28 #define CHART2_DRAGMETHOD_ROTATEDIAGRAM_HXX
29 
30 #include "DragMethod_Base.hxx"
31 
32 // header for class ::basegfx::B3DPolyPolygon
33 #include <basegfx/polygon/b3dpolypolygon.hxx>
34 
35 namespace chart
36 {
37 
38 class DragMethod_RotateDiagram : public DragMethod_Base
39 {
40 public:
41     enum RotationDirection
42     {
43         ROTATIONDIRECTION_FREE,
44         ROTATIONDIRECTION_X,
45         ROTATIONDIRECTION_Y,
46         ROTATIONDIRECTION_Z
47     };
48 
49     DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWrapper
50         , const rtl::OUString& rObjectCID
51         , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel
52         , RotationDirection eRotationDirection
53         );
54     virtual ~DragMethod_RotateDiagram();
55 
56     virtual void TakeSdrDragComment(String& rStr) const;
57 
58 	virtual bool BeginSdrDrag();
59 	virtual void MoveSdrDrag(const Point& rPnt);
60 	virtual bool EndSdrDrag(bool bCopy);
61 
62 	virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager);
63 
64 private:
65     E3dScene*   m_pScene;
66 
67     Rectangle   m_aReferenceRect;
68     Point       m_aStartPos;
69     basegfx::B3DPolyPolygon m_aWireframePolyPolygon;
70 
71     double      m_fInitialXAngleRad;
72     double      m_fInitialYAngleRad;
73     double      m_fInitialZAngleRad;
74 
75     double      m_fAdditionalXAngleRad;
76     double      m_fAdditionalYAngleRad;
77     double      m_fAdditionalZAngleRad;
78 
79     sal_Int32 m_nInitialHorizontalAngleDegree;
80     sal_Int32 m_nInitialVerticalAngleDegree;
81 
82     sal_Int32 m_nAdditionalHorizontalAngleDegree;
83     sal_Int32 m_nAdditionalVerticalAngleDegree;
84 
85     RotationDirection m_eRotationDirection;
86     sal_Bool    m_bRightAngledAxes;
87 };
88 
89 } //  namespace chart
90 
91 // CHART2_DRAGMETHOD_ROTATEDIAGRAM_HXX
92 #endif
93