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_chart2.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 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 52 VAxisOrGridBase::~VAxisOrGridBase() 53 { 54 } 55 56 void VAxisOrGridBase::setExplicitScaleAndIncrement( 57 const ExplicitScaleData& rScale 58 , const ExplicitIncrementData& rIncrement ) 59 throw (uno::RuntimeException) 60 { 61 m_aScale = rScale; 62 m_aIncrement = rIncrement; 63 } 64 65 void VAxisOrGridBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix ) 66 { 67 m_aMatrixScreenToScene = HomogenMatrixToB3DHomMatrix(rMatrix); 68 PlotterBase::setTransformationSceneToScreen( rMatrix); 69 } 70 71 void VAxisOrGridBase::set3DWallPositions( CuboidPlanePosition eLeftWallPos, CuboidPlanePosition eBackWallPos, CuboidPlanePosition eBottomPos ) 72 { 73 m_eLeftWallPos = eLeftWallPos; 74 m_eBackWallPos = eBackWallPos; 75 m_eBottomPos = eBottomPos; 76 } 77 78 TickFactory* VAxisOrGridBase::createTickFactory() 79 { 80 return new TickFactory( m_aScale, m_aIncrement ); 81 } 82 83 //............................................................................. 84 } //namespace chart 85 //............................................................................. 86