[Libreoffice-commits] core.git: sc/qa sc/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 10 19:03:53 UTC 2020


 sc/qa/unit/tiledrendering/tiledrendering.cxx |    4 ++--
 sc/source/ui/app/seltrans.cxx                |    2 +-
 sc/source/ui/drawfunc/drtxtob2.cxx           |    2 +-
 sc/source/ui/inc/tabview.hxx                 |    1 -
 sc/source/ui/unoobj/viewuno.cxx              |    6 +++---
 sc/source/ui/view/gridwin.cxx                |    6 +++---
 sc/source/ui/view/gridwin4.cxx               |    6 +++---
 sc/source/ui/view/output3.cxx                |    8 ++++----
 sc/source/ui/view/prevwsh.cxx                |    2 +-
 sc/source/ui/view/tabvwsh4.cxx               |    2 +-
 sc/source/ui/view/tabvwsh9.cxx               |    6 +++---
 sc/source/ui/view/tabvwshb.cxx               |   18 +++++++++---------
 sc/source/ui/view/tabvwshh.cxx               |    8 ++++----
 sc/source/ui/view/viewfun2.cxx               |    2 +-
 14 files changed, 36 insertions(+), 37 deletions(-)

New commits:
commit 751592f927d8289335a0886006f9b740b3e20df5
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Feb 10 16:24:34 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Feb 10 20:03:19 2020 +0100

    Remove redundant ScTabView::GetSdrView
    
    See the comments at <https://gerrit.libreoffice.org/c/core/+/87872> "Removed old
    comment" how it was presumably used in the distant past to address
    <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/
    fatal-error-c1055?view=vs-2019> "compiler limit : out of keys".
    
    Change-Id: I168532403fe04111ce1af08d43924a426c09c42d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88379
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 45c87e93d2c8..315910de60ac 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -646,7 +646,7 @@ void ScTiledRenderingTest::testViewLock()
     SdrModel* pDrawModel = pViewData->GetDocument()->GetDrawLayer();
     SdrPage* pDrawPage = pDrawModel->GetPage(0);
     SdrObject* pObject = pDrawPage->GetObj(0);
-    SdrView* pView = pViewShell->GetSdrView();
+    SdrView* pView = pViewShell->GetScDrawView();
     aView1.m_bViewLock = false;
     pView->SdrBeginTextEdit(pObject);
     CPPUNIT_ASSERT(aView1.m_bViewLock);
@@ -829,7 +829,7 @@ void ScTiledRenderingTest::testCreateViewGraphicSelection()
     SdrModel* pDrawModel = pViewData->GetDocument()->GetDrawLayer();
     SdrPage* pDrawPage = pDrawModel->GetPage(0);
     SdrObject* pObject = pDrawPage->GetObj(0);
-    SdrView* pView = pViewShell->GetSdrView();
+    SdrView* pView = pViewShell->GetScDrawView();
     aView1.m_bGraphicSelection = false;
     aView1.m_bGraphicViewSelection = false;
     pView->MarkObj(pObject, pView->GetSdrPageView());
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 3a1c2128d560..a2f4b44c8c45 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -76,7 +76,7 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView
         {
             ScSelectionTransferMode eMode = SC_SELTRANS_INVALID;
 
-            SdrView* pSdrView = pView->GetSdrView();
+            SdrView* pSdrView = pView->GetScDrawView();
             if ( pSdrView )
             {
                 //  handle selection on drawing layer
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index a7e432d1e0a4..08f23192f918 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -41,7 +41,7 @@ sal_uInt16 ScGetFontWorkId()
 
 bool ScDrawTextObjectBar::IsNoteEdit() const
 {
-    return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() );
+    return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetScDrawView()->GetTextEditObject() );
 }
 
 //  if no text edited, functions like in drawsh
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 2f7939279b89..dc65f970d78e 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -340,7 +340,6 @@ public:
     bool            SelMouseButtonDown( const MouseEvent& rMEvt );
 
     ScDrawView*     GetScDrawView()         { return pDrawView.get(); }
-    SdrView*        GetSdrView()            { return pDrawView.get(); }
 
     bool            IsMinimized() const     { return bMinimized; }
 
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index a571ae8b4ad3..f639a3d742b5 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -300,7 +300,7 @@ namespace
                                 rViewData.GetActivePart() :
                                 static_cast<ScSplitPos>(_nPane);
         _rpWindow = _pViewShell->GetWindowByPos( eWhich );
-        _rpSdrView = _pViewShell->GetSdrView();
+        _rpSdrView = _pViewShell->GetScDrawView();
         _rpFormShell = _pViewShell->GetFormShell();
         return ( _rpFormShell != nullptr ) && ( _rpSdrView != nullptr )&& ( _rpWindow != nullptr );
     }
