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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 15 12:12:17 UTC 2020


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

New commits:
commit 0bcff15d6f62c0712be98abfbce194a9285c6351
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 14 12:19:34 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 15 14:11:31 2020 +0200

    lcl_Parse ScDocument* arg dereferenced on all branches
    
    Change-Id: I1cf901ab555c0f3bca7ef2d505a08dd53f83cd18
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102714
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 7bc5b37d7abe..625b9ca4b393 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -207,16 +207,16 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
     pEd->GrabFocus();
 }
 
-static bool lcl_Parse( const OUString& rString, const ScDocument* pDoc, SCTAB nCurTab,
+static bool lcl_Parse( const OUString& rString, const ScDocument& rDoc, SCTAB nCurTab,
                 ScRefAddress& rStart, ScRefAddress& rEnd )
 {
     bool bRet = false;
-    const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
+    const formula::FormulaGrammar::AddressConvention eConv = rDoc.GetAddressConvention();
     if ( rString.indexOf(':') != -1 )
-        bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv );
+        bRet = ConvertDoubleRef( &rDoc, rString, nCurTab, rStart, rEnd, eConv );
     else
     {
-        bRet = ConvertSingleRef( pDoc, rString, nCurTab, rStart, eConv );
+        bRet = ConvertSingleRef( &rDoc, rString, nCurTab, rStart, eConv );
         rEnd = rStart;
     }
     return bRet;
@@ -242,7 +242,7 @@ IMPL_LINK(ScTabOpDlg, BtnHdl, weld::Button&, rBtn, void)
         else if (m_xEdRowCell->GetText().isEmpty() &&
                  m_xEdColCell->GetText().isEmpty())
             nError = TABOPERR_NOCOLROW;
-        else if ( !lcl_Parse( m_xEdFormulaRange->GetText(), pDoc, nCurTab,
+        else if ( !lcl_Parse( m_xEdFormulaRange->GetText(), *pDoc, nCurTab,
                                 theFormulaCell, theFormulaEnd ) )
             nError = TABOPERR_WRONGFORMULA;
         else


More information about the Libreoffice-commits mailing list