sc/source/ui/docshell/impex.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7ad230676488d294ad03508ab027fc5e9c76a398
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Mar 21 07:19:29 2022 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Mar 21 08:45:58 2022 +0100

    a micro-optimization
    
    Change-Id: I2d94c2d3d7a159953b264e21a0fce8f0a0340163
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131856
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index cd4442459245..5d63fdbc87c5 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1800,9 +1800,9 @@ void ScImportExport::EmbeddedNullTreatment( OUString & 
rStr )
     // The normal case is no embedded NULL, check first before de-/allocating
     // ustring stuff.
     sal_Unicode cNull = 0;
-    if (rStr.indexOf( cNull) >= 0)
+    if (sal_Int32 pos = rStr.indexOf(cNull); pos >= 0)
     {
-        rStr = rStr.replaceAll( std::u16string_view( &cNull, 1), "");
+        rStr = rStr.replaceAll(std::u16string_view(&cNull, 1), u"", pos);
     }
 }
 

Reply via email to