xref: /trunk/main/chart2/source/view/axes/VAxisOrGridBase.cxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_chartview.hxx"
26 
27 #include "VAxisOrGridBase.hxx"
28 #include "ShapeFactory.hxx"
29 #include "CommonConverters.hxx"
30 #include "Tickmarks.hxx"
31 
32 // header for define DBG_ASSERT
33 #include <tools/debug.hxx>
34 
35 //.............................................................................
36 namespace chart
37 {
38 //.............................................................................
39 using namespace ::com::sun::star;
40 using namespace ::com::sun::star::chart2;
41 using ::com::sun::star::uno::Reference;
42 
VAxisOrGridBase(sal_Int32 nDimensionIndex,sal_Int32 nDimensionCount)43 VAxisOrGridBase::VAxisOrGridBase( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
44             : PlotterBase( nDimensionCount )
45             , m_nDimensionIndex( nDimensionIndex )
46             , m_eLeftWallPos(CuboidPlanePosition_Left)
47             , m_eBackWallPos(CuboidPlanePosition_Back)
48             , m_eBottomPos(CuboidPlanePosition_Bottom)
49 {
50 }
51 
~VAxisOrGridBase()52 VAxisOrGridBase::~VAxisOrGridBase()
53 {
54 }
55 
setExplicitScaleAndIncrement(const ExplicitScaleData & rScale,const ExplicitIncrementData & rIncrement)56 void VAxisOrGridBase::setExplicitScaleAndIncrement(
57               const ExplicitScaleData& rScale
58             , const ExplicitIncrementData& rIncrement )
59 {
60     m_aScale = rScale;
61     m_aIncrement = rIncrement;
62 }
63 
setTransformationSceneToScreen(const drawing::HomogenMatrix & rMatrix)64 void VAxisOrGridBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix )
65 {
66     m_aMatrixScreenToScene = HomogenMatrixToB3DHomMatrix(rMatrix);
67     PlotterBase::setTransformationSceneToScreen( rMatrix);
68 }
69 
set3DWallPositions(CuboidPlanePosition eLeftWallPos,CuboidPlanePosition eBackWallPos,CuboidPlanePosition eBottomPos)70 void VAxisOrGridBase::set3DWallPositions( CuboidPlanePosition eLeftWallPos, CuboidPlanePosition eBackWallPos, CuboidPlanePosition eBottomPos )
71 {
72     m_eLeftWallPos = eLeftWallPos;
73     m_eBackWallPos = eBackWallPos;
74     m_eBottomPos = eBottomPos;
75 }
76 
createTickFactory()77 TickFactory* VAxisOrGridBase::createTickFactory()
78 {
79     return new TickFactory( m_aScale, m_aIncrement );
80 }
81 
82 //.............................................................................
83 } //namespace chart
84 //.............................................................................
85