summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-09 13:30:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-09 18:16:21 +0200
commit7b3c45b710adcd6723167741e677695a265c5e98 (patch)
tree0cc43a757a6b883c926a6cfefbe8d7b4ebe23bfc /xmlscript
parentac8c1acbd1d908f506618c05d02c7cbebefa5077 (diff)
elide temporaries in readEvents
Change-Id: I4e2967f314113f78c0c054cb11fa39cf4749545b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx8
1 files changed, 3 insertions, 5 deletions
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;