xmloff/source/core/fasttokenhandler.cxx         |   10 ++++++----
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx |    8 +++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit bcf9c4dc32eccd33234511ccf3c2281bee3b0e60
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sun Apr 9 13:30:58 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Apr 9 18:16:31 2023 +0200

    elide temporary OString in TokenMap::TokenMap
    
    Change-Id: I6c5ae545d559f408a1ffd5f0132ab0c9a52de4dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150166
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/xmloff/source/core/fasttokenhandler.cxx 
b/xmloff/source/core/fasttokenhandler.cxx
index 9efdf8f15d5e..5a9c9e6dcdda 100644
--- a/xmloff/source/core/fasttokenhandler.cxx
+++ b/xmloff/source/core/fasttokenhandler.cxx
@@ -55,10 +55,12 @@ TokenMap::TokenMap() :
     int i = 0;
     for( auto& rTokenName : maTokenNamesUtf8 )
     {
-        OString aUtf8Token( *ppcTokenName );
-        rTokenName = uno::Sequence< sal_Int8 >( reinterpret_cast< const 
sal_Int8* >(
-                    aUtf8Token.getStr() ), aUtf8Token.getLength() );
-        maTokenNames[i++] = OUString( aUtf8Token.getStr(), 
aUtf8Token.getLength(), RTL_TEXTENCODING_UTF8 );
+        const char* pStr = *ppcTokenName;
+        int nStrLen = strlen(pStr);
+        rTokenName = uno::Sequence< sal_Int8 >(
+                    reinterpret_cast< const sal_Int8* >( pStr ), nStrLen );
+        maTokenNames[i++] = OUString( pStr,
+                    nStrLen, RTL_TEXTENCODING_UTF8 );
         ++ppcTokenName;
     }
 }
commit 7b3c45b710adcd6723167741e677695a265c5e98
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sun Apr 9 13:30:31 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Apr 9 18:16:21 2023 +0200

    elide temporaries in readEvents
    
    Change-Id: I4e2967f314113f78c0c054cb11fa39cf4749545b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150165
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 080b585a0cd5..7b781c4914e3 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1174,15 +1174,13 @@ void ElementDescriptor::readEvents()
             if (descr.AddListenerParam.isEmpty())
             {
                 // detection of event-name
-                OString listenerType( OUStringToOString( descr.ListenerType, 
RTL_TEXTENCODING_ASCII_US ) );
-                OString eventMethod( OUStringToOString( descr.EventMethod, 
RTL_TEXTENCODING_ASCII_US ) );
                 StringTriple const * p = g_pEventTranslations;
                 while (p->first)
                 {
-                    if (0 == ::rtl_str_compare( p->second, 
eventMethod.getStr() ) &&
-                        0 == ::rtl_str_compare( p->first, 
listenerType.getStr() ))
+                    if (descr.EventMethod.equalsAscii(p->second) &&
+                        descr.ListenerType.equalsAscii(p->first))
                     {
-                        aEventName = OUString( p->third, ::rtl_str_getLength( 
p->third ), RTL_TEXTENCODING_ASCII_US );
+                        aEventName = OStringToOUString( p->third, 
RTL_TEXTENCODING_ASCII_US );
                         break;
                     }
                     ++p;

Reply via email to