summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-10-20 13:41:03 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-26 12:11:55 +0200
commit989eb3461bd4ba8716da2c62386e4f044731ff16 (patch)
tree521c2d35a392143585837b8d25ec450b7578afb0
parenttdf#138531: Also update DDE tables, not only fields (diff)
downloadcore-989eb3461bd4ba8716da2c62386e4f044731ff16.tar.gz
core-989eb3461bd4ba8716da2c62386e4f044731ff16.zip
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 (cherry picked from commit f4f2c94513e7d06691a73d9f12707c33d131d537) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123866 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
-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 19cdd7eac3cb..6cc239d9f7ec 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1740,17 +1740,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 )