@@ -825,7 +825,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
 uno::Reference<drawing::XShapes> ScTabViewShell::getSelectedXShapes()
 {
     uno::Reference<drawing::XShapes> xShapes;
-    SdrView* pSdrView = GetSdrView();
+    SdrView* pSdrView = GetScDrawView();
     if (pSdrView)
     {
         const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
@@ -1093,7 +1093,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
             if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
                 pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
 
-            SdrView* pDrawView = GetViewShell()->GetSdrView();
+            SdrView* pDrawView = GetViewShell()->GetScDrawView();
 
             if (pDrawPage && pDrawView && pDrawView->GetSdrPageView())
             {
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index cc9c29661cbb..4fe34c9a6af6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2766,7 +2766,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
         if (!bEditView)
         {
             //  only if no cell editview is active, look at drawview
-            SdrView* pSdrView = pViewData->GetView()->GetSdrView();
+            SdrView* pSdrView = pViewData->GetView()->GetScDrawView();
             if ( pSdrView )
             {
                 OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
@@ -2992,7 +2992,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
             {
                 //  Is a draw object selected?
 
-                SdrView* pDrawView = pViewSh->GetSdrView();
+                SdrView* pDrawView = pViewSh->GetScDrawView();
                 if (pDrawView && pDrawView->AreObjectsMarked())
                 {
                     // #100442#; the context menu should open in the middle of the selected objects
@@ -4425,7 +4425,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
 
     // If the mouse down was inside a visible note window, ignore it and
     // leave it up to the ScPostIt to handle it
-    SdrView* pDrawView = pViewData->GetViewShell()->GetSdrView();
+    SdrView* pDrawView = pViewData->GetViewShell()->GetScDrawView();
     if (pDrawView)
     {
         const size_t nCount = pDrawView->GetMarkedObjectCount();
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4b48eefb0aa7..8fb7ca7853de 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -293,7 +293,7 @@ void ScGridWindow::PrePaint(vcl::RenderContext& /*rRenderContext*/)
 
     if(pTabViewShell)
     {
-        SdrView* pDrawView = pTabViewShell->GetSdrView();
+        SdrView* pDrawView = pTabViewShell->GetScDrawView();
 
         if (pDrawView)
         {
@@ -661,7 +661,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
         {
             MapMode aCurrentMapMode(pContentDev->GetMapMode());
             pContentDev->SetMapMode(aDrawMode);
-            SdrView* pDrawView = pTabViewShell->GetSdrView();
+            SdrView* pDrawView = pTabViewShell->GetScDrawView();
 
             if(pDrawView)
             {
@@ -903,7 +903,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
                 rDevice.SetMapMode(aNew);
             }
 
-            SdrView* pDrawView = pTabViewShell->GetSdrView();
+            SdrView* pDrawView = pTabViewShell->GetScDrawView();
 
             if(pDrawView)
             {
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 5b8d7e3ff842..4601d02cb0d2 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -72,7 +72,7 @@ Point ScOutputData::PrePrintDrawingLayer(long nLogStX, long nLogStY )
 
     if(pViewShell || pDrawView)
     {
-        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetSdrView();
+        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
 
         if(pLocalDrawView)
         {
@@ -110,7 +110,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
 
     if(pViewShell || pDrawView)
     {
-        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetSdrView();
+        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
 
         if(pLocalDrawView)
         {
@@ -134,7 +134,7 @@ void ScOutputData::PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset)
 
     if(pViewShell || pDrawView)
     {
-        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetSdrView();
+        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
 
         if(pLocalDrawView)
         {
@@ -192,7 +192,7 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer)
 
     if(pViewShell || pDrawView)
     {
-        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetSdrView();
+        SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
 
         if(pLocalDrawView)
         {
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index fe3688abdd43..dbb23ca68e42 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -174,7 +174,7 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
 
         //  also have to store the TabView's DesignMode state
         //  (only if draw view exists)
-        SdrView* pDrawView = pTabViewShell->GetSdrView();
+        SdrView* pDrawView = pTabViewShell->GetScDrawView();
         if ( pDrawView )
             nSourceDesignMode
                 = pDrawView->IsDesignMode() ? TRISTATE_TRUE : TRISTATE_FALSE;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 9bf853e23197..f4f61330b4fb 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -550,7 +550,7 @@ void ScTabViewShell::UpdateDrawShell()
     // Called after user interaction that may delete the selected drawing object.
     // Remove DrawShell if nothing is selected.
 
-    SdrView* pDrView = GetSdrView();
+    SdrView* pDrView = GetScDrawView();
     if ( pDrView && !pDrView->AreObjectsMarked() && !IsDrawSelMode() )
         SetDrawShell( false );
 }
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index d708e5942b74..8a86b6bf97ed 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -105,7 +105,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
                 SvxIMapDlg* pDlg = GetIMapDlg();
                 if ( pDlg )
                 {
-                    SdrView* pDrView = GetSdrView();
+                    SdrView* pDrView = GetScDrawView();
                     if ( pDrView )
                     {
                         const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -121,7 +121,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
 
         case SID_IMAP_EXEC:
         {
-            SdrView* pDrView = GetSdrView();
+            SdrView* pDrView = GetScDrawView();
             SdrMark* pMark = pDrView ? pDrView->GetMarkedObjectList().GetMark(0) : nullptr;
 
             if ( pMark )
@@ -183,7 +183,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
                 {
                     bool bDisable = true;
 
-                    SdrView* pDrView = GetSdrView();
+                    SdrView* pDrView = GetScDrawView();
                     if ( pDrView )
                     {
                         const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 8f3e89b2b50a..545fce092934 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -74,7 +74,7 @@ void ScTabViewShell::ConnectObject( const SdrOle2Obj* pObj )
     SfxInPlaceClient* pClient = FindIPClient( xObj, pWin );
     if ( !pClient )
     {
-        pClient = new ScClient( this, pWin, GetSdrView()->GetModel(), pObj );
+        pClient = new ScClient( this, pWin, GetScDrawView()->GetModel(), pObj );
         tools::Rectangle aRect = pObj->GetLogicRect();
         Size aDrawSize = aRect.GetSize();
 
@@ -151,7 +151,7 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
     {
         SfxInPlaceClient* pClient = FindIPClient( xObj, pWin );
         if ( !pClient )
-            pClient = new ScClient( this, pWin, GetSdrView()->GetModel(), pObj );
+            pClient = new ScClient( this, pWin, GetScDrawView()->GetModel(), pObj );
 
         if ( (sal_uInt32(nErr) & ERRCODE_ERROR_MASK) == 0 && xObj.is() )
         {
@@ -247,9 +247,9 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
         ErrorHandler::HandleError(nErr);
 
     // #i118524# refresh handles to suppress for activated OLE
-    if(GetSdrView())
+    if(GetScDrawView())
     {
-        GetSdrView()->AdjustMarkHdl();
+        GetScDrawView()->AdjustMarkHdl();
     }
     //! SetDocumentName should already happen in Sfx ???
     //TODO/LATER: how "SetDocumentName"?
@@ -258,7 +258,7 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
 
 ErrCode ScTabViewShell::DoVerb(long nVerb)
 {
-    SdrView* pView = GetSdrView();
+    SdrView* pView = GetScDrawView();
     if (!pView)
         return ERRCODE_SO_NOTIMPL;          // should not be
 
@@ -491,7 +491,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
     bool bTabProt = GetViewData().GetDocument()->IsTabProtected(GetViewData().GetTabNo());
     ScDocShell* pDocShell = GetViewData().GetDocShell();
     bool bShared = pDocShell && pDocShell->IsDocShared();
-    SdrView* pSdrView = GetSdrView();
+    SdrView* pSdrView = GetScDrawView();
 
     SfxWhichIter aIter(rSet);
     sal_uInt16 nWhich = aIter.FirstWhich();
@@ -576,7 +576,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
 
 bool ScTabViewShell::IsSignatureLineSelected()
 {
-    SdrView* pSdrView = GetSdrView();
+    SdrView* pSdrView = GetScDrawView();
     if (!pSdrView)
         return false;
 
@@ -596,7 +596,7 @@ bool ScTabViewShell::IsSignatureLineSelected()
 
 bool ScTabViewShell::IsQRCodeSelected()
 {
-    SdrView* pSdrView = GetSdrView();
+    SdrView* pSdrView = GetScDrawView();
     if (!pSdrView)
         return false;
 
@@ -622,7 +622,7 @@ bool ScTabViewShell::IsQRCodeSelected()
 
 bool ScTabViewShell::IsSignatureLineSigned()
 {
-    SdrView* pSdrView = GetSdrView();
+    SdrView* pSdrView = GetScDrawView();
     if (!pSdrView)
         return false;
 
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 0e153d690b2b..24a3a66b9876 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -60,7 +60,7 @@ void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
                 // In both cases, first select in the visible View
 
                 OUString aName;
-                SdrView* pDrView = GetSdrView();
+                SdrView* pDrView = GetScDrawView();
                 if (pDrView)
                 {
                     const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -94,7 +94,7 @@ void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
 
                     //! convert from something into 1/100mm ??????
 
-                    SdrView* pDrView = GetSdrView();
+                    SdrView* pDrView = GetScDrawView();
                     if ( pDrView )
                     {
                         const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -160,7 +160,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
             case SID_ACTIVE_OBJ_NAME:
                 {
                     OUString aName;
-                    uno::Reference < embed::XEmbeddedObject > xOLE = lcl_GetSelectedObj( GetSdrView() );
+                    uno::Reference < embed::XEmbeddedObject > xOLE = lcl_GetSelectedObj( GetScDrawView() );
                     if (xOLE.is())
                     {
                         aName = GetViewData().GetSfxDocShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xOLE );
@@ -173,7 +173,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
             case SID_OBJECT_WIDTH:
             case SID_OBJECT_HEIGHT:
                 {
-                    SdrView* pDrView = GetSdrView();
+                    SdrView* pDrView = GetScDrawView();
                     if ( pDrView )
                     {
                         const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 1880365a38af..dfd7aec9578a 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2934,7 +2934,7 @@ void ScViewFunc::MoveTable(
                 // Make sure to clear the cached page view after sheet
                 // deletion, which still points to the sdr page belonging to
                 // the deleted sheet.
-                SdrView* pSdrView = pDestViewSh->GetSdrView();
+                SdrView* pSdrView = pDestViewSh->GetScDrawView();
                 if (pSdrView)
                     pSdrView->ClearPageView();
 


More information about the Libreoffice-commits mailing list