summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-13 14:29:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-17 09:57:35 +0100
commit8ef6067596cf4b2c52fbce94b44bf7af9fefa643 (patch)
treef4cca1a99ba97683b14fa6fe0f1f45f75bf855c2 /include
parent75bada928cf08d2afc6efe52ba99b45088bc9eec (diff)
loplugin:stringviewparam check methods too
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/basic/basmgr.hxx8
-rw-r--r--include/basic/codecompletecache.hxx4
-rw-r--r--include/basic/sbstar.hxx2
-rw-r--r--include/i18nutil/scripttypedetector.hxx4
-rw-r--r--include/oox/core/contexthandler.hxx2
-rw-r--r--include/oox/core/relations.hxx8
-rw-r--r--include/sfx2/frmdescr.hxx2
-rw-r--r--include/sfx2/sfxhelp.hxx2
-rw-r--r--include/sfx2/templatelocalview.hxx2
-rw-r--r--include/svx/ActionDescriptionProvider.hxx2
-rw-r--r--include/svx/svdograf.hxx2
-rw-r--r--include/test/sheet/xspreadsheets2.hxx2
-rw-r--r--include/unotools/localedatawrapper.hxx2
-rw-r--r--include/unotools/textsearch.hxx2
-rw-r--r--include/vbahelper/vbahelper.hxx6
-rw-r--r--include/vcl/GraphicNativeTransform.hxx2
-rw-r--r--include/vcl/GraphicObject.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx38
-rw-r--r--include/xmloff/formlayerimport.hxx4
19 files changed, 47 insertions, 49 deletions
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 64e4ac597df7..b439baed85fa 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -147,8 +147,8 @@ public:
sal_uInt16 GetLibCount() const;
StarBASIC* GetLib( sal_uInt16 nLib ) const;
- StarBASIC* GetLib( const OUString& rName ) const;
- sal_uInt16 GetLibId( const OUString& rName ) const;
+ StarBASIC* GetLib( std::u16string_view rName ) const;
+ sal_uInt16 GetLibId( std::u16string_view rName ) const;
OUString GetLibName( sal_uInt16 nLib );
@@ -188,7 +188,7 @@ public:
takes the names of modules whose size exceeds the legacy limit
*/
bool LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out_rModuleNames );
- bool HasExeCode( const OUString& );
+ bool HasExeCode( std::u16string_view );
/// determines whether the Basic Manager has a given macro, given by fully qualified name
bool HasMacro( OUString const& i_fullyQualifiedName ) const;
/// executes a given macro
@@ -202,7 +202,7 @@ private:
BASIC_DLLPRIVATE StarBASIC* GetStdLib() const;
BASIC_DLLPRIVATE StarBASIC* AddLib( SotStorage& rStorage, const OUString& rLibName, bool bReference );
BASIC_DLLPRIVATE void RemoveLib( sal_uInt16 nLib );
- BASIC_DLLPRIVATE bool HasLib( const OUString& rName ) const;
+ BASIC_DLLPRIVATE bool HasLib( std::u16string_view rName ) const;
BASIC_DLLPRIVATE StarBASIC* CreateLibForLibContainer( const OUString& rLibName,
const css::uno::Reference< css::script::XLibraryContainer >& xScriptCont );
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx
index 37ab4a499a16..2c6c0873fcb0 100644
--- a/include/basic/codecompletecache.hxx
+++ b/include/basic/codecompletecache.hxx
@@ -83,8 +83,8 @@ public:
void InsertGlobalVar( const OUString& sVarName, const OUString& sVarType );
void InsertLocalVar( const OUString& sProcName, const OUString& sVarName, const OUString& sVarType );
- OUString GetVarType( const OUString& sVarName ) const;
- OUString GetCorrectCaseVarName( const OUString& sVarName, const OUString& sActProcName ) const;
+ OUString GetVarType( std::u16string_view sVarName ) const;
+ OUString GetCorrectCaseVarName( std::u16string_view sVarName, std::u16string_view sActProcName ) const;
void Clear();
};
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 7ff6a138123e..bdcf167edd49 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -107,7 +107,7 @@ public:
SbModules& GetModules() { return pModules; }
SbxObject* GetRtl() { return pRtl.get(); }
- SbModule* FindModule( const OUString& );
+ SbModule* FindModule( std::u16string_view );
// Run init code of all modules (including the inserted Doc-Basics)
void InitAllModules( StarBASIC const * pBasicNotToInit = nullptr );
void DeInitAllModules();
diff --git a/include/i18nutil/scripttypedetector.hxx b/include/i18nutil/scripttypedetector.hxx
index 8be9866abeec..fd098f9e7f32 100644
--- a/include/i18nutil/scripttypedetector.hxx
+++ b/include/i18nutil/scripttypedetector.hxx
@@ -27,10 +27,10 @@ class I18NUTIL_DLLPUBLIC ScriptTypeDetector
public:
static sal_Int32 beginOfScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 scriptDirection );
static sal_Int32 endOfScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 scriptDirection );
- static sal_Int16 getScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection );
+ static sal_Int16 getScriptDirection( std::u16string_view Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection );
static sal_Int32 beginOfCTLScriptType( const OUString& Text, sal_Int32 nPos );
static sal_Int32 endOfCTLScriptType( const OUString& Text, sal_Int32 nPos );
- static sal_Int16 getCTLScriptType( const OUString& Text, sal_Int32 nPos );
+ static sal_Int16 getCTLScriptType(std::u16string_view Text, sal_Int32 nPos );
};
#endif
diff --git a/include/oox/core/contexthandler.hxx b/include/oox/core/contexthandler.hxx
index 5d72e2192cc2..0d06e548ee32 100644
--- a/include/oox/core/contexthandler.hxx
+++ b/include/oox/core/contexthandler.hxx
@@ -71,7 +71,7 @@ public:
/** Returns the full fragment path for the passed relation identifier. */
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
- OUString getFragmentPathFromFirstType( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
// com.sun.star.xml.sax.XFastContextHandler interface ---------------------
diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx
index f36ceaba6d0b..23d6a9320243 100644
--- a/include/oox/core/relations.hxx
+++ b/include/oox/core/relations.hxx
@@ -33,7 +33,7 @@ namespace oox::core {
/** Expands to an OUString containing an 'officeDocument' transitional relation type created
from the passed literal(!) ASCII(!) character array. */
#define CREATE_OFFICEDOC_RELATION_TYPE( ascii ) \
- ( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" ascii )
+ ( u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/" ascii )
/** Expands to an OUString containing an 'officeDocument' strict relation type created
from the passed literal(!) ASCII(!) character array. */
@@ -43,7 +43,7 @@ namespace oox::core {
/** Expands to an OUString containing an MS Office specific relation type
created from the passed literal(!) ASCII(!) character array. */
#define CREATE_MSOFFICE_RELATION_TYPE( ascii ) \
- ( "http://schemas.microsoft.com/office/2006/relationships/" ascii )
+ ( u"http://schemas.microsoft.com/office/2006/relationships/" ascii )
#define CREATE_XL_CONTENT_TYPE( ascii ) \
( "application/vnd.openxmlformats-officedocument.spreadsheetml." ascii "+xml" )
@@ -89,7 +89,7 @@ public:
/** Returns the relation with the passed relation identifier. */
const Relation* getRelationFromRelId( const OUString& rId ) const;
/** Returns the first relation with the passed type. */
- const Relation* getRelationFromFirstType( const OUString& rType ) const;
+ const Relation* getRelationFromFirstType( std::u16string_view rType ) const;
/** Finds all relations associated with the passed type. */
RelationsRef getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const;
@@ -103,7 +103,7 @@ public:
/** Returns the full fragment path for the passed relation identifier. */
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
- OUString getFragmentPathFromFirstType( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
private:
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index 196a2ccc9356..50df431b4c24 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -66,7 +66,7 @@ public:
const INetURLObject& GetURL() const
{ return aURL; }
void SetURL( const OUString& rURL );
- void SetActualURL( const OUString& rURL );
+ void SetActualURL( std::u16string_view rURL );
// FrameName
const OUString& GetName() const
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 06cd21c6eec3..7f4d687b102d 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -51,7 +51,7 @@ public:
// Check for built-in help
static bool IsHelpInstalled();
- static OUString GetURLHelpText(const OUString&);
+ static OUString GetURLHelpText(std::u16string_view);
};
#endif // INCLUDED_SFX2_SFXHELP_HXX
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index e87d37e9aef5..1ed2ee1a4e61 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -148,7 +148,7 @@ public:
void updateThumbnailDimensions(tools::Long itemMaxSize);
- void RemoveDefaultTemplateIcon( const OUString& rPath);
+ void RemoveDefaultTemplateIcon( std::u16string_view rPath);
static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
diff --git a/include/svx/ActionDescriptionProvider.hxx b/include/svx/ActionDescriptionProvider.hxx
index 204c4f6e9e0d..4aa889eb1f38 100644
--- a/include/svx/ActionDescriptionProvider.hxx
+++ b/include/svx/ActionDescriptionProvider.hxx
@@ -47,7 +47,7 @@ public:
public:
static OUString createDescription( ActionType eActionType
- , const OUString& rObjectName );
+ , std::u16string_view rObjectName );
};
#endif
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 21ab9b3a2fb5..5fd2b3ff1946 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -163,7 +163,7 @@ private:
void ForceSwapIn() const;
public:
- void SetGraphicLink(const OUString& rFileName, const OUString& rReferer, const OUString& rFilterName);
+ void SetGraphicLink(const OUString& rFileName, std::u16string_view rReferer, std::u16string_view rFilterName);
void ReleaseGraphicLink();
bool IsLinkedGraphic() const;
diff --git a/include/test/sheet/xspreadsheets2.hxx b/include/test/sheet/xspreadsheets2.hxx
index 6c2cd0952b28..e96367d9472f 100644
--- a/include/test/sheet/xspreadsheets2.hxx
+++ b/include/test/sheet/xspreadsheets2.hxx
@@ -50,7 +50,7 @@ private:
css::uno::Reference< css::sheet::XSpreadsheetDocument> getDoc(const OUString&);
static css::uno::Reference< css::sheet::XNamedRanges> getNamedRanges(css::uno::Reference< css::sheet::XSpreadsheetDocument > const &);
void importSheetToCopy();
- static bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent );
+ static bool isExternalReference(const OUString& aDestContent, std::u16string_view aSrcContent );
css::uno::Reference< css::sheet::XSpreadsheetDocument> xDestDoc;
css::uno::Reference< css::sheet::XSpreadsheet > xDestSheet;
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 7f393d9343f3..b4e93749142d 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -194,7 +194,7 @@ public:
/** If the secondary calendar, if any, is of the name passed AND number
formats using it usually use the E or EE keyword (EC|EEC). */
- bool doesSecondaryCalendarUseEC( const OUString& rName ) const;
+ bool doesSecondaryCalendarUseEC( std::u16string_view rName ) const;
/** Obtain digit grouping. The usually known grouping by thousands (#,###)
is actually only one of possible groupings. Another one, for example,
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index 45db38b2981f..849f4c8c91f5 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -208,7 +208,7 @@ public:
const css::lang::Locale& rLocale );
/* replace back references in the replace string by the sub expressions from the search result */
- void ReplaceBackReferences( OUString& rReplaceStr, const OUString &rStr, const css::util::SearchResult& rResult ) const;
+ void ReplaceBackReferences( OUString& rReplaceStr, std::u16string_view rStr, const css::util::SearchResult& rResult ) const;
/** Upgrade SearchOptions to SearchOptions2 for places that don't handle
SearchOptions2 yet. Better fix your module if you want to support
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 7333dd375e1e..60d8f0b85de4 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -69,7 +69,7 @@ namespace ooo::vba
/** Returns the VBA document implementation object representing the passed UNO document model. */
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel );
- VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell const * pShell );
+ VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( std::u16string_view aModName, SfxObjectShell const * pShell );
/// @throws css::uno::RuntimeException
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel );
@@ -259,10 +259,10 @@ class VBAHELPER_DLLPUBLIC DebugHelper
{
public:
/// @throws css::script::BasicErrorException
- static void basicexception( const css::uno::Exception& ex, ErrCode err, const OUString& /*additionalArgument*/ );
+ static void basicexception( const css::uno::Exception& ex, ErrCode err, std::u16string_view /*additionalArgument*/ );
/// @throws css::script::BasicErrorException
- static void basicexception( ErrCode err, const OUString& additionalArgument );
+ static void basicexception( ErrCode err, std::u16string_view additionalArgument );
/// @throws css::script::BasicErrorException
static void basicexception( const css::uno::Exception& ex );
diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx
index 3b05ac323232..3b5071e1639c 100644
--- a/include/vcl/GraphicNativeTransform.hxx
+++ b/include/vcl/GraphicNativeTransform.hxx
@@ -32,7 +32,7 @@ class VCL_DLLPUBLIC GraphicNativeTransform final
bool rotateBitmapOnly(Degree10 aRotation);
void rotateJPEG(Degree10 aRotation);
- bool rotateGeneric(Degree10 aRotation, const OUString& aType);
+ bool rotateGeneric(Degree10 aRotation, std::u16string_view aType);
public:
GraphicNativeTransform(Graphic& rGraphic);
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index e4c1edc817d6..c302387995ff 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -167,7 +167,7 @@ public:
const Graphic& GetGraphic() const;
void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = nullptr);
- void SetGraphic( const Graphic& rGraphic, const OUString& rLink );
+ void SetGraphic( const Graphic& rGraphic, std::u16string_view rLink );
/** Get graphic transformed according to given attributes
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 83db7db95fb8..35728237dc7a 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -86,18 +86,18 @@ namespace o3tl
#define EXP_PDF "SVEPDF"
#define EXP_PNG "SVEPNG"
-#define BMP_SHORTNAME "BMP"
-#define GIF_SHORTNAME "GIF"
-#define JPG_SHORTNAME "JPG"
-#define MET_SHORTNAME "MET"
-#define PCT_SHORTNAME "PCT"
-#define PNG_SHORTNAME "PNG"
-#define SVM_SHORTNAME "SVM"
-#define TIF_SHORTNAME "TIF"
-#define WMF_SHORTNAME "WMF"
-#define EMF_SHORTNAME "EMF"
-#define SVG_SHORTNAME "SVG"
-#define PDF_SHORTNAME "PDF"
+#define BMP_SHORTNAME u"BMP"
+#define GIF_SHORTNAME u"GIF"
+#define JPG_SHORTNAME u"JPG"
+#define MET_SHORTNAME u"MET"
+#define PCT_SHORTNAME u"PCT"
+#define PNG_SHORTNAME u"PNG"
+#define SVM_SHORTNAME u"SVM"
+#define TIF_SHORTNAME u"TIF"
+#define WMF_SHORTNAME u"WMF"
+#define EMF_SHORTNAME u"EMF"
+#define SVG_SHORTNAME u"SVG"
+#define PDF_SHORTNAME u"PDF"
// Info class for all supported file formats
@@ -241,9 +241,9 @@ public:
~GraphicFilter();
sal_uInt16 GetImportFormatCount() const;
- sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
OUString GetImportFormatName( sal_uInt16 nFormat );
OUString GetImportFormatTypeName( sal_uInt16 nFormat );
#ifdef _WIN32
@@ -253,11 +253,11 @@ public:
OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
sal_uInt16 GetExportFormatCount() const;
- sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rShortName );
- sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
+ sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rShortName );
+ sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
OUString GetExportInternalFilterName( sal_uInt16 nFormat );
- sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
OUString GetExportFormatName( sal_uInt16 nFormat );
OUString GetExportFormatMediaType( sal_uInt16 nFormat );
OUString GetExportFormatShortName( sal_uInt16 nFormat );
diff --git a/include/xmloff/formlayerimport.hxx b/include/xmloff/formlayerimport.hxx
index 8d10604f4ff5..984e0081e111 100644
--- a/include/xmloff/formlayerimport.hxx
+++ b/include/xmloff/formlayerimport.hxx
@@ -66,9 +66,7 @@ namespace xmloff
/** creates an import context for the office:forms element
*/
static SvXMLImportContext* createOfficeFormsContext(
- SvXMLImport& _rImport,
- sal_uInt16 _nPrefix,
- const OUString& _rLocalName);
+ SvXMLImport& _rImport);
/** create an SvXMLImportContext instance which is able to import the &lt;form:form&gt;
element.