sc/source/filter/excel/xeescher.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit d827d36625e8952ef3bfadbf8de76578074d474d
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Aug 14 11:14:14 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Aug 14 21:26:11 2023 +0200

    move GetEditTextObject to after it is potentially generated
    
    Change-Id: Iadd6a2b66e3131b8883cf3812b5f0a8153631abe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155660
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/filter/excel/xeescher.cxx 
b/sc/source/filter/excel/xeescher.cxx
index 04c1f1b9efbd..c7926a9b6f12 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1643,12 +1643,8 @@ XclExpNote::XclExpNote(const XclExpRoot& rRoot, const 
ScAddress& rScPos,
     // get the main note text
     OUString aNoteText;
     if( pScNote )
-    {
         aNoteText = pScNote->GetText();
-        const EditTextObject *pEditObj = pScNote->GetEditTextObject();
-        if( pEditObj )
-            mpNoteContents = XclExpStringHelper::CreateString( rRoot, 
*pEditObj );
-    }
+
     // append additional text
     aNoteText = ScGlobal::addToken( aNoteText, rAddText, '\n', 2 );
 
@@ -1689,6 +1685,9 @@ XclExpNote::XclExpNote(const XclExpRoot& rRoot, const 
ScAddress& rScPos,
                     maAuthor = XclExpString( " " );
                 else
                     maAuthor = XclExpString( pScNote->GetAuthor(), 
XclStrFlags::NONE, 54 );
+
+                if (const EditTextObject *pEditObj = 
pScNote->GetEditTextObject())
+                    mpNoteContents = XclExpStringHelper::CreateString( rRoot, 
*pEditObj );
             }
 
             SetRecSize( 9 + maAuthor.GetSize() );

Reply via email to