summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-03 11:51:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-04 10:01:33 +0200
commitbf6b64d5963002d52c3ed2093b064896a4316d0e (patch)
treef38cc694ab887f63e4cf41eaaf4f57d61cba31fd /include/unotools
parent8342e4a5c7bd436f869e6c1c23d248556087ebdf (diff)
use more string_view in unotools
Change-Id: Id10d68f2eb016671be6842dfaa82909207b0708d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/charclass.hxx4
-rw-r--r--include/unotools/configpaths.hxx4
-rw-r--r--include/unotools/fontdefs.hxx6
-rw-r--r--include/unotools/localedatawrapper.hxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 4405d810875b..ab695beb52cb 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -81,10 +81,10 @@ public:
const LanguageTag& getLanguageTag() const;
/// isdigit() on ascii values of entire string
- static bool isAsciiNumeric( const OUString& rStr );
+ static bool isAsciiNumeric( std::u16string_view rStr );
/// isalpha() on ascii values of entire string
- static bool isAsciiAlpha( const OUString& rStr );
+ static bool isAsciiAlpha( std::u16string_view rStr );
/// whether type is pure numeric or not, e.g. return of getStringType
static bool isNumericType( sal_Int32 nType )
diff --git a/include/unotools/configpaths.hxx b/include/unotools/configpaths.hxx
index 15bc7118efa4..119733a477dc 100644
--- a/include/unotools/configpaths.hxx
+++ b/include/unotools/configpaths.hxx
@@ -134,7 +134,7 @@ namespace utl
"*['<Name>']", where <Name> is properly escaped.
*/
- UNOTOOLS_DLLPUBLIC OUString wrapConfigurationElementName(OUString const& _sElementName);
+ UNOTOOLS_DLLPUBLIC OUString wrapConfigurationElementName(std::u16string_view _sElementName);
/** Create a one-level relative configuration path from a set element name
and a known set element type.
@@ -152,7 +152,7 @@ namespace utl
"<Type>['<Name>']", where <Name> is properly escaped.
*/
- OUString wrapConfigurationElementName(OUString const& _sElementName,
+ OUString wrapConfigurationElementName(std::u16string_view _sElementName,
OUString const& _sTypeName);
} // namespace utl
diff --git a/include/unotools/fontdefs.hxx b/include/unotools/fontdefs.hxx
index 7f145eba309e..aff10c860122 100644
--- a/include/unotools/fontdefs.hxx
+++ b/include/unotools/fontdefs.hxx
@@ -40,7 +40,7 @@ namespace o3tl
template<> struct typed_flags<SubsFontFlags> : is_typed_flags<SubsFontFlags, 0x03> {};
}
-UNOTOOLS_DLLPUBLIC OUString GetSubsFontName( const OUString& rName, SubsFontFlags nFlags );
+UNOTOOLS_DLLPUBLIC OUString GetSubsFontName( std::u16string_view rName, SubsFontFlags nFlags );
UNLESS_MERGELIBS(UNOTOOLS_DLLPUBLIC) void AddTokenFontName( OUString& rName, std::u16string_view rNewToken );
@@ -84,7 +84,7 @@ enum class DefaultFontType
CTL_DISPLAY = 4004,
};
-UNOTOOLS_DLLPUBLIC std::u16string_view GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex );
+UNOTOOLS_DLLPUBLIC std::u16string_view GetNextFontToken( std::u16string_view rTokenStr, sal_Int32& rIndex );
UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName( std::u16string_view rName );
/** Strip any "script font suffix" from the font name
@@ -104,7 +104,7 @@ UNOTOOLS_DLLPUBLIC OUString StripScriptFromName(const OUString& rName);
@return true if this is Star|Open Symbol
*/
// FIXME It's quite possible that code using this should instead check for RTL_TEXTENCODING_SYMBOL.
-UNOTOOLS_DLLPUBLIC bool IsStarSymbol(const OUString &rFontName);
+UNOTOOLS_DLLPUBLIC bool IsStarSymbol(std::u16string_view rFontName);
#endif // INCLUDED_UNOTOOLS_FONTDEFS_HXX
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 6c2502c2a786..2c408b4a0cf9 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -101,7 +101,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
void loadCurrencyFormats();
- void scanCurrFormatImpl( const OUString& rCode,
+ void scanCurrFormatImpl( std::u16string_view rCode,
sal_Int32 nStart, sal_Int32& nSign,
sal_Int32& nPar, sal_Int32& nNum,
sal_Int32& nBlank, sal_Int32& nSym ) const;