sc/source/core/tool/interpr8.cxx |   30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)

New commits:
commit 84304ee068b36c4f545e9e7e761ecde646b02db1
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Wed Oct 20 17:00:54 2021 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Wed Oct 20 19:51:59 2021 +0200

    ScRefCellValue::hasEmptyValue() already includes isEmpty()
    
    ... so explicitly checking for isEmpty() in an extra condition is
    superfluous.
    
    Change-Id: Id84099a273b80834f0cb080e86991bd67f39babe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123903
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index fd0762eabc62..a24b2b949a50 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1407,16 +1407,13 @@ void ScInterpreter::ScConcat_MS()
                 if ( nGlobalError != FormulaError::NONE )
                     break;
                 ScRefCellValue aCell( mrDoc, aAdr );
-                if ( !aCell.isEmpty() )
+                if (!aCell.hasEmptyValue())
                 {
-                    if ( !aCell.hasEmptyValue() )
-                    {
-                        svl::SharedString aSS;
-                        GetCellString( aSS, aCell);
-                        const OUString& rStr = aSS.getString();
-                        if (CheckStringResultLen( aResBuf, rStr))
-                            aResBuf.append( rStr);
-                    }
+                    svl::SharedString aSS;
+                    GetCellString( aSS, aCell);
+                    const OUString& rStr = aSS.getString();
+                    if (CheckStringResultLen( aResBuf, rStr))
+                        aResBuf.append( rStr);
                 }
             }
             break;
@@ -1450,16 +1447,13 @@ void ScInterpreter::ScConcat_MS()
                         aAdr.SetRow( nRow );
                         aAdr.SetCol( nCol );
                         ScRefCellValue aCell( mrDoc, aAdr );
-                        if ( !aCell.isEmpty() )
+                        if (!aCell.hasEmptyValue() )
                         {
-                            if ( !aCell.hasEmptyValue() )
-                            {
-                                svl::SharedString aSS;
-                                GetCellString( aSS, aCell);
-                                const OUString& rStr = aSS.getString();
-                                if (CheckStringResultLen( aResBuf, rStr))
-                                    aResBuf.append( rStr);
-                            }
+                            svl::SharedString aSS;
+                            GetCellString( aSS, aCell);
+                            const OUString& rStr = aSS.getString();
+                            if (CheckStringResultLen( aResBuf, rStr))
+                                aResBuf.append( rStr);
                         }
                     }
                 }

Reply via email to