dbaccess/source/filter/xml/xmlfilter.cxx |    8 +++-----
 pyuno/source/module/pyuno_module.cxx     |   27 +++++++++++++++------------
 vcl/source/image/ImplImageTree.cxx       |   14 ++++++++------
 3 files changed, 26 insertions(+), 23 deletions(-)

New commits:
commit 0652885ffeddac94c47fe7c53a58c172a63f9d56
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue May 7 14:28:40 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 11 14:50:40 2024 +0200

    replace createFromAscii with OUString literals in ReadThroughComponent
    
    Change-Id: Ic92b15ea369e420faf6bfc40f509bba6e454710f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167500
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/source/filter/xml/xmlfilter.cxx
index 06b6db1edd95..18a1d223df86 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -125,12 +125,11 @@ static ErrCode ReadThroughComponent(
 static ErrCode ReadThroughComponent(
     const uno::Reference< embed::XStorage >& xStorage,
     const uno::Reference<XComponent>& xModelComponent,
-    const char* pStreamName,
+    const OUString& sStreamName,
     const uno::Reference<XComponentContext> & rxContext,
     ODBFilter& _rFilter)
 {
     OSL_ENSURE( xStorage.is(), "Need storage!");
-    OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!");
 
     if ( !xStorage )
         // TODO/LATER: better error handling
@@ -141,7 +140,6 @@ static ErrCode ReadThroughComponent(
     try
     {
         // open stream (and set parser input)
-        OUString sStreamName = OUString::createFromAscii(pStreamName);
         if ( !xStorage->hasByName( sStreamName ) || 
!xStorage->isStreamElement( sStreamName ) )
         {
             // stream name not found! return immediately with OK signal
@@ -323,7 +321,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
         uno::Reference<XComponent> xModel(GetModel());
         ErrCode nRet = ReadThroughComponent( xStorage
                                     ,xModel
-                                    ,"settings.xml"
+                                    ,u"settings.xml"_ustr
                                     ,GetComponentContext()
                                     ,*this
                                     );
@@ -331,7 +329,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
         if ( nRet == ERRCODE_NONE )
             nRet = ReadThroughComponent( xStorage
                                     ,xModel
-                                    ,"content.xml"
+                                    ,u"content.xml"_ustr
                                     ,GetComponentContext()
                                     ,*this
                                     );
commit ed699baa9226f94d912cd2646ed8e2ce37bb1869
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri May 10 21:51:11 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat May 11 14:50:28 2024 +0200

    workaround clang segfault on macos-intel
    
    Change-Id: Icfced4a990e2d02995bff4078f14b8ee26e9cca3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167497
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/pyuno/source/module/pyuno_module.cxx 
b/pyuno/source/module/pyuno_module.cxx
index 2a70e80285fe..53527df35780 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -196,21 +196,24 @@ void fillStruct(
     }
 }
 
-OUString getLibDir()
+OUString getLibDir();
+OUString getLibDirImpl()
 {
-    static OUString sLibDir = []() {
-        OUString libDir;
+    OUString libDir;
 
-        // workarounds the $(ORIGIN) until it is available
-        if 
(Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getLibDir), 
libDir))
-        {
-            libDir = libDir.copy(0, libDir.lastIndexOf('/'));
-            OUString name(u"PYUNOLIBDIR"_ustr);
-            rtl_bootstrap_set(name.pData, libDir.pData);
-        }
-        return libDir;
-    }();
+    // workarounds the $(ORIGIN) until it is available
+    if 
(Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getLibDir), 
libDir))
+    {
+        libDir = libDir.copy(0, libDir.lastIndexOf('/'));
+        OUString name(u"PYUNOLIBDIR"_ustr);
+        rtl_bootstrap_set(name.pData, libDir.pData);
+    }
+    return libDir;
+}
 
+OUString getLibDir()
+{
+    static OUString sLibDir = getLibDirImpl();
     return sLibDir;
 }
 
diff --git a/vcl/source/image/ImplImageTree.cxx 
b/vcl/source/image/ImplImageTree.cxx
index 55fb4ee2f349..f565461f8607 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -108,15 +108,17 @@ OUString createPath(std::u16string_view name, sal_Int32 
pos, std::u16string_view
     return OUString::Concat(name.substr(0, pos + 1)) + locale + 
name.substr(pos);
 }
 
+OUString getIconCacheUrlImpl()
+{
+    OUString sDir = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr;
+    rtl::Bootstrap::expandMacros(sDir);
+    return sDir;
+}
+
 OUString getIconCacheUrl(std::u16string_view sVariant, ImageRequestParameters 
const & rParameters)
 {
     // the macro expansion can be expensive in bulk, so cache that
-    static OUString CACHE_DIR = []()
-    {
-        OUString sDir = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr;
-        rtl::Bootstrap::expandMacros(sDir);
-        return sDir;
-    }();
+    static OUString CACHE_DIR = getIconCacheUrlImpl();
     return CACHE_DIR + rParameters.msStyle + "/" + sVariant + "/" + 
rParameters.msName;
 }
 

Reply via email to