diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-18 10:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 09:45:04 +0100 |
commit | bb06f51308428500c9c8d11ae05f0aa03ecc179c (patch) | |
tree | b18620e8572ed6d4c43c8605660d59f5f7a7e531 /include/svx | |
parent | 42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff) |
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/ClassificationCommon.hxx | 2 | ||||
-rw-r--r-- | include/svx/ColorSets.hxx | 2 | ||||
-rw-r--r-- | include/svx/ctredlin.hxx | 4 | ||||
-rw-r--r-- | include/svx/gallery.hxx | 14 | ||||
-rw-r--r-- | include/svx/gallery1.hxx | 8 | ||||
-rw-r--r-- | include/svx/gallerybinaryengineentry.hxx | 2 | ||||
-rw-r--r-- | include/svx/numfmtsh.hxx | 8 | ||||
-rw-r--r-- | include/svx/xtable.hxx | 2 |
8 files changed, 21 insertions, 21 deletions
diff --git a/include/svx/ClassificationCommon.hxx b/include/svx/ClassificationCommon.hxx index dbdb578c0755..71be4b85c91b 100644 --- a/include/svx/ClassificationCommon.hxx +++ b/include/svx/ClassificationCommon.hxx @@ -39,7 +39,7 @@ getProperty(css::uno::Reference<css::beans::XPropertyContainer> const& rxPropert OUString const& rName); SVX_DLLPUBLIC bool containsProperty(css::uno::Sequence<css::beans::Property> const& rProperties, - OUString const& rName); + std::u16string_view rName); SVX_DLLPUBLIC void removeAllProperties(css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer); diff --git a/include/svx/ColorSets.hxx b/include/svx/ColorSets.hxx index 88e401aa332c..3b347ede0690 100644 --- a/include/svx/ColorSets.hxx +++ b/include/svx/ColorSets.hxx @@ -61,7 +61,7 @@ public: return maColorSets[nIndex]; } - const ColorSet& getColorSet(const OUString& rName); + const ColorSet& getColorSet(std::u16string_view rName); }; } // end of namespace svx diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index 4dd80bafd709..cffb5be2fbee 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -127,8 +127,8 @@ public: void SetCalcView(); void SetWriterView(); - bool IsValidEntry(const OUString &rAuthor, const DateTime &rDateTime, const OUString &rComment); - bool IsValidEntry(const OUString &rAuthor, const DateTime &rDateTime); + bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime, const OUString &rComment); + bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime); bool IsValidComment(const OUString &rComment); DECL_LINK(HeaderBarClick, int, void); diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx index 28d99de9fa59..c4a51f4191db 100644 --- a/include/svx/gallery.hxx +++ b/include/svx/gallery.hxx @@ -103,32 +103,32 @@ public: static bool FillThemeList( std::vector<OUString>& rThemeList ); // FillObjList is filling rObjList with Strings of the internal Gallery Object URL - static bool FillObjList( const OUString& rThemeName, std::vector<OUString> &rObjList ); + static bool FillObjList( std::u16string_view rThemeName, std::vector<OUString> &rObjList ); static bool FillObjList( const sal_uInt32 nThemeId, std::vector<OUString> &rObjList ); // FillObjTitleList is filling the rList with the title for each gallery object static bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ); - static bool InsertURL( const OUString& rThemeName, const OUString& rURL ); + static bool InsertURL( std::u16string_view rThemeName, const OUString& rURL ); static bool InsertURL( sal_uInt32 nThemeId, const OUString& rURL ); - static bool GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos, + static bool GetGraphicObj( std::u16string_view rThemeName, sal_uInt32 nPos, Graphic* pGraphic ); static bool GetGraphicObj( sal_uInt32 nThemeId, sal_uInt32 nPos, Graphic* pGraphic ); - static sal_uInt32 GetSdrObjCount( const OUString& rThemeName ); + static sal_uInt32 GetSdrObjCount( std::u16string_view rThemeName ); static sal_uInt32 GetSdrObjCount( sal_uInt32 nThemeId ); - static bool GetSdrObj( const OUString& rThemeName, sal_uInt32 nSdrModelPos, + static bool GetSdrObj( std::u16string_view rThemeName, sal_uInt32 nSdrModelPos, SdrModel* pModel, BitmapEx* pThumb = nullptr ); static bool GetSdrObj( sal_uInt32 nThemeId, sal_uInt32 nSdrModelPos, SdrModel* pModel, BitmapEx* pThumb = nullptr ); - static bool BeginLocking( const OUString& rThemeName ); + static bool BeginLocking( std::u16string_view rThemeName ); static bool BeginLocking( sal_uInt32 nThemeId ); - static bool EndLocking( const OUString& rThemeName ); + static bool EndLocking( std::u16string_view rThemeName ); static bool EndLocking( sal_uInt32 nThemeId ); }; diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 69ec2728a6df..8de817484bd2 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -105,7 +105,7 @@ private: SAL_DLLPRIVATE void ImplLoad( const OUString& rMultiPath ); SAL_DLLPRIVATE void ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbIsReadOnly ); - GalleryThemeEntry* ImplGetThemeEntry( const OUString& rThemeName ); + GalleryThemeEntry* ImplGetThemeEntry( std::u16string_view rThemeName ); SAL_DLLPRIVATE GalleryTheme* ImplGetCachedTheme( GalleryThemeEntry* pThemeEntry ); SAL_DLLPRIVATE void ImplDeleteCachedTheme( GalleryTheme const * pTheme ); @@ -123,16 +123,16 @@ public: size_t GetThemeCount() const { return aThemeList.size(); } SAL_DLLPRIVATE const GalleryThemeEntry* GetThemeInfo( size_t nPos ) { return nPos < aThemeList.size() ? aThemeList[ nPos ].get() : nullptr; } - const GalleryThemeEntry* GetThemeInfo( const OUString& rThemeName ) { return ImplGetThemeEntry( rThemeName ); } + const GalleryThemeEntry* GetThemeInfo( std::u16string_view rThemeName ) { return ImplGetThemeEntry( rThemeName ); } - bool HasTheme( const OUString& rThemeName ); + bool HasTheme( std::u16string_view rThemeName ); SAL_DLLPRIVATE OUString GetThemeName( sal_uInt32 nThemeId ) const; bool CreateTheme( const OUString& rThemeName ); void RenameTheme( const OUString& rOldName, const OUString& rNewName ); bool RemoveTheme( const OUString& rThemeName ); - GalleryTheme* AcquireTheme( const OUString& rThemeName, SfxListener& rListener ); + GalleryTheme* AcquireTheme( std::u16string_view rThemeName, SfxListener& rListener ); void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ); public: diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx index b1130127765c..7637e3d8caae 100644 --- a/include/svx/gallerybinaryengineentry.hxx +++ b/include/svx/gallerybinaryengineentry.hxx @@ -40,7 +40,7 @@ public: GalleryBinaryEngineEntry(); static void CreateUniqueURL(const INetURLObject& rBaseURL, INetURLObject& aURL); - OUString ReadStrFromIni(const OUString& aKeyName); + OUString ReadStrFromIni(std::u16string_view aKeyName); const INetURLObject& GetThmURL() const { return mpGalleryStorageLocations->GetThmURL(); } const INetURLObject& GetSdgURL() const { return mpGalleryStorageLocations->GetSdgURL(); } diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx index 9e5a0a8a18ee..1beaaf35e9b3 100644 --- a/include/svx/numfmtsh.hxx +++ b/include/svx/numfmtsh.hxx @@ -108,7 +108,7 @@ public: short& rFmtSelPos, std::vector<OUString>& rFmtEntries ); - void RemoveFormat( const OUString& rFormat, + void RemoveFormat( std::u16string_view rFormat, sal_uInt16& rCatLbSelPos, short& rFmtSelPos, std::vector<OUString>& rFmtEntries ); @@ -127,7 +127,7 @@ public: sal_uInt16& rLeadingZeroes, sal_uInt16& rCatLbPos ); - sal_uInt16 GetFormatIntegerDigits( const OUString& rFormat ) const; + sal_uInt16 GetFormatIntegerDigits( std::u16string_view rFormat ) const; void MakePreviewString( const OUString& rFormatStr, OUString& rPreviewStr, @@ -164,13 +164,13 @@ public: sal_uInt16 FindCurrencyFormat( const OUString& rFmtString ); sal_uInt16 FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,bool bTmpBanking); void SetCurCurrencyEntry(NfCurrencyEntry*); - short GetListPos4Entry( sal_uInt32 nIdx, const OUString& rFmtString ); + short GetListPos4Entry( sal_uInt32 nIdx, std::u16string_view rFmtString ); void GetCurrencySymbols(std::vector<OUString>& rList, sal_uInt16* pPos ); sal_uInt16 FindCurrencyTableEntry( const OUString& rFmtString, bool &bTestBanking ); bool IsInTable(sal_uInt16 nPos, bool bTmpBanking, - OUString const& rFmtString); + std::u16string_view rFmtString); void SetUseStarFormat( bool bUse ) { bUseStarFormat = bUse; } private: diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index 2c48fc7b1006..a4e192a0704a 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -180,7 +180,7 @@ public: void Remove(tools::Long nIndex); XPropertyEntry* Get(tools::Long nIndex) const; - tools::Long GetIndex(const OUString& rName) const; + tools::Long GetIndex(std::u16string_view rName) const; BitmapEx GetUiBitmap(tools::Long nIndex) const; const OUString& GetName() const { return maName; } |