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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 17 08:53:26 UTC 2018


 sw/source/core/bastyp/calc.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 045c1d2da74b224e011cb6fc1c33fcef874ac0b4
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Dec 17 08:50:00 2018 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Dec 17 09:53:05 2018 +0100

    Simplify getting selected record it a bit
    
    Change-Id: Ifb3cc0e62b88562fdf4050186b51a56316a15d07
    Reviewed-on: https://gerrit.libreoffice.org/65240
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index c3621b0b1a3d..982abef78a34 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -503,18 +503,15 @@ SwCalcExp* SwCalc::VarLook( const OUString& rStr, bool bIns )
             // Initialize again because this doesn't happen in docfld anymore for
             // elements != SwFieldIds::Database. E.g. if there is an expression field before
             // an DB_Field in a document.
-            VarChange( sDBNum, pMgr->GetSelectedRecordId(sSourceName, sTableName));
+            const sal_uInt32 nTmpRec = pMgr->GetSelectedRecordId(sSourceName, sTableName);
+            VarChange(sDBNum, nTmpRec);
 
             if( sDBNum.equalsIgnoreAsciiCase(sColumnName) )
             {
-                m_aErrExpr.nValue.PutLong(long(pMgr->GetSelectedRecordId(sSourceName, sTableName)));
+                m_aErrExpr.nValue.PutULong(nTmpRec);
                 return &m_aErrExpr;
             }
 
-            sal_uLong nTmpRec = 0;
-            if( nullptr != ( pFnd = m_aVarTable.Find( sDBNum ) ) )
-                nTmpRec = pFnd->nValue.GetULong();
-
             OUString sResult;
             double nNumber = DBL_MAX;
 


More information about the Libreoffice-commits mailing list