diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-04-17 17:15:32 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-04-17 17:30:28 +0300 |
commit | ba397fc65fa4a21742b62c5b3f796b3535263ef4 (patch) | |
tree | cd3e89510069f6d6fa0962df87b6bd1294be6519 /chart2/source/view/diagram/VDiagram.cxx | |
parent | d457c25c491267999b1f82f2b4f76f7ccbe9cf37 (diff) |
Revert "WaE: unused variables"
See 3ac1584549364c573d4d4e3baed9ad39ad6ce8e4.
This reverts commit 7bcf9131032cbcdb162f33d03230e43d4f1db2aa.
This reverts commit 063aec33f029f1fbdd1b1ee274e94a00f256465e.
Diffstat (limited to 'chart2/source/view/diagram/VDiagram.cxx')
-rw-r--r-- | chart2/source/view/diagram/VDiagram.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index ae8a1656638a..9f5db9926456 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -209,6 +209,24 @@ void VDiagram::createShapes_2d() adjustPosAndSize_2d( m_aAvailablePosIncludingAxes, m_aAvailableSizeIncludingAxes ); } +E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape ) +{ + E3dScene* pRet=NULL; + uno::Reference< lang::XUnoTunnel > xUnoTunnel( xShape, uno::UNO_QUERY ); + uno::Reference< lang::XTypeProvider > xTypeProvider( xShape, uno::UNO_QUERY ); + if(xUnoTunnel.is()&&xTypeProvider.is()) + { + SvxShape* pSvxShape = reinterpret_cast<SvxShape*>(xUnoTunnel->getSomething( SvxShape::getUnoTunnelId() )); + if(pSvxShape) + { + SdrObject* pObj = pSvxShape->GetSdrObject(); + if( pObj && pObj->ISA(E3dScene) ) + pRet = static_cast<E3dScene*>(pObj); + } + } + return pRet; +} + void lcl_setLightSources( const uno::Reference< beans::XPropertySet > & xSource, const uno::Reference< beans::XPropertySet > & xDest ) @@ -419,8 +437,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) // To get the 3D aspect ratio's effect on the 2D scene size, the scene's 2D size needs to be adapted to // 3D content changes here. The tooling class remembers the current 3D transformation stack // and in its destructor, calculates a new 2D SnapRect for the scene and it's modified 3D geometry. - - // Unclear whether the above comment refers to an unused variable that was removed, or to the below code + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) ); @@ -585,7 +602,7 @@ void VDiagram::createShapes_3d() aEffectiveTranformation.shearXY(m_fYAnglePi,-m_fXAnglePi); //#i98497# 3D charts are rendered with wrong size - + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xDestProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX, uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTranformation ) ) ); } @@ -642,6 +659,7 @@ void VDiagram::createShapes_3d() ::basegfx::B3DHomMatrix aM; aM.translate(GRID_TO_WALL_DISTANCE/fXScale, GRID_TO_WALL_DISTANCE/fYScale, GRID_TO_WALL_DISTANCE/fZScale); aM.scale( fXScale, fYScale, fZScale ); + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xShapeProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) ); } |