comphelper/source/property/property.cxx                       |    2 +-
 forms/source/xforms/convert.cxx                               |    2 +-
 sax/source/tools/converter.cxx                                |    4 ++--
 unotools/source/misc/datetime.cxx                             |    2 +-
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f5bfc127ddabf5f94d0cd1c1e4e6727b4dd3f73a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Mar 17 10:14:55 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Mar 17 09:41:13 2023 +0000

    elide some temporary OUStrings
    
    where we are calling
      append(OUString::createFromAscii(
    and we can rather call
      appendAscii
    
    Change-Id: I2366b518fe6d8d2484b00bb831cb79fb49bc0293
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149043
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/property/property.cxx 
b/comphelper/source/property/property.cxx
index 49a7a108f09a..16edc8203255 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -99,7 +99,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource,
                 }
                 else
                 {
-                    aBuffer.append( OUString::createFromAscii(typeid( *_rxDest 
).name()) );
+                    aBuffer.appendAscii( typeid( *_rxDest ).name() );
                 }
                 aBuffer.append( "' implementation).\n" );
 
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index d3fbb0718db6..420dfd32fe70 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -131,7 +131,7 @@ namespace
             ostr.fill('0');
             ostr.width(9);
             ostr << rTime.NanoSeconds;
-            sInfo.append(OUString::createFromAscii(ostr.str().c_str()));
+            sInfo.appendAscii(ostr.str().c_str());
         }
 
         return sInfo.makeStringAndClear();
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index ef043abd4d7d..85f228955367 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1129,7 +1129,7 @@ void Converter::convertDuration(OUStringBuffer& rBuffer,
                 ostr.fill('0');
                 ostr.width(9);
                 ostr << rDuration.NanoSeconds;
-                rBuffer.append(OUString::createFromAscii(ostr.str().c_str()));
+                rBuffer.appendAscii(ostr.str().c_str());
             }
             rBuffer.append('S');
         }
@@ -1510,7 +1510,7 @@ static void convertTime(
         ostr.fill('0');
         ostr.width(9);
         ostr << i_rDateTime.NanoSeconds;
-        i_rBuffer.append(OUString::createFromAscii(ostr.str().c_str()));
+        i_rBuffer.appendAscii(ostr.str().c_str());
     }
 }
 
diff --git a/unotools/source/misc/datetime.cxx 
b/unotools/source/misc/datetime.cxx
index c620307a9629..f95f39f92112 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -299,7 +299,7 @@ OUString toISO8601(const css::util::DateTime& rDateTime)
             ostr.fill('0');
             ostr.width(9);
             ostr << rDateTime.NanoSeconds;
-            rBuffer.append(OUString::createFromAscii(ostr.str().c_str()));
+            rBuffer.appendAscii(ostr.str().c_str());
         }
     }
     return rBuffer.makeStringAndClear();
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx 
b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index b12a3356d18c..aa0b0c2d4612 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -156,7 +156,7 @@ OUString 
SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation()
     OUStringBuffer buff;
     for (auto& slot : m_Slots)
     {
-        buff.append(OUString::createFromAscii(PK11_GetTokenName(slot)));
+        buff.appendAscii(PK11_GetTokenName(slot));
         buff.append("\n");
     }
     return buff.makeStringAndClear();

Reply via email to