summaryrefslogtreecommitdiff
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
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>
-rw-r--r--chart2/source/tools/CharacterProperties.cxx6
-rw-r--r--compilerplugins/clang/stringview.cxx7
-rw-r--r--compilerplugins/clang/stringviewparam.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx18
-rw-r--r--cui/source/options/optsave.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.cxx5
-rw-r--r--dbaccess/source/core/inc/documentevents.hxx2
-rw-r--r--extensions/source/propctrlr/pushbuttonnavigation.cxx5
-rw-r--r--filter/source/config/cache/typedetection.cxx5
-rw-r--r--forms/source/helper/formnavigation.cxx5
-rw-r--r--forms/source/inc/formnavigation.hxx2
-rw-r--r--i18npool/inc/transliterationImpl.hxx2
-rw-r--r--i18npool/source/transliteration/transliterationImpl.cxx11
-rw-r--r--include/o3tl/string_view.hxx6
-rw-r--r--include/oox/ppt/pptfilterhelpers.hxx2
-rw-r--r--include/oox/ppt/slidetransition.hxx2
-rw-r--r--include/svtools/unoevent.hxx4
-rw-r--r--include/unotools/lingucfg.hxx6
-rw-r--r--oox/source/ppt/pptfilterhelpers.cxx4
-rw-r--r--oox/source/ppt/slidetransition.cxx2
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx7
-rw-r--r--reportdesign/source/core/api/ReportComponent.cxx6
-rw-r--r--sc/inc/compiler.hxx2
-rw-r--r--sc/source/core/tool/addincol.cxx5
-rw-r--r--sc/source/core/tool/compiler.cxx5
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xlchart.cxx5
-rw-r--r--sc/source/filter/inc/xechart.hxx2
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx5
-rw-r--r--sd/inc/EffectMigration.hxx2
-rw-r--r--sd/source/core/EffectMigration.cxx7
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx20
-rw-r--r--sd/source/filter/eppt/pptexanimations.hxx2
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx5
-rw-r--r--starmath/inc/smmod.hxx4
-rw-r--r--starmath/source/parse5.cxx2
-rw-r--r--starmath/source/smmod.cxx9
-rw-r--r--starmath/source/symbol.cxx4
-rw-r--r--svtools/source/uno/unoevent.cxx7
-rw-r--r--svx/source/form/fmdocumentclassification.cxx5
-rw-r--r--svx/source/inc/fmdocumentclassification.hxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx5
-rw-r--r--sw/inc/ccoll.hxx2
-rw-r--r--sw/inc/unocoll.hxx2
-rw-r--r--sw/source/core/fields/authfld.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx5
-rw-r--r--sw/source/filter/html/htmlcss1.cxx5
-rw-r--r--sw/source/uibase/app/appopt.cxx6
-rw-r--r--sw/source/uibase/chrdlg/ccoll.cxx5
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx3
-rw-r--r--testtools/source/bridgetest/cppobj.cxx3
-rw-r--r--unotools/source/config/lingucfg.cxx25
-rw-r--r--vcl/inc/unx/saldisp.hxx2
-rw-r--r--vcl/unx/generic/app/keysymnames.cxx5
-rw-r--r--xmloff/inc/XMLNumberStylesImport.hxx2
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx7
57 files changed, 162 insertions, 130 deletions
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 659ef6d955f3..2923cc17bac0 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -343,11 +343,11 @@ void CharacterProperties::AddDefaultsToMap(
SvtLinguConfig aLinguConfig;
lang::Locale aDefaultLocale;
- aLinguConfig.GetProperty("DefaultLocale") >>= aDefaultLocale;
+ aLinguConfig.GetProperty(u"DefaultLocale") >>= aDefaultLocale;
lang::Locale aDefaultLocale_CJK;
- aLinguConfig.GetProperty("DefaultLocale_CJK") >>= aDefaultLocale_CJK;
+ aLinguConfig.GetProperty(u"DefaultLocale_CJK") >>= aDefaultLocale_CJK;
lang::Locale aDefaultLocale_CTL;
- aLinguConfig.GetProperty("DefaultLocale_CTL") >>= aDefaultLocale_CTL;
+ aLinguConfig.GetProperty(u"DefaultLocale_CTL") >>= aDefaultLocale_CTL;
using namespace ::com::sun::star::i18n::ScriptType;
LanguageType nLang;
diff --git a/compilerplugins/clang/stringview.cxx b/compilerplugins/clang/stringview.cxx
index e1cac4195265..a3eb09faf97d 100644
--- a/compilerplugins/clang/stringview.cxx
+++ b/compilerplugins/clang/stringview.cxx
@@ -377,9 +377,10 @@ bool StringView::VisitCXXMemberCallExpr(CXXMemberCallExpr const* expr)
{
auto const dc = loplugin::DeclCheck(expr->getMethodDecl());
if (dc.Function("toInt32") || dc.Function("toUInt32") || dc.Function("toInt64")
- || dc.Function("toDouble") || dc.Function("equalsIgnoreAsciiCase")
- || dc.Function("compareToIgnoreAsciiCase") || dc.Function("trim")
- || dc.Function("startsWith") || dc.Function("endsWith") || dc.Function("match"))
+ || dc.Function("toDouble") || dc.Function("equalsAscii")
+ || dc.Function("equalsIgnoreAsciiCase") || dc.Function("compareToIgnoreAsciiCase")
+ || dc.Function("trim") || dc.Function("startsWith") || dc.Function("endsWith")
+ || dc.Function("match"))
{
handleSubExprThatCouldBeView(expr->getImplicitObjectArgument());
}
diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx
index a20691a3a4d1..dae4b9b1925f 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -141,7 +141,7 @@ DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr)
|| n == "indexOf" || n == "lastIndexOf" || n == "compareTo" || n == "match"
|| n == "trim" || n == "toInt32" || n == "toUInt32" || n == "toInt64" || n == "toDouble"
|| n == "equalsIgnoreAsciiCase" || n == "compareToIgnoreAsciiCase" || n == "getToken"
- || n == "copy")
+ || n == "copy" || n == "equalsAscii")
{
good = true;
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index fb39369984b9..4a7778973471 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1365,7 +1365,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
Any aValue;
Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
aValue <<= aLocale;
- pLangConfig->aLinguConfig.SetProperty( "DefaultLocale", aValue );
+ pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale", aValue );
if (xLinguProp.is())
xLinguProp->setDefaultLocale( aLocale );
}
@@ -1384,7 +1384,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
Any aValue;
Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
aValue <<= aLocale;
- pLangConfig->aLinguConfig.SetProperty( "DefaultLocale_CJK", aValue );
+ pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CJK", aValue );
if (xLinguProp.is())
xLinguProp->setDefaultLocale_CJK( aLocale );
}
@@ -1403,7 +1403,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
Any aValue;
Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
aValue <<= aLocale;
- pLangConfig->aLinguConfig.SetProperty( "DefaultLocale_CTL", aValue );
+ pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CTL", aValue );
if (xLinguProp.is())
xLinguProp->setDefaultLocale_CTL( aLocale );
}
@@ -1530,18 +1530,18 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
Any aCTLLang;
try
{
- aWestLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale");
+ aWestLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale");
Locale aLocale;
aWestLang >>= aLocale;
eCurLang = LanguageTag::convertToLanguageType( aLocale, false);
- aCJKLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CJK");
+ aCJKLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CJK");
aLocale = Locale();
aCJKLang >>= aLocale;
eCurLangCJK = LanguageTag::convertToLanguageType( aLocale, false);
- aCTLLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CTL");
+ aCTLLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CTL");
aLocale = Locale();
aCTLLang >>= aLocale;
eCurLangCTL = LanguageTag::convertToLanguageType( aLocale, false);
@@ -1596,7 +1596,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
m_xIgnoreLanguageChangeCB->save_state();
m_xCurrentDocCB->save_state();
- bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale" );
+ bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( u"DefaultLocale" );
m_xWesternLanguageFT->set_sensitive( bEnable );
m_xWesternLanguageLB->set_sensitive( bEnable );
@@ -1616,7 +1616,7 @@ IMPL_LINK(OfaLanguagesTabPage, SupportHdl, weld::Toggleable&, rBox, void)
bool bCheck = rBox.get_active();
if ( m_xAsianSupportCB.get() == &rBox )
{
- bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CJK");
+ bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CJK");
bCheck = ( bCheck && !bReadonly );
m_xAsianLanguageLB->set_sensitive( bCheck );
if (rBox.get_sensitive())
@@ -1624,7 +1624,7 @@ IMPL_LINK(OfaLanguagesTabPage, SupportHdl, weld::Toggleable&, rBox, void)
}
else if ( m_xCTLSupportCB.get() == &rBox )
{
- bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CTL");
+ bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CTL");
bCheck = ( bCheck && !bReadonly );
m_xComplexLanguageLB->set_sensitive( bCheck );
if (rBox.get_sensitive())
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 4c783e15298e..717fa623a668 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -21,6 +21,7 @@
#include <string_view>
+#include <o3tl/string_view.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include "optsave.hxx"
@@ -324,7 +325,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
return bModified;
}
-static bool isODFFormat( const OUString& sFilter )
+static bool isODFFormat( std::u16string_view sFilter )
{
static const char* aODFFormats[] =
{
@@ -348,7 +349,7 @@ static bool isODFFormat( const OUString& sFilter )
int i = 0;
while ( aODFFormats[i] != nullptr )
{
- if ( sFilter.equalsAscii( aODFFormats[i++] ) )
+ if ( o3tl::equalsAscii( sFilter, aODFFormats[i++] ) )
{
bRet = true;
break;
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index cd4428775e03..571ad2c6fa21 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/sequence.hxx>
@@ -123,12 +124,12 @@ namespace dbaccess
m_pData->rParent.release();
}
- bool DocumentEvents::needsSynchronousNotification( const OUString& _rEventName )
+ bool DocumentEvents::needsSynchronousNotification( std::u16string_view _rEventName )
{
const DocumentEventData* pEventData = lcl_getDocumentEventData();
while ( pEventData->pAsciiEventName )
{
- if ( _rEventName.equalsAscii( pEventData->pAsciiEventName ) )
+ if ( o3tl::equalsAscii( _rEventName, pEventData->pAsciiEventName ) )
return pEventData->bNeedsSyncNotify;
++pEventData;
}
diff --git a/dbaccess/source/core/inc/documentevents.hxx b/dbaccess/source/core/inc/documentevents.hxx
index 24a7dd24ca17..e7f7ef9ff5ac 100644
--- a/dbaccess/source/core/inc/documentevents.hxx
+++ b/dbaccess/source/core/inc/documentevents.hxx
@@ -48,7 +48,7 @@ namespace dbaccess
DocumentEvents(const DocumentEvents&) = delete;
const DocumentEvents& operator=(const DocumentEvents&) = delete;
- static bool needsSynchronousNotification( const OUString& _rEventName );
+ static bool needsSynchronousNotification( std::u16string_view _rEventName );
// XInterface
virtual void SAL_CALL acquire() noexcept override;
diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx
index 3d1bf748c712..14cca3a5d4b1 100644
--- a/extensions/source/propctrlr/pushbuttonnavigation.cxx
+++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx
@@ -22,6 +22,7 @@
#include "formstrings.hxx"
#include <comphelper/extract.hxx>
#include <comphelper/property.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
@@ -53,12 +54,12 @@ namespace pcr
nullptr
};
- sal_Int32 lcl_getNavigationURLIndex( const OUString& _rNavURL )
+ sal_Int32 lcl_getNavigationURLIndex( std::u16string_view _rNavURL )
{
const char** pLookup = pNavigationURLs;
while ( *pLookup )
{
- if ( _rNavURL.equalsAscii( *pLookup ) )
+ if ( o3tl::equalsAscii( _rNavURL, *pLookup ) )
return pLookup - pNavigationURLs;
++pLookup;
}
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index b91ac31566af..44c4c9029641 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <o3tl/string_view.hxx>
#include <tools/wldcrd.hxx>
#include <sal/log.hxx>
#include <framework/interaction.hxx>
@@ -125,7 +126,7 @@ namespace {
* In each category, rank them from strictly-structured to
* loosely-structured.
*/
-int getFlatTypeRank(const OUString& rType)
+int getFlatTypeRank(std::u16string_view rType)
{
// List formats from more complex to less complex.
// TODO: Add more.
@@ -287,7 +288,7 @@ int getFlatTypeRank(const OUString& rType)
for (size_t i = 0; i < n; ++i)
{
- if (rType.equalsAscii(ranks[i]))
+ if (o3tl::equalsAscii(rType, ranks[i]))
return n - i - 1;
}
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 816c81f314b8..a99f29b24f50 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -26,6 +26,7 @@
#include <comphelper/propertyvalue.hxx>
#include <tools/debug.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
@@ -427,12 +428,12 @@ namespace frm
}
- sal_Int16 OFormNavigationMapper::getFeatureId( const OUString& _rCompleteURL )
+ sal_Int16 OFormNavigationMapper::getFeatureId( std::u16string_view _rCompleteURL )
{
const FeatureURL* pFeatures = lcl_getFeatureTable();
while ( pFeatures->pAsciiURL )
{
- if ( _rCompleteURL.equalsAscii( pFeatures->pAsciiURL ) )
+ if ( o3tl::equalsAscii( _rCompleteURL, pFeatures->pAsciiURL ) )
return pFeatures->nFormFeature;
++pFeatures;
}
diff --git a/forms/source/inc/formnavigation.hxx b/forms/source/inc/formnavigation.hxx
index 3ca32a996add..e18b99a1bc77 100644
--- a/forms/source/inc/formnavigation.hxx
+++ b/forms/source/inc/formnavigation.hxx
@@ -203,7 +203,7 @@ namespace frm
the id of the feature URL, or -1 if the URl is not known
(which is a valid usage)
*/
- static sal_Int16 getFeatureId( const OUString& _rCompleteURL );
+ static sal_Int16 getFeatureId( std::u16string_view _rCompleteURL );
private:
OFormNavigationMapper( const OFormNavigationMapper& ) = delete;
diff --git a/i18npool/inc/transliterationImpl.hxx b/i18npool/inc/transliterationImpl.hxx
index 95c5fa2a088f..57441067346a 100644
--- a/i18npool/inc/transliterationImpl.hxx
+++ b/i18npool/inc/transliterationImpl.hxx
@@ -91,7 +91,7 @@ private:
css::uno::Reference< css::i18n::XExtendedTransliteration > caseignore;
/// @throws css::uno::RuntimeException
- bool loadModuleByName( const OUString& implName,
+ bool loadModuleByName( std::u16string_view implName,
css::uno::Reference<css::i18n::XExtendedTransliteration> & body, const css::lang::Locale& rLocale);
void clear();
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index c85d16442341..d397279435ce 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -27,6 +27,7 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <o3tl/string_view.hxx>
#include <rtl/ustring.hxx>
#include <algorithm>
@@ -203,11 +204,11 @@ TransliterationImpl::loadModule( TransliterationModules modType, const Locale& r
// additional transliterations from TransliterationModulesExtra (we cannot extend TransliterationModules)
if (bool(modType & TransliterationModules(TransliterationModulesExtra::IGNORE_DIACRITICS_CTL)))
{
- if (loadModuleByName("ignoreDiacritics_CTL", bodyCascade[numCascade], rLocale))
+ if (loadModuleByName(u"ignoreDiacritics_CTL", bodyCascade[numCascade], rLocale))
numCascade++;
}
if (bool(modType & TransliterationModules(TransliterationModulesExtra::IGNORE_KASHIDA_CTL)))
- if (loadModuleByName("ignoreKashida_CTL", bodyCascade[numCascade], rLocale))
+ if (loadModuleByName(u"ignoreKashida_CTL", bodyCascade[numCascade], rLocale))
numCascade++;
} else if (bool(modType & TransliterationModules_NON_IGNORE_MASK)) {
@@ -600,17 +601,17 @@ void TransliterationImpl::loadBody( OUString const &implName, Reference<XExtende
}
bool
-TransliterationImpl::loadModuleByName( const OUString& implName,
+TransliterationImpl::loadModuleByName( std::u16string_view implName,
Reference<XExtendedTransliteration>& body, const Locale& rLocale)
{
- OUString cname = TRLT_IMPLNAME_PREFIX + implName;
+ OUString cname = OUString::Concat(TRLT_IMPLNAME_PREFIX) + implName;
loadBody(cname, body);
if (body.is()) {
body->loadModule(TransliterationModules(0), rLocale); // toUpper/toLoad need rLocale
// if the module is ignore case/kana/width, load caseignore for equals/compareString mothed
for (sal_Int16 i = 0; i < 3; i++) {
- if (implName.equalsAscii(TMlist[i].implName)) {
+ if (o3tl::equalsAscii(implName, TMlist[i].implName)) {
if (i == 0) // current module is caseignore
body->loadModule(TMlist[0].tm, rLocale); // caseignore need to setup module name
if (! caseignore.is()) {
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index 6138f5c09c88..0935844349e2 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -22,6 +22,12 @@
namespace o3tl
{
// Like OUString::equalsIgnoreAsciiCase, but for two std::u16string_view:
+inline bool equalsAscii(std::u16string_view s1, const char* s2)
+{
+ return rtl_ustr_ascii_compare_WithLength(s1.data(), s1.size(), s2) == 0;
+}
+
+// Like OUString::equalsIgnoreAsciiCase, but for two std::u16string_view:
inline bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
{
if (s1.size() != s2.size())
diff --git a/include/oox/ppt/pptfilterhelpers.hxx b/include/oox/ppt/pptfilterhelpers.hxx
index 35372e6fe3e2..58547d9e7ee3 100644
--- a/include/oox/ppt/pptfilterhelpers.hxx
+++ b/include/oox/ppt/pptfilterhelpers.hxx
@@ -58,7 +58,7 @@ namespace oox::ppt {
bool mbDirection; // true: default geometric direction
static const transition* getList();
- static const transition* find( const OUString& rName );
+ static const transition* find( std::u16string_view rName );
};
struct OOX_DLLPUBLIC convert_subtype
diff --git a/include/oox/ppt/slidetransition.hxx b/include/oox/ppt/slidetransition.hxx
index 36f5eca9cebe..01603b9fa649 100644
--- a/include/oox/ppt/slidetransition.hxx
+++ b/include/oox/ppt/slidetransition.hxx
@@ -38,7 +38,7 @@ namespace oox::ppt {
{
public:
SlideTransition();
- explicit SlideTransition(const OUString & );
+ explicit SlideTransition(std::u16string_view );
void setSlideProperties( PropertyMap& props );
void setTransitionFilterProperties( const css::uno::Reference< css::animations::XTransitionFilter > & xFilter );
diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx
index acad27b51f44..825280e16b8a 100644
--- a/include/svtools/unoevent.hxx
+++ b/include/svtools/unoevent.hxx
@@ -136,10 +136,10 @@ protected:
const SvMacroItemId nEvent ) = 0;
/// convert an API event name to the event ID as used by SvxMacroItem
- SvMacroItemId mapNameToEventID(const OUString& rName) const;
+ SvMacroItemId mapNameToEventID(std::u16string_view rName) const;
/// get the event ID for the name; return 0 if not supported
- SvMacroItemId getMacroID(const OUString& rName) const;
+ SvMacroItemId getMacroID(std::u16string_view rName) const;
};
diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx
index 20c678b96b4f..b4a0b824e127 100644
--- a/include/unotools/lingucfg.hxx
+++ b/include/unotools/lingucfg.hxx
@@ -169,18 +169,18 @@ public:
const css::uno::Sequence< css::beans::PropertyValue >& rValues );
css::uno::Any
- GetProperty( const OUString &rPropertyName ) const;
+ GetProperty( std::u16string_view rPropertyName ) const;
css::uno::Any
GetProperty( sal_Int32 nPropertyHandle ) const;
- bool SetProperty( const OUString &rPropertyName,
+ bool SetProperty( std::u16string_view rPropertyName,
const css::uno::Any &rValue );
bool SetProperty( sal_Int32 nPropertyHandle,
const css::uno::Any &rValue );
void GetOptions( SvtLinguOptions &rOptions ) const;
- bool IsReadOnly( const OUString &rPropertyName ) const;
+ bool IsReadOnly( std::u16string_view rPropertyName ) const;
//!
//! the following functions work on the 'ServiceManager' sub node of the
diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx
index fff1d3ddd3b5..054bf6260c07 100644
--- a/oox/source/ppt/pptfilterhelpers.cxx
+++ b/oox/source/ppt/pptfilterhelpers.cxx
@@ -127,13 +127,13 @@ namespace oox::ppt {
return aList;
}
- const transition* transition::find( const OUString& rName )
+ const transition* transition::find( std::u16string_view rName )
{
const transition* p = transition::getList();
while( p->mpName )
{
- if( rName.equalsAscii( p->mpName ) )
+ if( o3tl::equalsAscii( rName, p->mpName ) )
return p;
p++;
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index 3ec5100583c1..5221c2f68710 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -52,7 +52,7 @@ namespace oox::ppt {
}
- SlideTransition::SlideTransition(const OUString & sFilterName)
+ SlideTransition::SlideTransition(std::u16string_view sFilterName)
: mnTransitionType( 0 )
, mnTransitionSubType( 0 )
, mbTransitionDirectionNormal( true )
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index ae35e8e4d7eb..f58a1e205ae2 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -38,6 +38,7 @@
#include <oox/ppt/slidetransition.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include <o3tl/string_view.hxx>
#include "animvariantcontext.hxx"
#include "commonbehaviorcontext.hxx"
@@ -59,13 +60,13 @@ using ::com::sun::star::beans::NamedValue;
namespace {
- oox::ppt::AnimationAttributeEnum getAttributeEnumByAPIName(const OUString &rAPIName)
+ oox::ppt::AnimationAttributeEnum getAttributeEnumByAPIName(std::u16string_view rAPIName)
{
oox::ppt::AnimationAttributeEnum eResult = oox::ppt::AnimationAttributeEnum::UNKNOWN;
const oox::ppt::ImplAttributeNameConversion *attrConv = oox::ppt::getAttributeConversionList();
while(attrConv->mpAPIName != nullptr)
{
- if(rAPIName.equalsAscii(attrConv->mpAPIName))
+ if(o3tl::equalsAscii(rAPIName, attrConv->mpAPIName))
{
eResult = attrConv->meAttribute;
break;
@@ -82,7 +83,7 @@ namespace {
aAny >>= aNameList;
// only get first token.
- return oox::ppt::convertAnimationValue(getAttributeEnumByAPIName(aNameList.getToken(0, ';')), rAny);
+ return oox::ppt::convertAnimationValue(getAttributeEnumByAPIName(o3tl::getToken(aNameList, 0, ';')), rAny);
}
css::uno::Any convertPointPercent(const css::awt::Point& rPoint)
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index 509d4600504a..5c036b5d6bdf 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -79,11 +79,11 @@ OFormatProperties::OFormatProperties()
SvtLinguConfig aLinguConfig;
using namespace ::com::sun::star::i18n::ScriptType;
- aLinguConfig.GetProperty("DefaultLocale") >>= aCharLocale;
+ aLinguConfig.GetProperty(u"DefaultLocale") >>= aCharLocale;
LanguageType eCurLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocale, false), LATIN);
- aLinguConfig.GetProperty("DefaultLocale_CJK") >>= aCharLocaleAsian;
+ aLinguConfig.GetProperty(u"DefaultLocale_CJK") >>= aCharLocaleAsian;
LanguageType eCurLangCJK = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocaleAsian, false), ASIAN);
- aLinguConfig.GetProperty("DefaultLocale_CTL") >>= aCharLocaleComplex;
+ aLinguConfig.GetProperty(u"DefaultLocale_CTL") >>= aCharLocaleComplex;
LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocaleComplex, false), COMPLEX);
vcl::Font aLatin,aCJK,aCTL;
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 5f3b6354c967..0cd48fccc92e 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -349,7 +349,7 @@ private:
bool ParseValue( const OUString& );
bool ParseOpCode( const OUString&, bool bInArray );
- bool ParseOpCode2( const OUString& );
+ bool ParseOpCode2( std::u16string_view );
bool ParseString();
bool ParseReference( const OUString& rSymbol, const OUString* pErrRef = nullptr );
bool ParseSingleReference( const OUString& rSymbol, const OUString* pErrRef = nullptr );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 126a0f915c7a..26b7baa9ed7f 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -24,6 +24,7 @@
#include <sfx2/objsh.hxx>
#include <unotools/charclass.hxx>
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
@@ -294,7 +295,7 @@ void ScUnoAddInCollection::Initialize()
bInitialized = true; // with or without functions
}
-static sal_uInt16 lcl_GetCategory( const OUString& rName )
+static sal_uInt16 lcl_GetCategory( std::u16string_view rName )
{
static const char* aFuncNames[SC_FUNCGROUP_COUNT] =
{
@@ -313,7 +314,7 @@ static sal_uInt16 lcl_GetCategory( const OUString& rName )
"Add-In" // ID_FUNCTION_GRP_ADDINS
};
for (sal_uInt16 i=0; i<SC_FUNCGROUP_COUNT; i++)
- if ( rName.equalsAscii( aFuncNames[i] ) )
+ if ( o3tl::equalsAscii( rName, aFuncNames[i] ) )
return i+1; // IDs start at 1
return ID_FUNCTION_GRP_ADDINS; // if not found, use Add-In group
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 151ccefd6134..cd050ef794a4 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -32,6 +32,7 @@
#include <svl/sharedstringpool.hxx>
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <unotools/charclass.hxx>
@@ -3061,13 +3062,13 @@ bool ScCompiler::ParseOpCode( const OUString& rName, bool bInArray )
return bFound;
}
-bool ScCompiler::ParseOpCode2( const OUString& rName )
+bool ScCompiler::ParseOpCode2( std::u16string_view rName )
{
bool bFound = false;
sal_uInt16 i;
for( i = ocInternalBegin; i <= ocInternalEnd && !bFound; i++ )
- bFound = rName.equalsAscii( pInternal[ i-ocInternalBegin ] );
+ bFound = o3tl::equalsAscii( rName, pInternal[ i-ocInternalBegin ] );
if (bFound)
{
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index f42a1448e54e..64525457f894 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -315,7 +315,7 @@ const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( XclChTypeId eType ) const
return mxChData->mxTypeInfoProv->GetTypeInfo( eType );
}
-const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( const OUString& rServiceName ) const
+const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( std::u16string_view rServiceName ) const
{
return mxChData->mxTypeInfoProv->GetTypeInfoFromService( rServiceName );
}
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 3a178c10dc06..d446f77d2353 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <o3tl/string_view.hxx>
#include <sal/macros.h>
#include <sal/mathconf.h>
#include <svl/itemset.hxx>
@@ -528,10 +529,10 @@ const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromRecId( sal_uInt16 nRe
return GetTypeInfo( EXC_CHTYPEID_UNKNOWN );
}
-const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromService( const OUString& rServiceName ) const
+const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromService( std::u16string_view rServiceName ) const
{
for(auto const &rIt : spTypeInfos)
- if( rServiceName.equalsAscii( rIt.mpcServiceName ) )
+ if( o3tl::equalsAscii( rServiceName, rIt.mpcServiceName ) )
return rIt;
OSL_FAIL( "XclChTypeInfoProvider::GetTypeInfoFromService - unknown service name" );
return GetTypeInfo( EXC_CHTYPEID_UNKNOWN );
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index d291266a06b1..ff7dcc90920f 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -97,7 +97,7 @@ public:
/** Returns chart type info for a unique chart type identifier. */
const XclChTypeInfo& GetChartTypeInfo( XclChTypeId eType ) const;
/** Returns the first fitting chart type info for the passed service name. */
- const XclChTypeInfo& GetChartTypeInfo( const OUString& rServiceName ) const;
+ const XclChTypeInfo& GetChartTypeInfo( std::u16string_view rServiceName ) const;
/** Returns an info struct about auto formatting for the passed object type. */
const XclChFormatInfo& GetFormatInfo( XclChObjectType eObjType ) const;
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 15859aac7814..8b015e012949 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -1253,7 +1253,7 @@ public:
/** Returns the first fitting chart type info for an Excel chart type record identifier. */
const XclChTypeInfo& GetTypeInfoFromRecId( sal_uInt16 nRecId ) const;
/** Returns the first fitting chart type info for the passed service name. */
- const XclChTypeInfo& GetTypeInfoFromService( const OUString& rServiceName ) const;
+ const XclChTypeInfo& GetTypeInfoFromService( std::u16string_view rServiceName ) const;
private:
typedef ::std::map< XclChTypeId, const XclChTypeInfo* > XclChTypeInfoMap;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index d67ee8e36f57..77175fa64c64 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -17,6 +17,7 @@
#include <document.hxx>
+#include <o3tl/string_view.hxx>
#include <svl/style.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/frame.hxx>
@@ -605,11 +606,11 @@ const struct
{ COLORSCALE_FORMULA, "formula" },
};
-ScColorScaleEntryType getTypeForId(const OUString& sId)
+ScColorScaleEntryType getTypeForId(std::u16string_view sId)
{
for (auto& r : TypeIdMap)
{
- if (sId.equalsAscii(r.sId))
+ if (o3tl::equalsAscii(sId, r.sId))
return r.eType;
}
assert(false); // The id is not in TypeIdMap - something not in sync?
diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx
index 7d803cb16bd9..e6e5f9fac30a 100644
--- a/sd/inc/EffectMigration.hxx
+++ b/sd/inc/EffectMigration.hxx
@@ -41,7 +41,7 @@ public:
static css::presentation::AnimationSpeed ConvertDuration( double fDuration );
static double ConvertAnimationSpeed( css::presentation::AnimationSpeed eSpeed );
- static bool ConvertPreset( const OUString& rPresetId, const OUString* pPresetSubType, css::presentation::AnimationEffect& rEffect );
+ static bool ConvertPreset( std::u16string_view rPresetId, const OUString* pPresetSubType, css::presentation::AnimationEffect& rEffect );
static bool ConvertAnimationEffect( const css::presentation::AnimationEffect& rEffect, OUString& rPresetId, OUString& rPresetSubType );
static void SetFadeEffect( SdPage* pPage, css::presentation::FadeEffect eNewEffect);
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 326fa74abcec..d0eac5055c39 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/animations/AnimationFill.hpp>
#include <com/sun/star/animations/XAnimate.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <o3tl/string_view.hxx>
#include <tools/debug.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdotext.hxx>
@@ -751,16 +752,16 @@ AnimationEffect EffectMigration::GetTextAnimationEffect( SvxShape* pShape )
return eEffect;
}
-bool EffectMigration::ConvertPreset( const OUString& rPresetId, const OUString* pPresetSubType, AnimationEffect& rEffect )
+bool EffectMigration::ConvertPreset( std::u16string_view rPresetId, const OUString* pPresetSubType, AnimationEffect& rEffect )
{
rEffect = AnimationEffect_NONE;
- if( !rPresetId.isEmpty() )
+ if( !rPresetId.empty() )
{
// first try a match for preset id and subtype
deprecated_AnimationEffect_conversion_table_entry const * p = deprecated_AnimationEffect_conversion_table;
while( p->mpPresetId )
{
- if( rPresetId.equalsAscii( p->mpPresetId ) &&
+ if( o3tl::equalsAscii( rPresetId, p->mpPresetId ) &&
(( p->mpPresetSubType == nullptr ) ||
( pPresetSubType == nullptr) ||
( pPresetSubType->equalsAscii( p->mpPresetSubType )) ) )
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index bbab0ed2d8b9..99fe0b4437c2 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -138,7 +138,7 @@ static void ImplTranslateAttribute( OUString& rString, const TranslateMode eTran
}
}
-sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetClass, const sal_uInt32 nPresetId, const OUString& rPresetSubType )
+sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetClass, const sal_uInt32 nPresetId, std::u16string_view rPresetSubType )
{
sal_uInt32 nPresetSubType = 0;
bool bTranslated = false;
@@ -151,12 +151,12 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
{
case 5 :
{
- if ( rPresetSubType == "downward" )
+ if ( rPresetSubType == u"downward" )
{
nPresetSubType = 5;
bTranslated = true;
}
- else if ( rPresetSubType == "across" )
+ else if ( rPresetSubType == u"across" )
{
nPresetSubType = 10;
bTranslated = true;
@@ -165,7 +165,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
break;
case 17 :
{
- if ( rPresetSubType == "across" )
+ if ( rPresetSubType == u"across" )
{
nPresetSubType = 10;
bTranslated = true;
@@ -174,22 +174,22 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
break;
case 18 :
{
- if ( rPresetSubType == "right-to-top" )
+ if ( rPresetSubType == u"right-to-top" )
{
nPresetSubType = 3;
bTranslated = true;
}
- else if ( rPresetSubType == "right-to-bottom" )
+ else if ( rPresetSubType == u"right-to-bottom" )
{
nPresetSubType = 6;
bTranslated = true;
}
- else if ( rPresetSubType == "left-to-top" )
+ else if ( rPresetSubType == u"left-to-top" )
{
nPresetSubType = 9;
bTranslated = true;
}
- else if ( rPresetSubType == "left-to-bottom" )
+ else if ( rPresetSubType == u"left-to-bottom" )
{
nPresetSubType = 12;
bTranslated = true;
@@ -203,7 +203,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
const oox::ppt::convert_subtype* p = oox::ppt::convert_subtype::getList();
while( p->mpStrSubType )
{
- if ( rPresetSubType.equalsAscii( p->mpStrSubType ) )
+ if ( o3tl::equalsAscii( rPresetSubType, p->mpStrSubType ) )
{
nPresetSubType = p->mnID;
bTranslated = true;
@@ -214,7 +214,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
}
}
if ( !bTranslated )
- nPresetSubType = rPresetSubType.toUInt32();
+ nPresetSubType = o3tl::toUInt32(rPresetSubType);
return nPresetSubType;
}
diff --git a/sd/source/filter/eppt/pptexanimations.hxx b/sd/source/filter/eppt/pptexanimations.hxx
index dd09acd5ad3c..daa54d85b8c5 100644
--- a/sd/source/filter/eppt/pptexanimations.hxx
+++ b/sd/source/filter/eppt/pptexanimations.hxx
@@ -122,7 +122,7 @@ public:
static bool GetNodeType( const css::uno::Reference< css::animations::XAnimationNode >& xNode, sal_Int16& nType );
static sal_Int16 GetFillMode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const sal_Int16 nFillDefault );
static void GetUserData( const css::uno::Sequence< css::beans::NamedValue >& rUserData, const css::uno::Any ** pAny, std::size_t nLen );
- static sal_uInt32 TranslatePresetSubType( const sal_uInt32 nPresetClass, const sal_uInt32 nPresetId, const OUString& rPresetSubType );
+ static sal_uInt32 TranslatePresetSubType( const sal_uInt32 nPresetClass, const sal_uInt32 nPresetId, std::u16string_view rPresetSubType );
static sal_uInt32 GetPresetID( const OUString& rPreset, sal_uInt32 nAPIPresetClass, bool& bPresetId );
static sal_uInt32 GetValueTypeForAttributeName( const OUString& rAttributeName );
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 6b0f64471721..e05cfaf3b5eb 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -32,6 +32,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/propertysethelper.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <o3tl/string_view.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <svx/xtable.hxx>
@@ -289,10 +290,10 @@ struct {
{ "BitmapTableURL", XPropertyListType::Bitmap }
};
-static XPropertyListType getTypeOfName( const OUString &aName )
+static XPropertyListType getTypeOfName( std::u16string_view aName )
{
for(const auto & rURLPropertyName : aURLPropertyNames) {
- if( aName.equalsAscii( rURLPropertyName.pName ) )
+ if( o3tl::equalsAscii( aName, rURLPropertyName.pName ) )
return rURLPropertyName.t;
}
return XPropertyListType::Unknown;
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index b968f9092124..f75643d0ffe8 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -53,10 +53,10 @@ class SmLocalizedSymbolData
public:
SmLocalizedSymbolData() = delete;
- static OUString GetUiSymbolName( const OUString &rExportName );
+ static OUString GetUiSymbolName( std::u16string_view rExportName );
static OUString GetExportSymbolName( std::u16string_view rUiName );
- static OUString GetUiSymbolSetName( const OUString &rExportName );
+ static OUString GetUiSymbolSetName( std::u16string_view rExportName );
static OUString GetExportSymbolSetName( std::u16string_view rUiName );
};
diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx
index 60e341bab71d..06c2f0c0dc1e 100644
--- a/starmath/source/parse5.cxx
+++ b/starmath/source/parse5.cxx
@@ -2621,7 +2621,7 @@ std::unique_ptr<SmSpecialNode> SmParser5::DoSpecial()
{
if (IsImportSymbolNames())
{
- aNewName = SmLocalizedSymbolData::GetUiSymbolName(rName.copy(1));
+ aNewName = SmLocalizedSymbolData::GetUiSymbolName(rName.subView(1));
bReplace = true;
}
else if (IsExportSymbolNames())
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 484c4af4a6dd..783965844b38 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <o3tl/string_view.hxx>
#include <sfx2/objface.hxx>
#include <svl/whiter.hxx>
#include <sfx2/viewsh.hxx>
@@ -43,13 +44,13 @@ OUString SmResId(TranslateId aId)
return Translate::get(aId, SM_MOD()->GetResLocale());
}
-OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName )
+OUString SmLocalizedSymbolData::GetUiSymbolName( std::u16string_view rExportName )
{
OUString aRes;
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOL_NAMES); ++i)
{
- if (rExportName.equalsAscii(RID_UI_SYMBOL_NAMES[i].mpId))
+ if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOL_NAMES[i].mpId))
{
aRes = SmResId(RID_UI_SYMBOL_NAMES[i]);
break;
@@ -76,13 +77,13 @@ OUString SmLocalizedSymbolData::GetExportSymbolName( std::u16string_view rUiName
return aRes;
}
-OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName )
+OUString SmLocalizedSymbolData::GetUiSymbolSetName( std::u16string_view rExportName )
{
OUString aRes;
for (size_t i = 0; i < SAL_N_ELEMENTS(RID_UI_SYMBOLSET_NAMES); ++i)
{
- if (rExportName.equalsAscii(RID_UI_SYMBOLSET_NAMES[i].mpId))
+ if (o3tl::equalsAscii(rExportName, RID_UI_SYMBOLSET_NAMES[i].mpId))
{
aRes = SmResId(RID_UI_SYMBOLSET_NAMES[i]);
break;
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 4dfd8374872c..d28d558f59a1 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -224,7 +224,7 @@ void SmSymbolManager::Load()
}
// now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
- const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName("Greek"));
+ const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName(u"Greek"));
const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) );
OUString aSymbolSetName = "i" + aGreekSymbolSetName;
size_t nSymbols = aGreekSymbols.size();
@@ -252,7 +252,7 @@ void SmSymbolManager::Save()
// prepare to skip symbols from iGreek on saving
OUString aSymbolSetName = "i" +
- SmLocalizedSymbolData::GetUiSymbolSetName("Greek");
+ SmLocalizedSymbolData::GetUiSymbolSetName(u"Greek");
SymbolPtrVec_t aTmp( GetSymbols() );
std::vector< SmSym > aSymbols;
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index 3a0a9cad75ea..30f4cbecbdb9 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -21,6 +21,7 @@
#include <comphelper/propertyvalue.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <sfx2/event.hxx>
#include <svtools/unoevent.hxx>
@@ -284,12 +285,12 @@ Sequence<OUString> SvBaseEventDescriptor::getSupportedServiceNames()
return { sAPI_ServiceName };
}
-SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) const
+SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(std::u16string_view rName) const
{
// iterate over known event names
for(sal_Int16 i = 0; i < mnMacroItems; i++)
{
- if( rName.equalsAscii(mpSupportedMacroItems[i].mpEventName))
+ if( o3tl::equalsAscii(rName, mpSupportedMacroItems[i].mpEventName))
{
return mpSupportedMacroItems[i].mnEvent;
}
@@ -299,7 +300,7 @@ SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) con
return SvMacroItemId::NONE;
}
-SvMacroItemId SvBaseEventDescriptor::getMacroID(const OUString& rName) const
+SvMacroItemId SvBaseEventDescriptor::getMacroID(std::u16string_view rName) const
{
return mapNameToEventID(rName);
}
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;
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index dffe09b4eb60..978b8c698a83 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -34,7 +34,7 @@ struct CommandStruct
sal_uLong nSubCond;
};
-sal_Int16 GetCommandContextIndex( const OUString &rContextName );
+sal_Int16 GetCommandContextIndex( std::u16string_view rContextName );
OUString GetCommandContextByIndex( sal_Int16 nIndex );
class SW_DLLPUBLIC SwCondCollItem final : public SfxPoolItem
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 8d883a8223cb..90f634ab9cbc 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -246,7 +246,7 @@ class SwXServiceProvider
{
public:
static OUString GetProviderName(SwServiceType nObjectType);
- static SwServiceType GetProviderType(const OUString& rServiceName);
+ static SwServiceType GetProviderType(std::u16string_view rServiceName);
static css::uno::Reference< css::uno::XInterface > MakeInstance(SwServiceType nObjectType, SwDoc & rDoc);
static css::uno::Sequence<OUString> GetAllServiceNames();
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index f81feebca3d1..8a6212e22738 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -720,10 +720,10 @@ bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
return false;
}
-static sal_Int32 lcl_Find(const OUString& rFieldName)
+static sal_Int32 lcl_Find(std::u16string_view rFieldName)
{
for(sal_Int32 i = 0; i < AUTH_FIELD_END; ++i)
- if(rFieldName.equalsAscii(aFieldNames[i]))
+ if(o3tl::equalsAscii(rFieldName, aFieldNames[i]))
return i;
return -1;
}
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 044e5acc99cb..9eac5a41949f 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -33,6 +33,7 @@
#include <txtftn.hxx>
#include <com/sun/star/text/XTextTable.hpp>
#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
#include <svtools/unoimap.hxx>
#include <svtools/unoevent.hxx>
#include <svx/SvxXTextColumns.hxx>
@@ -502,11 +503,11 @@ uno::Sequence<OUString> SwXServiceProvider::GetAllServiceNames()
}
-SwServiceType SwXServiceProvider::GetProviderType(const OUString& rServiceName)
+SwServiceType SwXServiceProvider::GetProviderType(std::u16string_view rServiceName)
{
for(const ProvNamesId_Type & i : aProvNamesId)
{
- if (rServiceName.equalsAscii(i.pName))
+ if (o3tl::equalsAscii(rServiceName, i.pName))
return i.nType;
}
return SwServiceType::Invalid;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 2572820be953..23c7128719a1 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -34,6 +34,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/frmdiritem.hxx>
+#include <o3tl/string_view.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <fmtpdsc.hxx>
@@ -1659,7 +1660,7 @@ void SwHTMLParser::NewStyle()
}
m_bIgnoreRawData = sType.getLength() &&
- !sType.getToken(0,';').equalsAscii(sCSS_mimetype);
+ !o3tl::equalsAscii(o3tl::getToken(sType, 0,';'), sCSS_mimetype);
}
void SwHTMLParser::EndStyle()
@@ -1745,7 +1746,7 @@ void SwHTMLParser::InsertLink()
if( !sHRef.isEmpty() && sRel.equalsIgnoreAsciiCase( "STYLESHEET" ) &&
( sType.isEmpty() ||
- sType.getToken(0,';').equalsAscii(sCSS_mimetype) ) )
+ o3tl::equalsAscii(o3tl::getToken(sType, 0,';'), sCSS_mimetype) ) )
{
if( GetMedium() )
{
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 8334dea7a785..86343d2e6651 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -132,17 +132,17 @@ std::optional<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
using namespace ::com::sun::star::i18n::ScriptType;
- Any aLang = aLinguCfg.GetProperty("DefaultLocale");
+ Any aLang = aLinguCfg.GetProperty(u"DefaultLocale");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), LATIN);
aRet.Put(SvxLanguageItem(nLang, SID_ATTR_LANGUAGE));
- aLang = aLinguCfg.GetProperty("DefaultLocale_CJK");
+ aLang = aLinguCfg.GetProperty(u"DefaultLocale_CJK");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), ASIAN);
aRet.Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CJK_LANGUAGE));
- aLang = aLinguCfg.GetProperty("DefaultLocale_CTL");
+ aLang = aLinguCfg.GetProperty(u"DefaultLocale_CTL");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), COMPLEX);
aRet.Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CTL_LANGUAGE));
diff --git a/sw/source/uibase/chrdlg/ccoll.cxx b/sw/source/uibase/chrdlg/ccoll.cxx
index 6285ac52789a..547566c427a0 100644
--- a/sw/source/uibase/chrdlg/ccoll.cxx
+++ b/sw/source/uibase/chrdlg/ccoll.cxx
@@ -21,6 +21,7 @@
#include <ccoll.hxx>
#include <fmtcol.hxx>
+#include <o3tl/string_view.hxx>
//!! order of entries has to be the same as in
//!! CommandStruct SwCondCollItem::aCmds[]
@@ -59,12 +60,12 @@ const char * const aCommandContext[COND_COMMAND_COUNT] =
"NumberingLevel10"
};
-sal_Int16 GetCommandContextIndex( const OUString &rContextName )
+sal_Int16 GetCommandContextIndex( std::u16string_view rContextName )
{
sal_Int16 nRes = -1;
for (sal_Int16 i = 0; nRes == -1 && i < COND_COMMAND_COUNT; ++i)
{
- if (rContextName.equalsAscii( aCommandContext[i] ))
+ if (o3tl::equalsAscii( rContextName, aCommandContext[i] ))
nRes = i;
}
return nRes;
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 2a5ac183ef66..78bcdc6f0d3a 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -24,6 +24,7 @@
#include <string_view>
#include <o3tl/any.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <osl/diagnose.hxx>
#include <sal/types.h>
@@ -1313,7 +1314,7 @@ SAL_DLLPUBLIC_EXPORT void * component_getFactory(
{
void * pRet = nullptr;
- if (pServiceManager && OUString(IMPLNAME).equalsAscii(pImplName))
+ if (pServiceManager && o3tl::equalsAscii(IMPLNAME, pImplName))
{
Reference< XInterface > xFactory(
createSingleComponentFactory(
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index 7529144beb55..5bb4a3084ad8 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -20,6 +20,7 @@
#include <utility>
#include <cppu/unotype.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <osl/diagnose.hxx>
#include <osl/thread.hxx>
@@ -1197,7 +1198,7 @@ SAL_DLLPUBLIC_EXPORT void * component_getFactory(
{
void * pRet = nullptr;
- if (pServiceManager && OUString(IMPLNAME).equalsAscii(pImplName))
+ if (pServiceManager && o3tl::equalsAscii(IMPLNAME, pImplName))
{
Reference< XSingleServiceFactory > xFactory( createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index f37fffb5734a..882a3ead73e1 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -37,6 +37,7 @@
#include <sal/macros.h>
#include <comphelper/getexpandeduri.hxx>
#include <comphelper/processfactory.hxx>
+#include <o3tl/string_view.hxx>
#include "itemholder1.hxx"
@@ -149,7 +150,7 @@ class SvtLinguConfigItem : public utl::ConfigItem
{
SvtLinguOptions aOpt;
- static bool GetHdlByName( sal_Int32 &rnHdl, const OUString &rPropertyName, bool bFullPropName = false );
+ static bool GetHdlByName( sal_Int32 &rnHdl, std::u16string_view rPropertyName, bool bFullPropName = false );
static uno::Sequence< OUString > GetPropertyNames();
void LoadOptions( const uno::Sequence< OUString > &rProperyNames );
bool SaveOptions( const uno::Sequence< OUString > &rProperyNames );
@@ -173,18 +174,18 @@ public:
//using utl::ConfigItem::GetReadOnlyStates;
css::uno::Any
- GetProperty( const OUString &rPropertyName ) const;
+ GetProperty( std::u16string_view rPropertyName ) const;
css::uno::Any
GetProperty( sal_Int32 nPropertyHandle ) const;
- bool SetProperty( const OUString &rPropertyName,
+ bool SetProperty( std::u16string_view rPropertyName,
const css::uno::Any &rValue );
bool SetProperty( sal_Int32 nPropertyHandle,
const css::uno::Any &rValue );
const SvtLinguOptions& GetOptions() const;
- bool IsReadOnly( const OUString &rPropertyName ) const;
+ bool IsReadOnly( std::u16string_view rPropertyName ) const;
bool IsReadOnly( sal_Int32 nPropertyHandle ) const;
};
@@ -286,7 +287,7 @@ uno::Sequence< OUString > SvtLinguConfigItem::GetPropertyNames()
bool SvtLinguConfigItem::GetHdlByName(
sal_Int32 &rnHdl,
- const OUString &rPropertyName,
+ std::u16string_view rPropertyName,
bool bFullPropName )
{
NamesToHdl const *pEntry = &aNamesToHdl[0];
@@ -295,7 +296,7 @@ bool SvtLinguConfigItem::GetHdlByName(
{
while (pEntry && pEntry->pFullPropName != nullptr)
{
- if (rPropertyName.equalsAscii( pEntry->pFullPropName ))
+ if (o3tl::equalsAscii(rPropertyName, pEntry->pFullPropName ))
{
rnHdl = pEntry->nHdl;
break;
@@ -319,7 +320,7 @@ bool SvtLinguConfigItem::GetHdlByName(
}
}
-uno::Any SvtLinguConfigItem::GetProperty( const OUString &rPropertyName ) const
+uno::Any SvtLinguConfigItem::GetProperty( std::u16string_view rPropertyName ) const
{
osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
@@ -409,7 +410,7 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const
return aRes;
}
-bool SvtLinguConfigItem::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
+bool SvtLinguConfigItem::SetProperty( std::u16string_view rPropertyName, const uno::Any &rValue )
{
osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
@@ -746,7 +747,7 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN
return bRet;
}
-bool SvtLinguConfigItem::IsReadOnly( const OUString &rPropertyName ) const
+bool SvtLinguConfigItem::IsReadOnly( std::u16string_view rPropertyName ) const
{
osl::MutexGuard aGuard(theSvtLinguConfigItemMutex());
@@ -856,7 +857,7 @@ bool SvtLinguConfig::ReplaceSetProperties(
return GetConfigItem().ReplaceSetProperties( rNode, rValues );
}
-uno::Any SvtLinguConfig::GetProperty( const OUString &rPropertyName ) const
+uno::Any SvtLinguConfig::GetProperty( std::u16string_view rPropertyName ) const
{
return GetConfigItem().GetProperty( rPropertyName );
}
@@ -866,7 +867,7 @@ uno::Any SvtLinguConfig::GetProperty( sal_Int32 nPropertyHandle ) const
return GetConfigItem().GetProperty( nPropertyHandle );
}
-bool SvtLinguConfig::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
+bool SvtLinguConfig::SetProperty( std::u16string_view rPropertyName, const uno::Any &rValue )
{
return GetConfigItem().SetProperty( rPropertyName, rValue );
}
@@ -881,7 +882,7 @@ void SvtLinguConfig::GetOptions( SvtLinguOptions &rOptions ) const
rOptions = GetConfigItem().GetOptions();
}
-bool SvtLinguConfig::IsReadOnly( const OUString &rPropertyName ) const
+bool SvtLinguConfig::IsReadOnly( std::u16string_view rPropertyName ) const
{
return GetConfigItem().IsReadOnly( rPropertyName );
}
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index ca949068655d..4dd37c321533 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -412,7 +412,7 @@ public:
namespace vcl_sal {
// get foreign key names
OUString getKeysymReplacementName(
- const OUString& pLang,
+ std::u16string_view pLang,
KeySym nSymbol );
inline SalDisplay *getSalDisplay(GenericUnixSalData const * data)
diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx
index 387792d95984..16ffaa4b91c6 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <o3tl/string_view.hxx>
#include <unx/saldisp.hxx>
#include <X11/keysym.h>
#include <sal/macros.h>
@@ -478,11 +479,11 @@ namespace vcl_sal {
};
// translate keycodes, used within the displayed menu shortcuts
- OUString getKeysymReplacementName( const OUString& pLang, KeySym nSymbol )
+ OUString getKeysymReplacementName( std::u16string_view pLang, KeySym nSymbol )
{
for(const auto & rKeyboard : aKeyboards)
{
- if( pLang.equalsAscii( rKeyboard.pLangName ) )
+ if( o3tl::equalsAscii( pLang, rKeyboard.pLangName ) )
{
const struct KeysymNameReplacement* pRepl = rKeyboard.pReplacements;
for( int m = rKeyboard.nReplacements ; m ; )
diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx
index 25be98cbb0bb..7ff731245da2 100644
--- a/xmloff/inc/XMLNumberStylesImport.hxx
+++ b/xmloff/inc/XMLNumberStylesImport.hxx
@@ -40,7 +40,7 @@ class SdXMLNumberFormatImportContext final : public SvXMLNumFormatContext
bool compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const;
- void add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText );
+ void add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, std::u16string_view rText );
public:
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index baf9f1fbf924..48bf04c82419 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -24,6 +24,7 @@
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmltoken.hxx>
+#include <o3tl/string_view.hxx>
#include <sal/log.hxx>
#include "sdxmlexp_impl.hxx"
@@ -600,7 +601,7 @@ SdXMLNumberFormatImportContext::~SdXMLNumberFormatImportContext()
{
}
-void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText )
+void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, std::u16string_view rText )
{
if (mnIndex == 16)
return;
@@ -612,8 +613,8 @@ void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
- ( ( (pStyleMember->mpText == nullptr) && (rText.isEmpty()) ) ||
- ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) )
+ ( ( (pStyleMember->mpText == nullptr) && (rText.empty()) ) ||
+ ( pStyleMember->mpText && (o3tl::equalsAscii( rText, pStyleMember->mpText ) ) ) ) )
{
mnElements[mnIndex++] = static_cast<DataStyleNumber>(nIndex + 1);
return;