sc/source/core/data/formulacell.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 217dab1c2c197bbaff8d9948ccb8e7cb4b959fcf
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Sep 28 09:24:44 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 28 11:29:07 2022 +0200

    no need to convert this OUStringBuffer to OUString
    
    can save some cycles by treating it as a std::u16string_view
    
    Change-Id: I704118b26cbfbebcc8a7f19ce11079ef5a544a84
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140692
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 9754ab340188..023a4214bd93 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1290,9 +1290,8 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 
             // The initial '=' is optional in ODFF.
             const sal_Int32 nLeadingEqual = (aFormula.getLength() > 0 && 
aFormula[0] == '=') ? 1 : 0;
-            OUString aShouldBe = aShouldBeBuf.makeStringAndClear();
-            if (aFormula.getLength() == aShouldBe.getLength() + nLeadingEqual 
&&
-                    aFormula.match( aShouldBe, nLeadingEqual))
+            if (aFormula.getLength() == aShouldBeBuf.getLength() + 
nLeadingEqual &&
+                    aFormula.match( aShouldBeBuf, nLeadingEqual))
             {
                 // Put them in the same formula group.
                 ScFormulaCellGroupRef xGroup = pPreviousCell->GetCellGroup();

Reply via email to