summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-14 11:14:14 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-14 21:26:11 +0200
commitd827d36625e8952ef3bfadbf8de76578074d474d (patch)
tree1f8c765605d32f665cda914ce559cd4f07ef326e
parent610c6f02b11b4b4c555a78b0feb2a1eb35159e39 (diff)
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.mcnamara@collabora.com>
-rw-r--r--sc/source/filter/excel/xeescher.cxx9
1 files changed, 4 insertions, 5 deletions
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() );