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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 14 07:54:29 UTC 2020


 sc/source/filter/inc/lotform.hxx   |    8 ++++----
 sc/source/filter/lotus/lotform.cxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 05bd17adf0d86fb4d9b20a4da8bade8a5624f0a3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 19:39:56 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 09:53:33 2020 +0200

    ReadCRD never called with a nullptr
    
    Change-Id: I9fc0e61bf9ddcd5f28919241144db69f623be84f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102602
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx
index 5f39ee0cfd64..be2dfd1910fb 100644
--- a/sc/source/filter/inc/lotform.hxx
+++ b/sc/source/filter/inc/lotform.hxx
@@ -76,7 +76,7 @@ private:
     bool                bWK123;     // alternative for 123
 
     void                ReadSRD( const ScDocument* pDoc, ScSingleRefData& rSRD, sal_uInt8 nFlags );
-    inline void         ReadCRD( const ScDocument* pDoc, ScComplexRefData& rCRD, sal_uInt8 nFlags );
+    inline void         ReadCRD( const ScDocument& rDoc, ScComplexRefData& rCRD, sal_uInt8 nFlags );
     void                IncToken( TokenId &rParam );
                         // Attention: here the Token-chain is extended in Pool
                         // with '(<rParam>)+1' and finished with Store() !
@@ -98,13 +98,13 @@ private:
     using               LotusConverterBase::Reset;
 };
 
-inline void LotusToSc::ReadCRD( const ScDocument* pDoc, ScComplexRefData& rCRD, sal_uInt8 nRelBit )
+inline void LotusToSc::ReadCRD( const ScDocument& rDoc, ScComplexRefData& rCRD, sal_uInt8 nRelBit )
 {
     // 1st part
-    ReadSRD( pDoc, rCRD.Ref1, nRelBit );
+    ReadSRD( &rDoc, rCRD.Ref1, nRelBit );
 
     // 2nd part
-    ReadSRD( pDoc, rCRD.Ref2, nRelBit >> 3 );
+    ReadSRD( &rDoc, rCRD.Ref2, nRelBit >> 3 );
 }
 
 inline void LotusToSc::SetWK3()
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index c4d4dccad5f7..ac62e9fddfe3 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -557,7 +557,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
                 break;
             case FT_Rref:
                 Read( nRelBits );
-                ReadCRD( &m_rContext.rDoc, aCRD, nRelBits );
+                ReadCRD( m_rContext.rDoc, aCRD, nRelBits );
                 aStack << aPool.Store( aCRD );
                 break;
             case FT_Nrref:


More information about the Libreoffice-commits mailing list