summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-01 20:34:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-03 09:12:32 +0200
commitddef1e2c017b7d8e421dedc1a0ce722ff4208985 (patch)
tree54e52c86e4e33bcb61eee44706117b1616e99624 /svx
parent0a6d946694e4fcb39228c5e1fec58fcfd8a45989 (diff)
add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmdocumentclassification.cxx5
-rw-r--r--svx/source/inc/fmdocumentclassification.hxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx5
3 files changed, 7 insertions, 5 deletions
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 3b2f97c9150e..e624e23f5862 100644
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/xforms/XFormsSupplier.hpp>
#include <com/sun/star/frame/XModule.hpp>
+#include <o3tl/string_view.hxx>
#include <tools/diagnose_ex.h>
@@ -164,12 +165,12 @@ namespace svxform
}
- DocumentType DocumentClassification::getDocumentTypeForModuleIdentifier( const OUString& _rModuleIdentifier )
+ DocumentType DocumentClassification::getDocumentTypeForModuleIdentifier( std::u16string_view _rModuleIdentifier )
{
const ModuleInfo* pModuleInfo = lcl_getModuleInfo();
while ( pModuleInfo->pAsciiModuleOrServiceName )
{
- if ( _rModuleIdentifier.equalsAscii( pModuleInfo->pAsciiModuleOrServiceName ) )
+ if ( o3tl::equalsAscii(_rModuleIdentifier, pModuleInfo->pAsciiModuleOrServiceName ) )
return pModuleInfo->eType;
++pModuleInfo;
}
diff --git a/svx/source/inc/fmdocumentclassification.hxx b/svx/source/inc/fmdocumentclassification.hxx
index 05a2a76e4db8..e5052334811e 100644
--- a/svx/source/inc/fmdocumentclassification.hxx
+++ b/svx/source/inc/fmdocumentclassification.hxx
@@ -54,7 +54,7 @@ namespace svxform
);
static DocumentType getDocumentTypeForModuleIdentifier(
- const OUString& _rModuleIdentifier
+ std::u16string_view _rModuleIdentifier
);
static OUString getModuleIdentifierForDocumentType(
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 78dab1e0df2b..bf224a693be5 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <comphelper/propertyvalue.hxx>
+#include <o3tl/string_view.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/idle.hxx>
#include <svl/intitem.hxx>
@@ -161,7 +162,7 @@ struct CommandToRID
}
-static OUString ImplGetRID( const OUString& aCommand )
+static OUString ImplGetRID( std::u16string_view aCommand )
{
static constexpr OUStringLiteral EMPTY = u"";
static const CommandToRID aImplCommandToResMap[] =
@@ -181,7 +182,7 @@ static OUString ImplGetRID( const OUString& aCommand )
sal_Int32 i( 0 );
while ( aImplCommandToResMap[ i ].pCommand )
{
- if ( aCommand.equalsAscii( aImplCommandToResMap[ i ].pCommand ))
+ if ( o3tl::equalsAscii( aCommand, aImplCommandToResMap[ i ].pCommand ))
{
sRID = aImplCommandToResMap[i].sResId;
break;