svx/source/unodraw/unoprov.cxx     |    2 +-
 svx/source/xml/xmlxtimp.cxx        |    2 +-
 vcl/source/image/ImplImageTree.cxx |   12 ++++++++----
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 05867c4e5f6d244f0f18db2a00e6fbc0d8141a41
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Apr 13 11:29:01 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Apr 13 13:44:44 2022 +0200

    tdf#80633 speed up dialog layout
    
    some small speedups when opening Format->Paragraph
    
    Change-Id: If97725ecff45b9c2c01b405e153ec05b12882573
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132952
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 85892826ed99..b209f23ac0d3 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1998,7 +1998,7 @@ static bool 
SvxUnoConvertResourceStringBuiltInFromApi(rtl::OUStringConstExpr con
         if( sStr == pSourceResIds[i].asView() )
         {
             OUString aReplace = SvxResId(pDestResIds[i]);
-            rString = rString.replaceAt( 0, 
OUString(pSourceResIds[i]).getLength(), aReplace );
+            rString = aReplace + rString.subView( 
pSourceResIds[i].asView().size() );
             return true;
         }
     }
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 9bf7b6996b43..e79ec19daea8 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -203,7 +203,7 @@ void SvxXMLTableImportContext::importColor( const 
uno::Reference< XFastAttribute
             case XML_ELEMENT(DRAW_OOO, XML_COLOR):
             {
                 sal_Int32 nColor(0);
-                ::sax::Converter::convertColor(nColor, aIter.toString());
+                ::sax::Converter::convertColor(nColor, aIter.toView());
                 rAny <<= nColor;
                 break;
             }
diff --git a/vcl/source/image/ImplImageTree.cxx 
b/vcl/source/image/ImplImageTree.cxx
index 4c2e63c57cae..3979206cb184 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -107,10 +107,14 @@ OUString createPath(std::u16string_view name, sal_Int32 
pos, std::u16string_view
 
 OUString getIconCacheUrl(std::u16string_view sVariant, ImageRequestParameters 
const & rParameters)
 {
-    OUString sUrl = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"
-        + rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName;
-    rtl::Bootstrap::expandMacros(sUrl);
-    return sUrl;
+    // the macro expansion can be expensive in bulk, so cache that
+    static OUString CACHE_DIR = []()
+    {
+        OUString sDir = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/";
+        rtl::Bootstrap::expandMacros(sDir);
+        return sDir;
+    }();
+    return CACHE_DIR + rParameters.msStyle + "/" + sVariant + "/" + 
rParameters.msName;
 }
 
 OUString createIconCacheUrl(

Reply via email to