summaryrefslogtreecommitdiff
path: root/unotools/source/config/moduleoptions.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /unotools/source/config/moduleoptions.cxx
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/moduleoptions.cxx')
-rw-r--r--unotools/source/config/moduleoptions.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 967191c06e1f..858d2d09e72e 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -28,6 +28,7 @@
#include <comphelper/sequence.hxx>
#include <osl/diagnose.h>
#include <o3tl/enumarray.hxx>
+#include <o3tl/string_view.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -938,27 +939,27 @@ OUString SvtModuleOptions::GetModuleName( EModule eModule ) const
return OUString();
}
-SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName(const OUString& sName)
+SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName(std::u16string_view sName)
{
- if ( sName == "swriter" )
+ if ( sName == u"swriter" )
return EFactory::WRITER;
- if (sName.equalsIgnoreAsciiCase("swriter/Web")) // sometimes they are registered for swriter/web :-(
+ if (o3tl::equalsIgnoreAsciiCase(sName, u"swriter/Web")) // sometimes they are registered for swriter/web :-(
return EFactory::WRITERWEB;
- if (sName.equalsIgnoreAsciiCase("swriter/GlobalDocument")) // sometimes they are registered for swriter/globaldocument :-(
+ if (o3tl::equalsIgnoreAsciiCase(sName, u"swriter/GlobalDocument")) // sometimes they are registered for swriter/globaldocument :-(
return EFactory::WRITERGLOBAL;
- if ( sName == "scalc" )
+ if ( sName == u"scalc" )
return EFactory::CALC;
- if ( sName == "sdraw" )
+ if ( sName == u"sdraw" )
return EFactory::DRAW;
- if ( sName == "simpress" )
+ if ( sName == u"simpress" )
return EFactory::IMPRESS;
- if ( sName == "schart" )
+ if ( sName == u"schart" )
return EFactory::CHART;
- if ( sName == "smath" )
+ if ( sName == u"smath" )
return EFactory::MATH;
- if ( sName == "sbasic" )
+ if ( sName == u"sbasic" )
return EFactory::BASIC;
- if ( sName == "sdatabase" )
+ if ( sName == u"sdatabase" )
return EFactory::DATABASE;
return EFactory::UNKNOWN_FACTORY;