[Libreoffice-commits] core.git: sc/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 8 12:51:15 UTC 2021


 sc/source/filter/excel/xeescher.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 8b7f948d9d79393bc6c1b11d239706666fd5d7de
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Jul 8 11:57:36 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jul 8 14:50:30 2021 +0200

    sc, VmlFormControlExporter: avoid OStringBuffer style
    
    It's more efficient to have just one big statement with all the + operations.
    
    See
    <https://gerrit.libreoffice.org/c/core/+/118488/2#message-425f5c995c78ed24df430154bec28d89dcef9eb3>.
    
    Change-Id: Ifc304a58f5e34e7654a800fe1163beeec3f791a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118635
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 2f92384c25b4..144782ddbbc1 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1151,14 +1151,11 @@ void VmlFormControlExporter::EndShape(sal_Int32 nShapeElement)
             break;
     }
     pVmlDrawing->startElement(FSNS(XML_x, XML_ClientData), XML_ObjectType, aObjectType);
-    OString aAnchor = OString::number(m_aAreaFrom.Left());
-    aAnchor += ", " + OString::number(m_aAreaFrom.Top());
-    aAnchor += ", " + OString::number(m_aAreaFrom.Right());
-    aAnchor += ", " + OString::number(m_aAreaFrom.Bottom());
-    aAnchor += ", " + OString::number(m_aAreaTo.Left());
-    aAnchor += ", " + OString::number(m_aAreaTo.Top());
-    aAnchor += ", " + OString::number(m_aAreaTo.Right());
-    aAnchor += ", " + OString::number(m_aAreaTo.Bottom());
+    OString aAnchor
+        = OString::number(m_aAreaFrom.Left()) + ", " + OString::number(m_aAreaFrom.Top()) + ", "
+          + OString::number(m_aAreaFrom.Right()) + ", " + OString::number(m_aAreaFrom.Bottom()) + ", "
+          + OString::number(m_aAreaTo.Left()) + ", " + OString::number(m_aAreaTo.Top()) + ", "
+          + OString::number(m_aAreaTo.Right()) + ", " + OString::number(m_aAreaTo.Bottom());
     XclXmlUtils::WriteElement(pVmlDrawing, FSNS(XML_x, XML_Anchor), aAnchor);
 
     if (!m_aMacroName.isEmpty())


More information about the Libreoffice-commits mailing list