summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-10-20 13:41:03 +0200
committerEike Rathke <erack@redhat.com>2021-10-20 16:38:11 +0200
commitf4f2c94513e7d06691a73d9f12707c33d131d537 (patch)
tree00e67ba76f9127e30ddd8c2da41fc56296de7b7e /sc/source
parentc175c1dc19d0edc8ca66e39f0b4b8af04e3d6c87 (diff)
Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty
Change-Id: If6d20a1629e001708c700c5c25bef8a75fa34e25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123889 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/interpr8.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index b11ccec62428..2c2f1c212b3f 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1742,17 +1742,14 @@ void ScInterpreter::ScTextJoin_MS()
aAdr.SetRow( nRow );
aAdr.SetCol( nCol );
ScRefCellValue aCell( mrDoc, aAdr );
- if ( !aCell.isEmpty() )
+ if (aCell.hasEmptyValue())
+ aStr.clear();
+ else
{
- if ( !aCell.hasEmptyValue() )
- {
- svl::SharedString aSS;
- GetCellString( aSS, aCell);
- aStr = aSS.getString();
- }
+ svl::SharedString aSS;
+ GetCellString( aSS, aCell);
+ aStr = aSS.getString();
}
- else
- aStr.clear();
if ( !aStr.isEmpty() || !bSkipEmpty )
{
if ( !bFirst )