summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-08 15:53:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-09 07:56:10 +0200
commit91fef4a47563451e0271784a14b471e4815729d1 (patch)
tree9d944312070e241978c6e1fd6a342b989c64395e /include/editeng
parent66b1ebd4ddc7127a923bf81eb569e7f99dd52022 (diff)
clang-tidy modernize-pass-by-value in editeng
Change-Id: Ibf912c597896a2ac0bf3ba8108f55c5018115bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/AccessibleContextBase.hxx2
-rw-r--r--include/editeng/AccessibleEditableTextPara.hxx2
-rw-r--r--include/editeng/CustomPropertyField.hxx2
-rw-r--r--include/editeng/UnoForbiddenCharsTable.hxx2
-rw-r--r--include/editeng/brushitem.hxx2
-rw-r--r--include/editeng/editstat.hxx5
-rw-r--r--include/editeng/flditem.hxx2
-rw-r--r--include/editeng/fontitem.hxx4
-rw-r--r--include/editeng/forbiddencharacterstable.hxx2
-rw-r--r--include/editeng/outliner.hxx5
-rw-r--r--include/editeng/overflowingtxt.hxx2
-rw-r--r--include/editeng/svxacorr.hxx13
-rw-r--r--include/editeng/swafopt.hxx3
-rw-r--r--include/editeng/unofield.hxx2
-rw-r--r--include/editeng/unolingu.hxx2
-rw-r--r--include/editeng/unonrule.hxx2
16 files changed, 28 insertions, 24 deletions
diff --git a/include/editeng/AccessibleContextBase.hxx b/include/editeng/AccessibleContextBase.hxx
index 6def5872c180..69ef3151cef2 100644
--- a/include/editeng/AccessibleContextBase.hxx
+++ b/include/editeng/AccessibleContextBase.hxx
@@ -66,7 +66,7 @@ public:
};
AccessibleContextBase (
- const css::uno::Reference< css::accessibility::XAccessible>& rxParent,
+ css::uno::Reference< css::accessibility::XAccessible> xParent,
const sal_Int16 aRole);
virtual ~AccessibleContextBase() override;
diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx
index 0d405094b933..d81cc6cd536b 100644
--- a/include/editeng/AccessibleEditableTextPara.hxx
+++ b/include/editeng/AccessibleEditableTextPara.hxx
@@ -80,7 +80,7 @@ namespace accessibility
// - add parameter <_pParaManager> (default value NULL)
// This has to be the instance of <AccessibleParaManager>, which
// created and manages this accessible paragraph.
- AccessibleEditableTextPara ( const css::uno::Reference< css::accessibility::XAccessible >& rParent,
+ AccessibleEditableTextPara ( css::uno::Reference< css::accessibility::XAccessible > xParent,
const AccessibleParaManager* _pParaManager = nullptr );
virtual ~AccessibleEditableTextPara () override;
diff --git a/include/editeng/CustomPropertyField.hxx b/include/editeng/CustomPropertyField.hxx
index b44af7330bbc..38f3119a04fa 100644
--- a/include/editeng/CustomPropertyField.hxx
+++ b/include/editeng/CustomPropertyField.hxx
@@ -30,7 +30,7 @@ private:
OUString msCurrentPresentation;
public:
- explicit CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation);
+ explicit CustomPropertyField(OUString aName, OUString aCurrentPresentation);
virtual ~CustomPropertyField() override;
diff --git a/include/editeng/UnoForbiddenCharsTable.hxx b/include/editeng/UnoForbiddenCharsTable.hxx
index 2697e5dc59cc..625198dadc83 100644
--- a/include/editeng/UnoForbiddenCharsTable.hxx
+++ b/include/editeng/UnoForbiddenCharsTable.hxx
@@ -39,7 +39,7 @@ protected:
std::shared_ptr<SvxForbiddenCharactersTable> mxForbiddenChars;
public:
- SvxUnoForbiddenCharsTable(std::shared_ptr<SvxForbiddenCharactersTable> const & xForbiddenChars);
+ SvxUnoForbiddenCharsTable(std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenChars);
virtual ~SvxUnoForbiddenCharsTable() override;
// XForbiddenCharacters
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 036463c85079..310ae7c8d5ae 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -64,7 +64,7 @@ public:
SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const GraphicObject& rGraphicObj,
SvxGraphicPosition ePos, sal_uInt16 nWhich );
- SvxBrushItem( const OUString& rLink, const OUString& rFilter,
+ SvxBrushItem( OUString rLink, OUString aFilter,
SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const SvxBrushItem& );
SvxBrushItem(SvxBrushItem&&);
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index e23007899267..eec50ea67c20 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <utility>
enum class EEControlBits
{
@@ -126,8 +127,8 @@ struct SpellCallbackInfo
SpellCallbackCommand nCommand;
OUString aWord;
- SpellCallbackInfo( SpellCallbackCommand nCMD, const OUString& rWord )
- : aWord( rWord )
+ SpellCallbackInfo( SpellCallbackCommand nCMD, OUString _aWord )
+ : aWord(std::move( _aWord ))
{
nCommand = nCMD;
}
diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx
index 59bb1c54e667..7dec33e9e891 100644
--- a/include/editeng/flditem.hxx
+++ b/include/editeng/flditem.hxx
@@ -154,7 +154,7 @@ public:
virtual sal_Int32 GetClassId() const override { return CLASS_ID; }
SvxURLField();
- SvxURLField( const OUString& rURL, const OUString& rRepres, SvxURLFormat eFmt = SvxURLFormat::Url );
+ SvxURLField( OUString aURL, OUString aRepres, SvxURLFormat eFmt = SvxURLFormat::Url );
const OUString& GetURL() const { return aURL; }
void SetURL( const OUString& rURL ) { aURL = rURL; }
diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx
index 2ccaade20121..deabf3101f44 100644
--- a/include/editeng/fontitem.hxx
+++ b/include/editeng/fontitem.hxx
@@ -38,8 +38,8 @@ public:
static SfxPoolItem* CreateDefault();
explicit SvxFontItem(const sal_uInt16 nId);
- SvxFontItem(const FontFamily eFam, const OUString& rFamilyName,
- const OUString& rStyleName,
+ SvxFontItem(const FontFamily eFam, OUString aFamilyName,
+ OUString aStyleName,
const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
const sal_uInt16 nId);
diff --git a/include/editeng/forbiddencharacterstable.hxx b/include/editeng/forbiddencharacterstable.hxx
index 923f1886ae4f..f91aade4a698 100644
--- a/include/editeng/forbiddencharacterstable.hxx
+++ b/include/editeng/forbiddencharacterstable.hxx
@@ -36,7 +36,7 @@ public:
private:
Map maMap;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- SvxForbiddenCharactersTable(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ SvxForbiddenCharactersTable(css::uno::Reference< css::uno::XComponentContext > xContext);
public:
static std::shared_ptr<SvxForbiddenCharactersTable> makeForbiddenCharactersTable(const css::uno::Reference<css::uno::XComponentContext>& rxContext);
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 87fabb4ee45e..ab24be0b1e0e 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -29,6 +29,7 @@
#include <svl/undo.hxx>
#include <tools/gen.hxx>
#include <tools/color.hxx>
+#include <utility>
#include <vcl/outdev.hxx>
#include <vcl/errcode.hxx>
#include <tools/link.hxx>
@@ -421,7 +422,7 @@ public:
DrawPortionInfo(
const Point& rPos,
- const OUString& rTxt,
+ OUString aTxt,
sal_Int32 nTxtStart,
sal_Int32 nTxtLen,
const SvxFont& rFnt,
@@ -439,7 +440,7 @@ public:
bool bEndOfParagraph,
bool bEndOfBullet)
: mrStartPos(rPos),
- maText(rTxt),
+ maText(std::move(aTxt)),
mnTextStart(nTxtStart),
mnTextLen(nTxtLen),
mnPara(nPar),
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 031b4d82d9d5..5b95f2d1296c 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -62,7 +62,7 @@ public:
class OverflowingText
{
public:
- OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent);
+ OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > xOverflowingContent);
std::optional<OutlinerParaObject> JuxtaposeParaObject(Outliner *, OutlinerParaObject const *);
std::optional<OutlinerParaObject> DeeplyMergeParaObject(Outliner *, OutlinerParaObject const *);
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index b0f25713d0e0..7483e83c127a 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -33,6 +33,7 @@
#include <map>
#include <memory>
#include <string_view>
+#include <utility>
class CharClass;
class SfxPoolItem;
@@ -143,8 +144,8 @@ class EDITENG_DLLPUBLIC SvxAutocorrWord
OUString sShort, sLong;
bool bIsTxtOnly; // Is pure ASCII - Text
public:
- SvxAutocorrWord( const OUString& rS, const OUString& rL, bool bFlag = true )
- : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag )
+ SvxAutocorrWord( OUString aS, OUString aL, bool bFlag = true )
+ : sShort(std::move( aS )), sLong(std::move( aL )), bIsTxtOnly( bFlag )
{}
const OUString& GetShort() const { return sShort; }
@@ -210,8 +211,8 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
public:
SvxAutoCorrectLanguageLists( SvxAutoCorrect& rParent,
- const OUString& rShareAutoCorrectFile,
- const OUString& rUserAutoCorrectFile);
+ OUString aShareAutoCorrectFile,
+ OUString aUserAutoCorrectFile);
~SvxAutoCorrectLanguageLists();
// Load, Set, Get - the replacement list
@@ -285,8 +286,8 @@ public:
virtual void refreshBlockList( const css::uno::Reference < css::embed::XStorage >& rStg);
- SvxAutoCorrect( const OUString& rShareAutocorrFile,
- const OUString& rUserAutocorrFile );
+ SvxAutoCorrect( OUString aShareAutocorrFile,
+ OUString aUserAutocorrFile );
SvxAutoCorrect( const SvxAutoCorrect& );
virtual ~SvxAutoCorrect();
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index e4c179124ac9..180ba6d1be67 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -25,6 +25,7 @@
#include <editeng/editengdllapi.h>
#include <o3tl/sorted_vector.hxx>
#include <rtl/ustring.hxx>
+#include <utility>
#include <vcl/font.hxx>
#include <vcl/vclenum.hxx>
@@ -37,7 +38,7 @@ class EDITENG_DLLPUBLIC IAutoCompleteString
private:
OUString m_String;
public:
- explicit IAutoCompleteString(OUString const& rString) : m_String(rString) {}
+ explicit IAutoCompleteString(OUString aString) : m_String(std::move(aString)) {}
virtual ~IAutoCompleteString() {}
OUString const& GetAutoCompleteString() const { return m_String; }
};
diff --git a/include/editeng/unofield.hxx b/include/editeng/unofield.hxx
index fe68cd95c060..740a25a5bdb5 100644
--- a/include/editeng/unofield.hxx
+++ b/include/editeng/unofield.hxx
@@ -57,7 +57,7 @@ class EDITENG_DLLPUBLIC SvxUnoTextField final : public cppu::BaseMutex,
public:
SvxUnoTextField( sal_Int32 nServiceId ) noexcept;
- SvxUnoTextField( css::uno::Reference< css::text::XTextRange > const & xAnchor, const OUString& rPresentation, const SvxFieldData* pFieldData ) noexcept;
+ SvxUnoTextField( css::uno::Reference< css::text::XTextRange > xAnchor, const OUString& rPresentation, const SvxFieldData* pFieldData ) noexcept;
virtual ~SvxUnoTextField() noexcept override;
// Internal
diff --git a/include/editeng/unolingu.hxx b/include/editeng/unolingu.hxx
index 3158af872e77..2aec6db1a630 100644
--- a/include/editeng/unolingu.hxx
+++ b/include/editeng/unolingu.hxx
@@ -120,7 +120,7 @@ private:
public:
SvxDicListChgClamp( css::uno::Reference<
- css::linguistic2::XSearchableDictionaryList > const &rxDicList );
+ css::linguistic2::XSearchableDictionaryList > xDicList );
~SvxDicListChgClamp();
};
diff --git a/include/editeng/unonrule.hxx b/include/editeng/unonrule.hxx
index 350a61939cc8..d0e89ffdc33b 100644
--- a/include/editeng/unonrule.hxx
+++ b/include/editeng/unonrule.hxx
@@ -44,7 +44,7 @@ class SvxUnoNumberingRules final : public ::cppu::WeakAggImplHelper5< css::conta
private:
SvxNumRule maRule;
public:
- SvxUnoNumberingRules(const SvxNumRule& rRule);
+ SvxUnoNumberingRules(SvxNumRule aRule);
virtual ~SvxUnoNumberingRules() noexcept override;
UNO3_GETIMPLEMENTATION_DECL( SvxUnoNumberingRules )