diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-06-16 13:23:08 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-06-16 17:29:52 +0200 |
commit | 099eef24da24d638fdf2c747d28040c9b3a30780 (patch) | |
tree | a636f31a48033b3164db59e057ce68d22c708edb /chart2 | |
parent | a4cd8bfea486327279d6d2a3bacc3e06e5df2745 (diff) |
AW080: Continued cleanups/remaps/corrections
Change-Id: I953f29e6a8d398e00884a600d6f4ceba880489a5
Reviewed-on: https://gerrit.libreoffice.org/55913
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'chart2')
4 files changed, 21 insertions, 11 deletions
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index b86980f47782..6330becfeb64 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -200,8 +200,9 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const E3dObject* pE3d = dynamic_cast< E3dObject* >(pRet); if( pE3d ) { - E3dScene* pScene = pE3d->GetScene(); - if( pScene ) + E3dScene* pScene(pE3d->getRootE3dSceneFromE3dObject()); + + if(nullptr != pScene) { // prepare result vector and call helper std::vector< const E3dCompoundObject* > aHitList; diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index a1c09e85fc87..66bb107b185e 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -829,9 +829,15 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); tools::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); - const E3dObject* pE3dObject = dynamic_cast< const E3dObject*>( pObj ); - if( pE3dObject ) - aObjectRect = pE3dObject->GetScene()->GetSnapRect(); + const E3dObject* pE3dObject(dynamic_cast< const E3dObject*>(pObj)); + if(nullptr != pE3dObject) + { + E3dScene* pScene(pE3dObject->getRootE3dSceneFromE3dObject()); + if(nullptr != pScene) + { + aObjectRect = pScene->GetSnapRect(); + } + } ActionDescriptionProvider::ActionType eActionType(ActionDescriptionProvider::ActionType::Move); if( !bIsMoveOnly && m_aSelection.isResizeableObjectSelected() ) diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 9be4ae4e3504..bc18ffe79334 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -330,7 +330,7 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject while( pObj && !ObjectIdentifier::isCID( aName ) ) { - SdrObjList* pObjList = pObj->getParentOfSdrObject(); + SdrObjList* pObjList = pObj->getParentSdrObjListFromSdrObject(); if( !pObjList ) return false; SdrObject* pOwner = pObjList->getSdrObjectFromSdrObjList(); @@ -549,14 +549,15 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) } } - E3dScene* pScene = nullptr; + E3dScene* pScene(nullptr); + if(pRotateable) { SolarMutexGuard aSolarGuard; - pScene = pRotateable->GetScene(); + pScene = pRotateable->getRootE3dSceneFromE3dObject(); } - return pScene; + return pScene; } bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList ) diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 146373edd0b2..cab13732b6a9 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -487,8 +487,10 @@ void BarChart::createShapes() for (uno::Reference<drawing::XShape> const & rShape : aShapeSet) { E3dScene* pScene = lcl_getE3dScene(rShape); - if (pScene) - aSceneSet.insert(pScene->GetScene()); + if(nullptr != pScene) + { + aSceneSet.insert(pScene->getRootE3dSceneFromE3dObject()); + } } for (E3dScene* pScene : aSceneSet) { |