[Libreoffice-commits] core.git: chart2/source

Tor Lillqvist tml at collabora.com
Fri Apr 17 05:16:49 PDT 2015


 chart2/source/view/diagram/VDiagram.cxx |   24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

New commits:
commit 063aec33f029f1fbdd1b1ee274e94a00f256465e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Apr 17 15:08:02 2015 +0300

    WaE: unused variables and fallout
    
    Change-Id: If6d68b54aa4fc5744a30521e5fa7caf9d876d975

diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 9f5db99..ae8a165 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -209,24 +209,6 @@ 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 )
@@ -437,7 +419,8 @@ 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.
-            E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape ));
+
+            // Unclear whether the above comment refers to an unused variable that was removed, or to the below code
 
             m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX
                 , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) );
@@ -602,7 +585,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 ) ) );
         }
@@ -659,7 +642,6 @@ 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)) );
             }


More information about the Libreoffice-commits mailing list