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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 11 09:17:38 UTC 2021


 sc/source/ui/view/cellsh1.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit b61385c57efdd8c9e709f5bbcf8c388273c5a714
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jan 10 20:02:41 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 11 10:16:51 2021 +0100

    SetTabNoAndCursor never passed a null ScViewData*
    
    Change-Id: I972a7825306f6251f9b864ae451fdb491fcd837a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109065
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e7c9887b3e12..4a7324d43eb8 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -147,11 +147,11 @@ OUString FlagsToString( InsertDeleteFlags nFlags,
     return aFlagsStr;
 }
 
-void SetTabNoAndCursor( const ScViewData* rViewData, const OUString& rCellId )
+void SetTabNoAndCursor( const ScViewData& rViewData, const OUString& rCellId )
 {
-    ScTabViewShell* pTabViewShell = rViewData->GetViewShell();
+    ScTabViewShell* pTabViewShell = rViewData.GetViewShell();
     assert(pTabViewShell);
-    const ScDocument& rDoc = rViewData->GetDocShell()->GetDocument();
+    const ScDocument& rDoc = rViewData.GetDocShell()->GetDocument();
     std::vector<sc::NoteEntry> aNotes;
     rDoc.GetAllNoteEntries(aNotes);
 
@@ -2287,7 +2287,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
                     if (!aCellId.isEmpty())
                     {
-                        SetTabNoAndCursor( &GetViewData(), aCellId );
+                        SetTabNoAndCursor( GetViewData(), aCellId );
                     }
 
                     ScAddress aPos( GetViewData().GetCurX(), GetViewData().GetCurY(), GetViewData().GetTabNo() );
@@ -2466,7 +2466,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 const OUString& aCellId = pIdItem->GetValue();
                 if (!aCellId.isEmpty())
                 {
-                    SetTabNoAndCursor( &GetViewData(), aCellId );
+                    SetTabNoAndCursor( GetViewData(), aCellId );
                 }
             }
 


More information about the Libreoffice-commits mailing list