include/vcl/GraphicExternalLink.hxx | 6 + include/vcl/GraphicObject.hxx | 2 include/vcl/VectorGraphicSearch.hxx | 2 include/vcl/bitmap.hxx | 2 include/vcl/builder.hxx | 41 +++++------ include/vcl/commandevent.hxx | 2 include/vcl/errinf.hxx | 9 +- include/vcl/font/Feature.hxx | 4 - include/vcl/fontcharmap.hxx | 2 include/vcl/gfxlink.hxx | 2 include/vcl/glyphitemcache.hxx | 4 - include/vcl/graphictools.hxx | 10 +- include/vcl/i18nhelp.hxx | 2 include/vcl/imap.hxx | 2 include/vcl/imapobj.hxx | 10 +- include/vcl/inetimg.hxx | 13 +-- include/vcl/inputctx.hxx | 5 - include/vcl/lazydelete.hxx | 3 include/vcl/metaact.hxx | 44 +++++------ include/vcl/print.hxx | 5 - include/vcl/salctype.hxx | 5 - include/vcl/test/GraphicsRenderTests.hxx | 5 - include/vcl/textdata.hxx | 2 include/vcl/textfilter.hxx | 2 include/vcl/textview.hxx | 2 include/vcl/threadex.hxx | 9 +- include/vcl/toolkit/ivctrl.hxx | 2 include/vcl/toolkit/svlbitm.hxx | 2 include/vcl/transfer.hxx | 9 +- include/vcl/unohelp2.hxx | 2 include/vcl/vectorgraphicdata.hxx | 2 include/vcl/weld.hxx | 23 +++--- vcl/headless/BitmapHelper.cxx | 9 +- vcl/inc/ImplLayoutArgs.hxx | 2 vcl/inc/SwapFile.hxx | 5 - vcl/inc/bubblewindow.hxx | 4 - vcl/inc/driverblocklist.hxx | 7 - vcl/inc/font/FontSelectPattern.hxx | 2 vcl/inc/font/PhysicalFontFamily.hxx | 2 vcl/inc/graphic/GraphicFormatDetector.hxx | 2 vcl/inc/graphic/UnoBinaryDataContainer.hxx | 5 - vcl/inc/headless/BitmapHelper.hxx | 4 - vcl/inc/image.h | 2 vcl/inc/impgraph.hxx | 4 - vcl/inc/implimagetree.hxx | 10 +- vcl/inc/jsdialog/jsdialogbuilder.hxx | 3 vcl/inc/listbox.hxx | 11 +- vcl/inc/messagedialog.hxx | 2 vcl/inc/pdf/pdfwriter_impl.hxx | 2 vcl/inc/ppdparser.hxx | 6 - vcl/inc/printdlg.hxx | 2 vcl/inc/qt5/QtClipboard.hxx | 2 vcl/inc/qt5/QtFilePicker.hxx | 2 vcl/inc/qt5/QtFontFace.hxx | 2 vcl/inc/qt5/QtSvpSurface.hxx | 2 vcl/inc/salmenu.hxx | 5 - vcl/inc/toolbox.h | 8 +- vcl/inc/unx/freetype_glyphcache.hxx | 4 - vcl/inc/unx/glyphcache.hxx | 2 vcl/inc/widgetdraw/WidgetDefinition.hxx | 7 - vcl/inc/widgetdraw/WidgetDefinitionReader.hxx | 2 vcl/jsdialog/jsdialogbuilder.cxx | 7 + vcl/qt5/QtClipboard.cxx | 5 - vcl/qt5/QtFilePicker.cxx | 5 - vcl/qt5/QtFontFace.cxx | 6 - vcl/qt5/QtSvpSurface.cxx | 4 - vcl/qt5/QtXAccessible.cxx | 3 vcl/source/app/i18nhelp.cxx | 5 - vcl/source/app/salvtables.cxx | 2 vcl/source/app/session.cxx | 5 - vcl/source/app/svmain.cxx | 5 - vcl/source/app/unohelp2.cxx | 3 vcl/source/bitmap/bitmap.cxx | 5 - vcl/source/control/edit.cxx | 11 +- vcl/source/control/ivctrl.cxx | 9 +- vcl/source/edit/textdata.cxx | 5 - vcl/source/edit/textdoc.cxx | 5 - vcl/source/edit/textdoc.hxx | 2 vcl/source/edit/textund2.hxx | 4 - vcl/source/edit/textundo.cxx | 9 +- vcl/source/edit/textview.cxx | 3 vcl/source/filter/GraphicFormatDetector.cxx | 5 - vcl/source/font/Feature.cxx | 8 +- vcl/source/font/FontSelectPattern.cxx | 5 - vcl/source/font/PhysicalFontFamily.cxx | 5 - vcl/source/font/fontcharmap.cxx | 5 - vcl/source/gdi/WidgetDefinition.cxx | 24 +++--- vcl/source/gdi/WidgetDefinitionReader.cxx | 8 +- vcl/source/gdi/gfxlink.cxx | 5 - vcl/source/gdi/graphictools.cxx | 21 ++--- vcl/source/gdi/impglyphitem.cxx | 5 - vcl/source/gdi/impgraph.cxx | 13 +-- vcl/source/gdi/metaact.cxx | 93 ++++++++++++------------- vcl/source/gdi/pdfwriter_impl.cxx | 5 - vcl/source/gdi/print3.cxx | 5 - vcl/source/gdi/vectorgraphicdata.cxx | 5 - vcl/source/graphic/GraphicObject.cxx | 9 +- vcl/source/graphic/VectorGraphicSearch.cxx | 5 - vcl/source/helper/driverblocklist.cxx | 13 +-- vcl/source/image/ImplImage.cxx | 5 - vcl/source/image/ImplImageTree.cxx | 5 - vcl/source/text/ImplLayoutArgs.cxx | 5 - vcl/source/treelist/imap.cxx | 19 ++--- vcl/source/treelist/svlbitm.cxx | 5 - vcl/source/window/bubblewindow.cxx | 11 +- vcl/source/window/builder.cxx | 11 +- vcl/source/window/commandevent.cxx | 5 - vcl/source/window/errinf.cxx | 5 - vcl/source/window/layout.cxx | 5 - vcl/source/window/menuitemlist.hxx | 5 - vcl/source/window/printdlg.cxx | 5 - vcl/source/window/toolbox2.cxx | 17 ++-- vcl/unx/generic/gdi/cairo_xlib_cairo.cxx | 13 +-- vcl/unx/generic/gdi/cairo_xlib_cairo.hxx | 4 - vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 13 +-- vcl/unx/generic/print/genprnpsp.cxx | 5 - vcl/unx/generic/print/prtsetup.cxx | 5 - vcl/unx/generic/print/prtsetup.hxx | 2 vcl/unx/generic/printer/ppdparser.cxx | 13 +-- vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx | 7 + vcl/unx/gtk3/fpicker/SalGtkPicker.cxx | 17 ++-- vcl/unx/gtk3/fpicker/SalGtkPicker.hxx | 6 - vcl/unx/gtk3/gtkcairo.cxx | 5 - vcl/unx/gtk3/gtkcairo.hxx | 2 vcl/unx/gtk3/gtkinst.cxx | 5 - 125 files changed, 483 insertions(+), 414 deletions(-)
New commits: commit 54a97eb9ddd66294f303189ca12ef726177453cb Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jul 12 15:52:29 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Jul 13 09:22:40 2022 +0200 clang-tidy modernize-pass-by-value in vcl Change-Id: I9ddb786eb88213c53cf53067ced6899ca40ac6e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/vcl/GraphicExternalLink.hxx b/include/vcl/GraphicExternalLink.hxx index ab9f2a69f4ca..9f825688b672 100644 --- a/include/vcl/GraphicExternalLink.hxx +++ b/include/vcl/GraphicExternalLink.hxx @@ -1,3 +1,5 @@ +#include <utility> + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. @@ -20,8 +22,8 @@ public: GraphicExternalLink() {} - GraphicExternalLink(OUString const& rURL) - : msURL(rURL) + GraphicExternalLink(OUString aURL) + : msURL(std::move(aURL)) { } }; diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx index 7ebaa274e047..4ee6b4f5d3df 100644 --- a/include/vcl/GraphicObject.hxx +++ b/include/vcl/GraphicObject.hxx @@ -158,7 +158,7 @@ private: public: GraphicObject(); - GraphicObject( const Graphic& rGraphic ); + GraphicObject( Graphic aGraphic ); GraphicObject( const GraphicObject& rCacheObj ); ~GraphicObject(); diff --git a/include/vcl/VectorGraphicSearch.hxx b/include/vcl/VectorGraphicSearch.hxx index 4601a1f5ac1d..fe1fcd5d739a 100644 --- a/include/vcl/VectorGraphicSearch.hxx +++ b/include/vcl/VectorGraphicSearch.hxx @@ -57,7 +57,7 @@ private: bool searchPDF(std::shared_ptr<VectorGraphicData> const& rData); public: - VectorGraphicSearch(Graphic const& rGraphic); + VectorGraphicSearch(Graphic aGraphic); ~VectorGraphicSearch(); bool search(OUString const& rSearchString, VectorGraphicSearchOptions const& rOptions = VectorGraphicSearchOptions()); diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index d27ffdaa8559..165f0dc6ca05 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -107,7 +107,7 @@ public: Bitmap(); Bitmap( const Bitmap& rBitmap ); Bitmap( const Size& rSizePixel, vcl::PixelFormat ePixelFormat, const BitmapPalette* pPal = nullptr ); - explicit Bitmap( std::shared_ptr<SalBitmap> const & xSalBitmap ); + explicit Bitmap( std::shared_ptr<SalBitmap> xSalBitmap ); virtual ~Bitmap(); Bitmap& operator=( const Bitmap& rBitmap ); diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index ddae54a1dc8d..041e4c5c3fd0 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -15,6 +15,7 @@ #include <unotools/resmgr.hxx> #include <tools/fldunit.hxx> #include <vcl/dllapi.h> +#include <utility> #include <vcl/window.hxx> #include <vcl/vclptr.hxx> #include <vcl/toolboxid.hxx> @@ -56,9 +57,9 @@ struct ComboBoxTextItem { OUString m_sItem; OString m_sId; - ComboBoxTextItem(const OUString& rItem, const OString& rId) - : m_sItem(rItem) - , m_sId(rId) + ComboBoxTextItem(OUString sItem, OString sId) + : m_sItem(std::move(sItem)) + , m_sId(std::move(sId)) { } }; @@ -74,8 +75,8 @@ public: public: VclBuilder(vcl::Window* pParent, const OUString& sUIRootDir, const OUString& sUIFile, - const OString& sID = OString(), - const css::uno::Reference<css::frame::XFrame>& rFrame + OString sID = OString(), + css::uno::Reference<css::frame::XFrame> xFrame = css::uno::Reference<css::frame::XFrame>(), bool bLegacy = true, const NotebookBarAddonsItem* pNotebookBarAddonsItem = nullptr); @@ -142,8 +143,8 @@ private: OString m_sID; VclPtr<vcl::Window> m_pWindow; PackingData m_aPackingData; - WinAndId(const OString &rId, vcl::Window *pWindow, bool bVertical) - : m_sID(rId) + WinAndId(OString sId, vcl::Window *pWindow, bool bVertical) + : m_sID(std::move(sId)) , m_pWindow(pWindow) , m_aPackingData(bVertical) { @@ -155,7 +156,7 @@ private: { OString m_sID; VclPtr<Menu> m_pMenu; - MenuAndId(const OString &rId, Menu *pMenu); + MenuAndId(OString sId, Menu *pMenu); }; std::vector<MenuAndId> m_aMenus; @@ -163,9 +164,9 @@ private: { OString m_sID; OString m_sValue; - StringPair(const OString &rId, const OString &rValue) - : m_sID(rId) - , m_sValue(rValue) + StringPair(OString sId, OString sValue) + : m_sID(std::move(sId)) + , m_sValue(std::move(sValue)) { } }; @@ -174,9 +175,9 @@ private: { OString m_sID; OUString m_sValue; - UStringPair(const OString &rId, const OUString &rValue) - : m_sID(rId) - , m_sValue(rValue) + UStringPair(OString sId, OUString sValue) + : m_sID(std::move(sId)) + , m_sValue(std::move(sValue)) { } }; @@ -188,9 +189,9 @@ private: OString m_sID; OUString m_sValue; bool m_bRadio; - ButtonImageWidgetMap(const OString &rId, const OUString &rValue, bool bRadio) - : m_sID(rId) - , m_sValue(rValue) + ButtonImageWidgetMap(OString sId, OUString sValue, bool bRadio) + : m_sID(std::move(sId)) + , m_sValue(std::move(sValue)) , m_bRadio(bRadio) { } @@ -206,9 +207,9 @@ private: OString m_sID; OUString m_sValue; sal_Int32 m_nActiveId; - ComboBoxModelMap(const OString &rId, const OUString &rValue, sal_Int32 nActiveId) - : m_sID(rId) - , m_sValue(rValue) + ComboBoxModelMap(OString sId, OUString sValue, sal_Int32 nActiveId) + : m_sID(std::move(sId)) + , m_sValue(std::move(sValue)) , m_nActiveId(nActiveId) { } diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx index 883147fad491..5d40cefc661d 100644 --- a/include/vcl/commandevent.hxx +++ b/include/vcl/commandevent.hxx @@ -102,7 +102,7 @@ private: bool mbOnlyCursor; public: - CommandExtTextInputData( const OUString& rText, + CommandExtTextInputData( OUString aText, const ExtTextInputAttr* pTextAttr, sal_Int32 nCursorPos, sal_uInt16 nCursorFlags, diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx index 670c085cf495..7e83cd799c3c 100644 --- a/include/vcl/errinf.hxx +++ b/include/vcl/errinf.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_ERRINF_HXX #include <rtl/ustring.hxx> +#include <utility> #include <vcl/errcode.hxx> #include <vcl/dllapi.h> #include <o3tl/typed_flags_set.hxx> @@ -178,7 +179,7 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC StringErrorInfo final : public DynamicErrorI { public: StringErrorInfo(ErrCode nUserId, - const OUString& aStringP, + OUString aStringP, DialogMask nMask = DialogMask::NONE); const OUString& GetErrorString() const { return aString; } @@ -191,9 +192,9 @@ private: class SAL_WARN_UNUSED VCL_DLLPUBLIC TwoStringErrorInfo final : public DynamicErrorInfo { public: - TwoStringErrorInfo(ErrCode nUserID, const OUString & rTheArg1, - const OUString & rTheArg2, DialogMask nMask): - DynamicErrorInfo(nUserID, nMask), aArg1(rTheArg1), aArg2(rTheArg2) {} + TwoStringErrorInfo(ErrCode nUserID, OUString aTheArg1, + OUString aTheArg2, DialogMask nMask): + DynamicErrorInfo(nUserID, nMask), aArg1(std::move(aTheArg1)), aArg2(std::move(aTheArg2)) {} const OUString& GetArg1() const { return aArg1; } const OUString& GetArg2() const { return aArg2; } diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx index 3026f105fbfb..e66c7e2a4d72 100644 --- a/include/vcl/font/Feature.hxx +++ b/include/vcl/font/Feature.hxx @@ -66,13 +66,13 @@ private: public: FeatureDefinition(); - FeatureDefinition(uint32_t nCode, OUString const& rDescription, + FeatureDefinition(uint32_t nCode, OUString aDescription, FeatureParameterType eType = FeatureParameterType::BOOL, std::vector<FeatureParameter>&& rEnumParameters = std::vector<FeatureParameter>{}, uint32_t nDefault = 0); FeatureDefinition(uint32_t nCode, TranslateId pDescriptionID, - OUString const& rNumericPart = OUString()); + OUString aNumericPart = OUString()); FeatureDefinition(uint32_t nCode, TranslateId pDescriptionID, std::vector<FeatureParameter> aEnumParameters); diff --git a/include/vcl/fontcharmap.hxx b/include/vcl/fontcharmap.hxx index ade1da6e715c..ae4735376e14 100644 --- a/include/vcl/fontcharmap.hxx +++ b/include/vcl/fontcharmap.hxx @@ -147,7 +147,7 @@ private: int findRangeIndex( sal_UCS4 ) const; - FontCharMap( ImplFontCharMapRef const & pIFCMap ); + FontCharMap( ImplFontCharMapRef pIFCMap ); // prevent assignment and copy construction FontCharMap( const FontCharMap& ) = delete; diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx index 30228f339cd7..852f418d7ef7 100644 --- a/include/vcl/gfxlink.hxx +++ b/include/vcl/gfxlink.hxx @@ -73,7 +73,7 @@ private: public: GfxLink(); explicit GfxLink(std::unique_ptr<sal_uInt8[]> pBuf, sal_uInt32 nBufSize, GfxLinkType nType); - explicit GfxLink(BinaryDataContainer const & rDataConainer, GfxLinkType nType); + explicit GfxLink(BinaryDataContainer aDataConainer, GfxLinkType nType); bool operator==( const GfxLink& ) const; diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx index 30921e6920a0..0b2c4a43b793 100644 --- a/include/vcl/glyphitemcache.hxx +++ b/include/vcl/glyphitemcache.hxx @@ -78,8 +78,8 @@ private: vcl::text::ComplexTextLayoutFlags layoutMode; LanguageType digitLanguage; size_t hashValue; - CachedGlyphsKey(const VclPtr<const OutputDevice>& dev, const OUString& t, sal_Int32 i, - sal_Int32 l, tools::Long w); + CachedGlyphsKey(const VclPtr<const OutputDevice>& dev, OUString t, sal_Int32 i, sal_Int32 l, + tools::Long w); bool operator==(const CachedGlyphsKey& other) const; }; struct CachedGlyphsHash diff --git a/include/vcl/graphictools.hxx b/include/vcl/graphictools.hxx index 932df413cc58..ab2371bb795b 100644 --- a/include/vcl/graphictools.hxx +++ b/include/vcl/graphictools.hxx @@ -76,9 +76,9 @@ public: See accessor method descriptions for argument description */ - SvtGraphicStroke( const tools::Polygon& rPath, - const tools::PolyPolygon& rStartArrow, - const tools::PolyPolygon& rEndArrow, + SvtGraphicStroke( tools::Polygon aPath, + tools::PolyPolygon aStartArrow, + tools::PolyPolygon aEndArrow, double fTransparency, double fStrokeWidth, CapType aCap, @@ -275,7 +275,7 @@ public: See accessor method descriptions for argument description */ - SvtGraphicFill( const tools::PolyPolygon& rPath, + SvtGraphicFill( tools::PolyPolygon aPath, Color aFillColor, double fTransparency, FillRule aFillRule, @@ -288,7 +288,7 @@ public: Color aGradient1stColor, // TODO: vector of colors and offsets Color aGradient2ndColor, sal_Int32 aGradientStepCount, // numbers of steps to render the gradient. gradientStepsInfinite means infinitely many. - const Graphic& aFillGraphic ); + Graphic aFillGraphic ); // accessors /// Query path to fill diff --git a/include/vcl/i18nhelp.hxx b/include/vcl/i18nhelp.hxx index e5368da08547..9f6e43bb6a54 100644 --- a/include/vcl/i18nhelp.hxx +++ b/include/vcl/i18nhelp.hxx @@ -57,7 +57,7 @@ class VCL_DLLPUBLIC I18nHelper public: - I18nHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const LanguageTag& rLanguageTag ); + I18nHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, LanguageTag aLanguageTag ); ~I18nHelper(); sal_Int32 CompareString( const OUString& rStr1, const OUString& rStr2 ) const; diff --git a/include/vcl/imap.hxx b/include/vcl/imap.hxx index 0623920039a3..6245d2928802 100644 --- a/include/vcl/imap.hxx +++ b/include/vcl/imap.hxx @@ -63,7 +63,7 @@ private: public: ImageMap() {}; - ImageMap( const OUString& rName ); + ImageMap( OUString aName ); ImageMap( const ImageMap& rImageMap ); // all IMapObjects are destroyed in the destructor diff --git a/include/vcl/imapobj.hxx b/include/vcl/imapobj.hxx index 54498a65cc34..6e517fddb88a 100644 --- a/include/vcl/imapobj.hxx +++ b/include/vcl/imapobj.hxx @@ -80,11 +80,11 @@ protected: public: IMapObject(); - IMapObject( const OUString& rURL, - const OUString& rAltText, - const OUString& rDesc, - const OUString& rTarget, - const OUString& rName, + IMapObject( OUString aURL, + OUString aAltText, + OUString aDesc, + OUString aTarget, + OUString aName, bool bActive ); virtual ~IMapObject() {}; diff --git a/include/vcl/inetimg.hxx b/include/vcl/inetimg.hxx index 64d64c122553..99c9436d2fd5 100644 --- a/include/vcl/inetimg.hxx +++ b/include/vcl/inetimg.hxx @@ -22,6 +22,7 @@ #include <rtl/ustring.hxx> #include <tools/gen.hxx> #include <sot/formats.hxx> +#include <utility> class INetImage @@ -33,12 +34,12 @@ class INetImage public: INetImage( - const OUString& rImageURL, - const OUString& rTargetURL, - const OUString& rTargetFrame ) - : aImageURL( rImageURL ), - aTargetURL( rTargetURL ), - aTargetFrame( rTargetFrame ) + OUString _aImageURL, + OUString _aTargetURL, + OUString _aTargetFrame ) + : aImageURL(std::move( _aImageURL )), + aTargetURL(std::move( _aTargetURL )), + aTargetFrame(std::move( _aTargetFrame )) {} INetImage() {} diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx index 25d057b91b99..3d2f620ed0c6 100644 --- a/include/vcl/inputctx.hxx +++ b/include/vcl/inputctx.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_INPUTCTX_HXX #include <vcl/dllapi.h> +#include <utility> #include <vcl/font.hxx> #include <o3tl/typed_flags_set.hxx> @@ -48,8 +49,8 @@ public: InputContext( const InputContext& rInputContext ) : maFont( rInputContext.maFont ) { mnOptions = rInputContext.mnOptions; } - InputContext( const vcl::Font& rFont, InputContextFlags nOptions = InputContextFlags::NONE ) : - maFont( rFont ) + InputContext( vcl::Font aFont, InputContextFlags nOptions = InputContextFlags::NONE ) : + maFont(std::move( aFont )) { mnOptions = nOptions; } const vcl::Font& GetFont() const { return maFont; } diff --git a/include/vcl/lazydelete.hxx b/include/vcl/lazydelete.hxx index 397bde8838a8..290a2ad2acd2 100644 --- a/include/vcl/lazydelete.hxx +++ b/include/vcl/lazydelete.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <optional> +#include <utility> namespace vcl { @@ -114,7 +115,7 @@ namespace vcl css::uno::Reference<I> m_xI; virtual void doCleanup() override { set(nullptr); } public: - DeleteUnoReferenceOnDeinit(const css::uno::Reference<I>& r_xI ) : m_xI( r_xI ) { + DeleteUnoReferenceOnDeinit(css::uno::Reference<I> _xI ) : m_xI(std::move( _xI )) { addDeinitContainer( this ); } css::uno::Reference<I> get() { return m_xI; } diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 3ac267aae3fc..1719fca6ff6d 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -175,7 +175,7 @@ public: MetaLineAction( const Point& rStart, const Point& rEnd ); MetaLineAction( const Point& rStart, const Point& rEnd, - const LineInfo& rLineInfo ); + LineInfo aLineInfo ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -397,8 +397,8 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - explicit MetaPolyLineAction( const tools::Polygon& ); - explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& ); + explicit MetaPolyLineAction( tools::Polygon ); + explicit MetaPolyLineAction( tools::Polygon , LineInfo ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -427,7 +427,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - explicit MetaPolygonAction( const tools::Polygon& ); + explicit MetaPolygonAction( tools::Polygon ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -454,7 +454,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - explicit MetaPolyPolygonAction( const tools::PolyPolygon& ); + explicit MetaPolyPolygonAction( tools::PolyPolygon ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -484,7 +484,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaTextAction( const Point& rPt, const OUString& rStr, + MetaTextAction( const Point& rPt, OUString aStr, sal_Int32 nIndex, sal_Int32 nLen ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; @@ -515,10 +515,10 @@ private: public: MetaTextArrayAction(); MetaTextArrayAction( const MetaTextArrayAction& rAction ); - MetaTextArrayAction( const Point& rStartPt, const OUString& rStr, - const std::vector<sal_Int32>& rDXAry, sal_Int32 nIndex, + MetaTextArrayAction( const Point& rStartPt, OUString aStr, + std::vector<sal_Int32> rDXAry, sal_Int32 nIndex, sal_Int32 nLen ); - MetaTextArrayAction( const Point& rStartPt, const OUString& rStr, + MetaTextArrayAction( const Point& rStartPt, OUString aStr, o3tl::span<const sal_Int32> pDXAry, sal_Int32 nIndex, sal_Int32 nLen ); @@ -564,7 +564,7 @@ public: virtual rtl::Reference<MetaAction> Clone() const override; MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth, - const OUString& rStr, + OUString aStr, sal_Int32 nIndex, sal_Int32 nLen ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; @@ -603,7 +603,7 @@ public: virtual rtl::Reference<MetaAction> Clone() const override; MetaTextRectAction( const tools::Rectangle& rRect, - const OUString& rStr, DrawTextFlags nStyle ); + OUString aStr, DrawTextFlags nStyle ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1005,7 +1005,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient ); + MetaGradientAction( const tools::Rectangle& rRect, Gradient aGradient ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1035,7 +1035,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); + MetaGradientExAction( tools::PolyPolygon rPolyPoly, Gradient aGradient ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1065,7 +1065,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ); + MetaHatchAction( tools::PolyPolygon aPolyPoly, const Hatch& rHatch ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1096,7 +1096,7 @@ public: virtual rtl::Reference<MetaAction> Clone() const override; MetaWallpaperAction( const tools::Rectangle& rRect, - const Wallpaper& rPaper ); + Wallpaper aPaper ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1125,7 +1125,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaClipRegionAction( const vcl::Region& rRegion, bool bClip ); + MetaClipRegionAction( vcl::Region aRegion, bool bClip ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1181,7 +1181,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - explicit MetaISectRegionClipRegionAction( const vcl::Region& ); + explicit MetaISectRegionClipRegionAction( vcl::Region ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1456,7 +1456,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - explicit MetaFontAction( const vcl::Font& ); + explicit MetaFontAction( vcl::Font ); virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1548,7 +1548,7 @@ public: virtual void Execute( OutputDevice* pOut ) override; virtual rtl::Reference<MetaAction> Clone() const override; - MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ); + MetaTransparentAction( tools::PolyPolygon aPolyPoly, sal_uInt16 nTransPercent ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1583,7 +1583,7 @@ public: virtual rtl::Reference<MetaAction> Clone() const override; MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos, - const Size& rSize, const Gradient& rGradient ); + const Size& rSize, Gradient aGradient ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1621,7 +1621,7 @@ public: virtual rtl::Reference<MetaAction> Clone() const override; MetaEPSAction( const Point& rPoint, const Size& rSize, - const GfxLink& rGfxLink, const GDIMetaFile& rSubst ); + GfxLink aGfxLink, const GDIMetaFile& rSubst ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; @@ -1681,7 +1681,7 @@ private: public: explicit MetaCommentAction(); explicit MetaCommentAction( const MetaCommentAction& rAct ); - explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 ); + explicit MetaCommentAction( OString aComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 ); virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index e919b8ee234b..ebd6067788e8 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -29,6 +29,7 @@ #include <i18nutil/paper.hxx> #include <vcl/dllapi.h> +#include <utility> #include <vcl/PrinterSupport.hxx> #include <vcl/errcode.hxx> #include <vcl/outdev.hxx> @@ -541,9 +542,9 @@ public: bool mbInternalOnly; bool mbEnabled; - UIControlOptions( const OUString& i_rDependsOnName = OUString(), + UIControlOptions( OUString i_DependsOnName = OUString(), sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false) - : maDependsOnName( i_rDependsOnName ) + : maDependsOnName(std::move( i_DependsOnName )) , mnDependsOnEntry( i_nDependsOnEntry ) , mbAttachToDependency( i_bAttachToDependency ) , mbInternalOnly( false ) diff --git a/include/vcl/salctype.hxx b/include/vcl/salctype.hxx index 71f256b1986e..c52128aef51d 100644 --- a/include/vcl/salctype.hxx +++ b/include/vcl/salctype.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> +#include <utility> #include <vcl/graph.hxx> enum class ConvertDataFormat @@ -51,8 +52,8 @@ public: SvStream& mrStm; ConvertDataFormat mnFormat; - ConvertData( const Graphic& rGraphic, SvStream& rStm, ConvertDataFormat nFormat ) : - maGraphic( rGraphic ), mrStm( rStm ), mnFormat( nFormat ) {} + ConvertData( Graphic aGraphic, SvStream& rStm, ConvertDataFormat nFormat ) : + maGraphic(std::move( aGraphic )), mrStm( rStm ), mnFormat( nFormat ) {} }; typedef sal_uLong (*SALGRFCVTPROC)( void* pInst, diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx index 014f0d71ea37..f931d947e26b 100644 --- a/include/vcl/test/GraphicsRenderTests.hxx +++ b/include/vcl/test/GraphicsRenderTests.hxx @@ -9,6 +9,7 @@ */ #pragma once +#include <utility> #include <vcl/bitmap.hxx> #include <vcl/dllapi.h> #include <vcl/test/TestResult.hxx> @@ -25,8 +26,8 @@ class VCL_PLUGIN_PUBLIC VclTestResult public: VclTestResult(OUString atestName, OUString atestStatus, Bitmap atestBitmap) - : m_aTestName(atestName) - , m_aTestStatus(atestStatus) + : m_aTestName(std::move(atestName)) + , m_aTestStatus(std::move(atestStatus)) , m_aResultantBitmap(atestBitmap) { } diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx index 907a6fdd8852..bcbbb3d3843f 100644 --- a/include/vcl/textdata.hxx +++ b/include/vcl/textdata.hxx @@ -131,7 +131,7 @@ struct TEIMEInfos sal_Int32 nLen; bool bWasCursorOverwrite; - TEIMEInfos(const TextPaM& rPos, const OUString& rOldTextAfterStartPos); + TEIMEInfos(const TextPaM& rPos, OUString aOldTextAfterStartPos); ~TEIMEInfos(); void CopyAttribs(const ExtTextInputAttr* pA, sal_Int32 nL); diff --git a/include/vcl/textfilter.hxx b/include/vcl/textfilter.hxx index 603daafd97c8..0113b28bcedc 100644 --- a/include/vcl/textfilter.hxx +++ b/include/vcl/textfilter.hxx @@ -22,7 +22,7 @@ public: virtual OUString filter(const OUString& rText); - TextFilter(const OUString& rForbiddenChars = OUString(" ")); + TextFilter(OUString aForbiddenChars = OUString(" ")); virtual ~TextFilter(); }; diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 29bc302d4d43..9b7255db8638 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -57,7 +57,7 @@ private: SvMemoryStream maHTMLStream; public: - explicit TETextDataObject( const OUString& rText ); + explicit TETextDataObject( OUString aText ); SvMemoryStream& GetHTMLStream() { return maHTMLStream; } diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx index af2978ce3bdb..06d3bffa0a51 100644 --- a/include/vcl/threadex.hxx +++ b/include/vcl/threadex.hxx @@ -26,6 +26,7 @@ #include <optional> #include <memory> +#include <utility> namespace vcl { @@ -65,8 +66,8 @@ public: } private: - explicit GenericSolarThreadExecutor( FuncT const& func ) - : m_func(func), m_result() {} + explicit GenericSolarThreadExecutor( FuncT func ) + : m_func(std::move(func)), m_result() {} virtual void doIt() override { @@ -103,8 +104,8 @@ public: } private: - explicit GenericSolarThreadExecutor( FuncT const& func ) - : m_func(func) {} + explicit GenericSolarThreadExecutor( FuncT func ) + : m_func(std::move(func)) {} virtual void doIt() override { diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index 502d16d09917..ca96bc8e5718 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -108,7 +108,7 @@ class SvxIconChoiceCtrlEntry } public: - SvxIconChoiceCtrlEntry( const OUString& rText, const Image& rImage ); + SvxIconChoiceCtrlEntry( OUString aText, Image aImage ); const Image& GetImage () const { return aImage; } void SetText ( const OUString& rText ) { aText = rText; } diff --git a/include/vcl/toolkit/svlbitm.hxx b/include/vcl/toolkit/svlbitm.hxx index f02c4125a13b..2c7f092c08ec 100644 --- a/include/vcl/toolkit/svlbitm.hxx +++ b/include/vcl/toolkit/svlbitm.hxx @@ -112,7 +112,7 @@ protected: OUString maText; public: - SvLBoxString(const OUString& rText); + SvLBoxString(OUString aText); SvLBoxString(); virtual ~SvLBoxString() override; diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx index 58b43426e07b..bdd8754a9e8a 100644 --- a/include/vcl/transfer.hxx +++ b/include/vcl/transfer.hxx @@ -42,6 +42,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <memory> #include <mutex> +#include <utility> namespace com::sun::star::datatransfer::dnd { class XDragGestureRecognizer; } namespace com::sun::star::io { class XInputStream; } @@ -103,9 +104,9 @@ struct AcceptDropEvent AcceptDropEvent( sal_Int8 nAction, const Point& rPosPixel, - const css::datatransfer::dnd::DropTargetDragEvent& rDragEvent ) : + css::datatransfer::dnd::DropTargetDragEvent aDragEvent ) : maPosPixel( rPosPixel ), - maDragEvent( rDragEvent ), + maDragEvent(std::move( aDragEvent )), mnAction( nAction ), mbLeaving( false ), mbDefault( false ) {} @@ -120,9 +121,9 @@ struct ExecuteDropEvent ExecuteDropEvent( sal_Int8 nAction, const Point& rPosPixel, - const css::datatransfer::dnd::DropTargetDropEvent& rDropEvent ) : + css::datatransfer::dnd::DropTargetDropEvent aDropEvent ) : maPosPixel( rPosPixel ), - maDropEvent( rDropEvent ), + maDropEvent(std::move( aDropEvent )), mnAction( nAction ), mbDefault( false ) {} }; diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx index 978c31ecf8f6..b9dee333df59 100644 --- a/include/vcl/unohelp2.hxx +++ b/include/vcl/unohelp2.hxx @@ -40,7 +40,7 @@ namespace vcl::unohelper { OUString maText; public: - TextDataObject( const OUString& rText ); + TextDataObject( OUString aText ); virtual ~TextDataObject() override; // css::uno::XInterface diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx index 465690c5640b..0e9f9fec20e7 100644 --- a/include/vcl/vectorgraphicdata.hxx +++ b/include/vcl/vectorgraphicdata.hxx @@ -87,7 +87,7 @@ private: public: VectorGraphicData(const OUString& rPath, VectorGraphicDataType eVectorDataType); VectorGraphicData( - const BinaryDataContainer& rDataContainer, + BinaryDataContainer aDataContainer, VectorGraphicDataType eVectorDataType, sal_Int32 nPageIndex = -1); ~VectorGraphicData(); diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index bfd9ba30b189..e020f0e3b1b4 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -18,6 +18,7 @@ #include <tools/gen.hxx> #include <tools/link.hxx> #include <vcl/dllapi.h> +#include <utility> #include <vcl/vclenum.hxx> #include <vcl/font.hxx> #include <vcl/vclptr.hxx> @@ -491,8 +492,8 @@ public: class VCL_DLLPUBLIC ScreenShotEntry { public: - ScreenShotEntry(const OString& rHelpId, const basegfx::B2IRange& rB2IRange) - : msHelpId(rHelpId) + ScreenShotEntry(OString aHelpId, const basegfx::B2IRange& rB2IRange) + : msHelpId(std::move(aHelpId)) , maB2IRange(rB2IRange) { } @@ -666,19 +667,19 @@ struct VCL_DLLPUBLIC ComboBoxEntry OUString sString; OUString sId; OUString sImage; - ComboBoxEntry(const OUString& rString) - : sString(rString) + ComboBoxEntry(OUString _aString) + : sString(std::move(_aString)) { } - ComboBoxEntry(const OUString& rString, const OUString& rId) - : sString(rString) - , sId(rId) + ComboBoxEntry(OUString _aString, OUString _aId) + : sString(std::move(_aString)) + , sId(std::move(_aId)) { } - ComboBoxEntry(const OUString& rString, const OUString& rId, const OUString& rImage) - : sString(rString) - , sId(rId) - , sImage(rImage) + ComboBoxEntry(OUString _aString, OUString _aId, OUString _aImage) + : sString(std::move(_aString)) + , sId(std::move(_aId)) + , sImage(std::move(_aImage)) { } }; diff --git a/vcl/headless/BitmapHelper.cxx b/vcl/headless/BitmapHelper.cxx index 2b9c670dfb3f..ddd7e10db689 100644 --- a/vcl/headless/BitmapHelper.cxx +++ b/vcl/headless/BitmapHelper.cxx @@ -19,6 +19,7 @@ #include <headless/BitmapHelper.hxx> #include <svdata.hxx> +#include <utility> BitmapHelper::BitmapHelper(const SalBitmap& rSourceBitmap, const bool bForceARGB32) #ifdef HAVE_CAIRO_FORMAT_RGB24_888 @@ -161,9 +162,9 @@ sal_Int64 estimateUsageInBytesForSurfaceHelper(const SurfaceHelper* pHelper) SystemDependentData_BitmapHelper::SystemDependentData_BitmapHelper( basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr<BitmapHelper>& rBitmapHelper) + std::shared_ptr<BitmapHelper> xBitmapHelper) : basegfx::SystemDependentData(rSystemDependentDataManager) - , maBitmapHelper(rBitmapHelper) + , maBitmapHelper(std::move(xBitmapHelper)) { } @@ -174,9 +175,9 @@ sal_Int64 SystemDependentData_BitmapHelper::estimateUsageInBytes() const SystemDependentData_MaskHelper::SystemDependentData_MaskHelper( basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr<MaskHelper>& rMaskHelper) + std::shared_ptr<MaskHelper> xMaskHelper) : basegfx::SystemDependentData(rSystemDependentDataManager) - , maMaskHelper(rMaskHelper) + , maMaskHelper(std::move(xMaskHelper)) { } diff --git a/vcl/inc/ImplLayoutArgs.hxx b/vcl/inc/ImplLayoutArgs.hxx index fa94562ca86c..a94557afeb36 100644 --- a/vcl/inc/ImplLayoutArgs.hxx +++ b/vcl/inc/ImplLayoutArgs.hxx @@ -45,7 +45,7 @@ public: ImplLayoutRuns maFallbackRuns; ImplLayoutArgs(OUString const& rStr, int nMinCharPos, int nEndCharPos, SalLayoutFlags nFlags, - LanguageTag const& rLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache); + LanguageTag aLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache); void SetLayoutWidth(DeviceCoordinate nWidth); void SetDXArray(const DeviceCoordinate* pDXArray); diff --git a/vcl/inc/SwapFile.hxx b/vcl/inc/SwapFile.hxx index bcfa0232c62c..64060fd306a9 100644 --- a/vcl/inc/SwapFile.hxx +++ b/vcl/inc/SwapFile.hxx @@ -24,6 +24,7 @@ #include <tools/stream.hxx> #include <unotools/ucbhelper.hxx> #include <unotools/ucbstreamhelper.hxx> +#include <utility> namespace vcl { @@ -33,8 +34,8 @@ private: INetURLObject maSwapURL; public: - SwapFile(INetURLObject const& rSwapURL) - : maSwapURL(rSwapURL) + SwapFile(INetURLObject aSwapURL) + : maSwapURL(std::move(aSwapURL)) { } diff --git a/vcl/inc/bubblewindow.hxx b/vcl/inc/bubblewindow.hxx index 1a6077b02980..12254d2dbb80 100644 --- a/vcl/inc/bubblewindow.hxx +++ b/vcl/inc/bubblewindow.hxx @@ -41,8 +41,8 @@ private: void RecalcTextRects(); public: - BubbleWindow( vcl::Window* pParent, const OUString& rTitle, - const OUString& rText, const Image& rImage ); + BubbleWindow( vcl::Window* pParent, OUString aTitle, + OUString aText, Image aImage ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx index 542677aa3454..f3fc81c6642d 100644 --- a/vcl/inc/driverblocklist.hxx +++ b/vcl/inc/driverblocklist.hxx @@ -92,9 +92,8 @@ enum VersionComparisonOp struct DriverInfo { - DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op, - uint64_t driverVersion, bool bAllowListed = false, - const char* suggestedVersion = nullptr); + DriverInfo(OperatingSystem os, OUString vendor, VersionComparisonOp op, uint64_t driverVersion, + bool bAllowListed = false, const char* suggestedVersion = nullptr); DriverInfo(); @@ -117,7 +116,7 @@ struct DriverInfo class VCL_DLLPUBLIC Parser { public: - Parser(const OUString& rURL, std::vector<DriverInfo>& rDriverList, VersionType versionType); + Parser(OUString aURL, std::vector<DriverInfo>& rDriverList, VersionType versionType); bool parse(); private: diff --git a/vcl/inc/font/FontSelectPattern.hxx b/vcl/inc/font/FontSelectPattern.hxx index 7cf1506b873f..8e21cf5696bc 100644 --- a/vcl/inc/font/FontSelectPattern.hxx +++ b/vcl/inc/font/FontSelectPattern.hxx @@ -40,7 +40,7 @@ class PhysicalFontFace; class VCL_DLLPUBLIC FontSelectPattern : public FontAttributes { public: - FontSelectPattern(const vcl::Font&, const OUString& rSearchName, + FontSelectPattern(const vcl::Font&, OUString aSearchName, const Size&, float fExactHeight, bool bNonAntialias = false); #ifdef _WIN32 FontSelectPattern( const PhysicalFontFace&, const Size&, diff --git a/vcl/inc/font/PhysicalFontFamily.hxx b/vcl/inc/font/PhysicalFontFamily.hxx index fa0036b8599a..bcb8c9dedbb9 100644 --- a/vcl/inc/font/PhysicalFontFamily.hxx +++ b/vcl/inc/font/PhysicalFontFamily.hxx @@ -62,7 +62,7 @@ class PhysicalFontFaceCollection; class VCL_PLUGIN_PUBLIC PhysicalFontFamily { public: - PhysicalFontFamily(const OUString& rSearchName); + PhysicalFontFamily(OUString aSearchName); ~PhysicalFontFamily(); // Avoid implicitly defined copy constructors/assignments for the DLLPUBLIC class (they may diff --git a/vcl/inc/graphic/GraphicFormatDetector.hxx b/vcl/inc/graphic/GraphicFormatDetector.hxx index dc1bbf0b3e08..bf1dff37a5db 100644 --- a/vcl/inc/graphic/GraphicFormatDetector.hxx +++ b/vcl/inc/graphic/GraphicFormatDetector.hxx @@ -51,7 +51,7 @@ public: OUString msDetectedFormat; - GraphicFormatDetector(SvStream& rStream, OUString const& rFormatExtension); + GraphicFormatDetector(SvStream& rStream, OUString aFormatExtension); bool detect(); diff --git a/vcl/inc/graphic/UnoBinaryDataContainer.hxx b/vcl/inc/graphic/UnoBinaryDataContainer.hxx index 5447c4bdc923..f1e123dad8d8 100644 --- a/vcl/inc/graphic/UnoBinaryDataContainer.hxx +++ b/vcl/inc/graphic/UnoBinaryDataContainer.hxx @@ -20,6 +20,7 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <utility> #include <vcl/BinaryDataContainer.hxx> class UnoBinaryDataContainer final @@ -29,8 +30,8 @@ private: BinaryDataContainer maBinaryDataContainer; public: - UnoBinaryDataContainer(BinaryDataContainer const& rBinaryDataContainer) - : maBinaryDataContainer(rBinaryDataContainer) + UnoBinaryDataContainer(BinaryDataContainer aBinaryDataContainer) + : maBinaryDataContainer(std::move(aBinaryDataContainer)) { } diff --git a/vcl/inc/headless/BitmapHelper.hxx b/vcl/inc/headless/BitmapHelper.hxx index cffa0b21d50b..c86a79239d47 100644 --- a/vcl/inc/headless/BitmapHelper.hxx +++ b/vcl/inc/headless/BitmapHelper.hxx @@ -54,7 +54,7 @@ private: public: SystemDependentData_BitmapHelper( basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr<BitmapHelper>& rBitmapHelper); + std::shared_ptr<BitmapHelper> xBitmapHelper); const std::shared_ptr<BitmapHelper>& getBitmapHelper() const { return maBitmapHelper; }; virtual sal_Int64 estimateUsageInBytes() const override; @@ -67,7 +67,7 @@ private: public: SystemDependentData_MaskHelper(basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr<MaskHelper>& rMaskHelper); + std::shared_ptr<MaskHelper> xMaskHelper); const std::shared_ptr<MaskHelper>& getMaskHelper() const { return maMaskHelper; }; virtual sal_Int64 estimateUsageInBytes() const override; diff --git a/vcl/inc/image.h b/vcl/inc/image.h index 633c38c4a34e..c049e27072e7 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -40,7 +40,7 @@ private: public: ImplImage(const BitmapEx& rBitmapEx); - ImplImage(const OUString &aStockName); + ImplImage(OUString aStockName); bool isStock() const { diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index dbeee7208c9d..6007dcc63ed1 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -90,8 +90,8 @@ public: ImpGraphic(); ImpGraphic( const ImpGraphic& rImpGraphic ); ImpGraphic( ImpGraphic&& rImpGraphic ) noexcept; - ImpGraphic( const GraphicExternalLink& rExternalLink); - ImpGraphic(std::shared_ptr<GfxLink> const& rGfxLink, sal_Int32 nPageIndex = 0); + ImpGraphic( GraphicExternalLink aExternalLink); + ImpGraphic(std::shared_ptr<GfxLink> xGfxLink, sal_Int32 nPageIndex = 0); ImpGraphic( const BitmapEx& rBmpEx ); ImpGraphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr); ImpGraphic( const Animation& rAnimation ); diff --git a/vcl/inc/implimagetree.hxx b/vcl/inc/implimagetree.hxx index e3389f74bf86..d02e5652971f 100644 --- a/vcl/inc/implimagetree.hxx +++ b/vcl/inc/implimagetree.hxx @@ -47,10 +47,10 @@ struct ImageRequestParameters bool mbWriteImageToCache; sal_Int32 mnScalePercentage; - ImageRequestParameters(const OUString & rName, const OUString & rStyle, BitmapEx& rBitmap, bool bLocalized, + ImageRequestParameters(OUString aName, OUString aStyle, BitmapEx& rBitmap, bool bLocalized, ImageLoadFlags eFlags, sal_Int32 nScalePercentage) - : msName(rName) - , msStyle(rStyle) + : msName(std::move(aName)) + , msStyle(std::move(aStyle)) , mrBitmap(rBitmap) , mbLocalized(bLocalized) , meFlags(eFlags) @@ -107,8 +107,8 @@ private: maLinkHash.reserve(50); } - IconSet(const OUString & rURL) - : maURL(rURL) + IconSet(OUString aURL) + : maURL(std::move(aURL)) { maLinkHash.reserve(50); } diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 6a7a9632a27c..8945a499b39f 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -11,6 +11,7 @@ #include <comphelper/string.hxx> #include <osl/mutex.hxx> +#include <utility> #include <vcl/weld.hxx> #include <vcl/jsdialog/executor.hxx> #include <vcl/sysdata.hxx> @@ -80,7 +81,7 @@ public: JSDialogMessageInfo(jsdialog::MessageType eType, VclPtr<vcl::Window> pWindow, std::unique_ptr<jsdialog::ActionDataMap> pData) : m_eType(eType) - , m_pWindow(pWindow) + , m_pWindow(std::move(pWindow)) , m_pData(std::move(pData)) { } diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 6846a4272976..fca82a20cf05 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -23,6 +23,7 @@ #include <sal/config.h> #include <o3tl/safeint.hxx> +#include <utility> #include <vcl/toolkit/button.hxx> #include <vcl/toolkit/floatwin.hxx> #include <vcl/quickselectionengine.hxx> @@ -60,9 +61,9 @@ struct ImplEntryType tools::Long getHeightWithMargin() const; - ImplEntryType( const OUString& rStr, const Image& rImage ) : - maStr( rStr ), - maImage( rImage ), + ImplEntryType( OUString aStr, Image aImage ) : + maStr(std::move( aStr )), + maImage(std::move( aImage )), mnFlags( ListBoxEntryFlags::NONE ), mnHeight( 0 ) { @@ -70,8 +71,8 @@ struct ImplEntryType mpUserData = nullptr; } - ImplEntryType( const OUString& rStr ) : - maStr( rStr ), + ImplEntryType( OUString aStr ) : + maStr(std::move( aStr )), mnFlags( ListBoxEntryFlags::NONE ), mnHeight( 0 ) { diff --git a/vcl/inc/messagedialog.hxx b/vcl/inc/messagedialog.hxx index 20e8c7b66084..dee6e712b2bc 100644 --- a/vcl/inc/messagedialog.hxx +++ b/vcl/inc/messagedialog.hxx @@ -40,7 +40,7 @@ private: virtual void StateChanged(StateChangedType nType) override; public: - MessageDialog(vcl::Window* pParent, const OUString& rMessage, VclMessageType eMessageType, + MessageDialog(vcl::Window* pParent, OUString aMessage, VclMessageType eMessageType, VclButtonsType eButtonsType); virtual bool set_property(const OString& rKey, const OUString& rValue) override; OUString const& get_primary_text() const; diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index 228df387fb6d..b72e497446d6 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -1067,7 +1067,7 @@ i12626 void appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer ); void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer ); public: - PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, const css::uno::Reference< css::beans::XMaterialHolder >&, PDFWriter& ); + PDFWriterImpl( PDFWriter::PDFWriterContext aContext, const css::uno::Reference< css::beans::XMaterialHolder >&, PDFWriter& ); ~PDFWriterImpl() override; void dispose() override; diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx index cd565ef761eb..1222bc1704a7 100644 --- a/vcl/inc/ppdparser.hxx +++ b/vcl/inc/ppdparser.hxx @@ -83,7 +83,7 @@ private: void eraseValue( const OUString& rOption ); public: - PPDKey( const OUString& rKey ); + PPDKey( OUString aKey ); ~PPDKey(); PPDValue* insertValue(const OUString& rOption, PPDValueType eType, bool bCustomOption = false); @@ -163,8 +163,8 @@ private: // translations std::unique_ptr<PPDTranslator> m_pTranslator; - PPDParser( const OUString& rFile ); - PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys); + PPDParser( OUString aFile ); + PPDParser(OUString aFile, const std::vector<PPDKey*>& keys); void parseOrderDependency(const OString& rLine); void parseOpenUI(const OString& rLine, std::string_view rPPDGroup); diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 5b96417476e0..38fc8e76ef97 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -93,7 +93,7 @@ namespace vcl } }; - PrintDialog(weld::Window*, const std::shared_ptr<PrinterController>&); + PrintDialog(weld::Window*, std::shared_ptr<PrinterController> ); virtual ~PrintDialog() override; bool isPrintToFile() const; diff --git a/vcl/inc/qt5/QtClipboard.hxx b/vcl/inc/qt5/QtClipboard.hxx index 69c2f7a27d9e..f07414bfbc70 100644 --- a/vcl/inc/qt5/QtClipboard.hxx +++ b/vcl/inc/qt5/QtClipboard.hxx @@ -53,7 +53,7 @@ class QtClipboard final static bool isOwner(const QClipboard::Mode aMode); static bool isSupported(const QClipboard::Mode aMode); - explicit QtClipboard(const OUString& aModeString, const QClipboard::Mode aMode); + explicit QtClipboard(OUString aModeString, const QClipboard::Mode aMode); private Q_SLOTS: void handleChanged(QClipboard::Mode mode); diff --git a/vcl/inc/qt5/QtFilePicker.hxx b/vcl/inc/qt5/QtFilePicker.hxx index 20ee52e83ea0..58824adbbd48 100644 --- a/vcl/inc/qt5/QtFilePicker.hxx +++ b/vcl/inc/qt5/QtFilePicker.hxx @@ -87,7 +87,7 @@ protected: public: // use non-native file dialog by default; there's no easy way to add custom widgets // in a generic way in the native one - explicit QtFilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, + explicit QtFilePicker(css::uno::Reference<css::uno::XComponentContext> context, QFileDialog::FileMode, bool bUseNative = false); virtual ~QtFilePicker() override; diff --git a/vcl/inc/qt5/QtFontFace.hxx b/vcl/inc/qt5/QtFontFace.hxx index 5b0460443e90..2df5ab7eb009 100644 --- a/vcl/inc/qt5/QtFontFace.hxx +++ b/vcl/inc/qt5/QtFontFace.hxx @@ -64,7 +64,7 @@ private: typedef enum { Font, FontDB } FontIdType; QtFontFace(const QtFontFace&); - QtFontFace(const FontAttributes&, const QString& rFontID, const FontIdType); + QtFontFace(const FontAttributes&, QString rFontID, const FontIdType); const QString m_aFontId; const FontIdType m_eFontIdType; diff --git a/vcl/inc/qt5/QtSvpSurface.hxx b/vcl/inc/qt5/QtSvpSurface.hxx index 2c2b29cff386..d86553643e76 100644 --- a/vcl/inc/qt5/QtSvpSurface.hxx +++ b/vcl/inc/qt5/QtSvpSurface.hxx @@ -26,7 +26,7 @@ class QtSvpSurface final : public Surface public: /// takes over ownership of passed cairo_surface - explicit QtSvpSurface(const CairoSurfaceSharedPtr& pSurface); + explicit QtSvpSurface(CairoSurfaceSharedPtr pSurface); /// create surface on subarea of given drawable explicit QtSvpSurface(const QtSvpGraphics* pGraphics, int x, int y, int width, int height); ~QtSvpSurface() override; diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 25a022b39c2a..50c1e9f4bc8a 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_VCL_INC_SALMENU_HXX #define INCLUDED_VCL_INC_SALMENU_HXX +#include <utility> #include <vcl/menu.hxx> #include <vcl/image.hxx> @@ -44,8 +45,8 @@ struct SalMenuButtonItem OUString maToolTipText; SalMenuButtonItem() : mnId( 0 ) {} - SalMenuButtonItem( sal_uInt16 i_nId, const Image& rImg, const OUString& i_rTTText ) - : mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {} + SalMenuButtonItem( sal_uInt16 i_nId, Image aImg, OUString i_TTText ) + : mnId( i_nId ), maImage(std::move( aImg )), maToolTipText(std::move( i_TTText )) {} }; class VCL_PLUGIN_PUBLIC SalMenuItem diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 10377e664b13..387a0ba0037e 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -68,12 +68,12 @@ struct ImplToolItem mbExpand:1; ImplToolItem(); - ImplToolItem( ToolBoxItemId nItemId, const Image& rImage, + ImplToolItem( ToolBoxItemId nItemId, Image aImage, ToolBoxItemBits nItemBits ); - ImplToolItem( ToolBoxItemId nItemId, const OUString& rTxt, + ImplToolItem( ToolBoxItemId nItemId, OUString aTxt, ToolBoxItemBits nItemBits ); - ImplToolItem( ToolBoxItemId nItemId, const Image& rImage, - const OUString& rTxt, + ImplToolItem( ToolBoxItemId nItemId, Image aImage, + OUString aTxt, ToolBoxItemBits nItemBits ); // returns the size of an item, taking toolbox orientation into account diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx index 9f4feb3fa3f9..525bd35dc6f2 100644 --- a/vcl/inc/unx/freetype_glyphcache.hxx +++ b/vcl/inc/unx/freetype_glyphcache.hxx @@ -45,7 +45,7 @@ public: private: friend class FreetypeManager; - explicit FreetypeFontFile( const OString& rNativeFileName ); + explicit FreetypeFontFile( OString aNativeFileName ); const OString maNativeFileName; unsigned char* mpFileMap; @@ -79,7 +79,7 @@ public: private: friend class FreetypeManager; - explicit FreetypeFontInfo(const FontAttributes&, FreetypeFontFile* const pFontFile, + explicit FreetypeFontInfo(FontAttributes , FreetypeFontFile* const pFontFile, int nFaceNum, int nFaceVariation, sal_IntPtr nFontId); FT_FaceRec_* maFaceFT; diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index b6120e2899ee..8c2d0e6400ef 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -145,7 +145,7 @@ private: friend class FreetypeFontInstance; friend class FreetypeManager; - explicit FreetypeFont(FreetypeFontInstance&, const std::shared_ptr<FreetypeFontInfo>& rFontInfo); + explicit FreetypeFont(FreetypeFontInstance&, std::shared_ptr<FreetypeFontInfo> rFontInfo); void ApplyGlyphTransform(bool bVertical, FT_Glyph) const; diff --git a/vcl/inc/widgetdraw/WidgetDefinition.hxx b/vcl/inc/widgetdraw/WidgetDefinition.hxx index 65a4dcb32c29..b38b985ca229 100644 --- a/vcl/inc/widgetdraw/WidgetDefinition.hxx +++ b/vcl/inc/widgetdraw/WidgetDefinition.hxx @@ -167,10 +167,9 @@ public: OString msButtonValue; OString msExtra; - WidgetDefinitionState(OString const& sEnabled, OString const& sFocused, OString const& sPressed, - OString const& sRollover, OString const& sDefault, - OString const& sSelected, OString const& sButtonValue, - OString const& sExtra); + WidgetDefinitionState(OString sEnabled, OString sFocused, OString sPressed, OString sRollover, + OString sDefault, OString sSelected, OString sButtonValue, + OString sExtra); std::vector<std::shared_ptr<WidgetDrawAction>> mpWidgetDrawActions; diff --git a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx index 49ecfac7a6ed..fe2ebb6d613c 100644 --- a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx +++ b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx @@ -34,7 +34,7 @@ private: const std::shared_ptr<WidgetDefinitionState>& rStates); public: - WidgetDefinitionReader(OUString const& rDefinitionFile, OUString const& rResourcePath); + WidgetDefinitionReader(OUString aDefinitionFile, OUString aResourcePath); bool read(WidgetDefinition& rWidgetDefinition); }; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 810425a7cf40..bb8919b7241f 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -10,6 +10,7 @@ #include <jsdialog/jsdialogbuilder.hxx> #include <sal/log.hxx> #include <comphelper/lok.hxx> +#include <utility> #include <vcl/tabpage.hxx> #include <vcl/toolkit/button.hxx> #include <vcl/toolkit/dialog.hxx> @@ -55,9 +56,9 @@ void response_help(vcl::Window* pWindow) JSDialogNotifyIdle::JSDialogNotifyIdle(VclPtr<vcl::Window> aNotifierWindow, VclPtr<vcl::Window> aContentWindow, std::string sTypeOfJSON) : Idle("JSDialog notify") - , m_aNotifierWindow(aNotifierWindow) - , m_aContentWindow(aContentWindow) - , m_sTypeOfJSON(sTypeOfJSON) + , m_aNotifierWindow(std::move(aNotifierWindow)) + , m_aContentWindow(std::move(aContentWindow)) + , m_sTypeOfJSON(std::move(sTypeOfJSON)) , m_bForce(false) { SetPriority(TaskPriority::POST_PAINT); diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx index 5d1a167a92a2..c9a7683c422d 100644 --- a/vcl/qt5/QtClipboard.cxx +++ b/vcl/qt5/QtClipboard.cxx @@ -22,12 +22,13 @@ #include <cassert> #include <map> +#include <utility> -QtClipboard::QtClipboard(const OUString& aModeString, const QClipboard::Mode aMode) +QtClipboard::QtClipboard(OUString aModeString, const QClipboard::Mode aMode) : cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard, css::datatransfer::clipboard::XFlushableClipboard, XServiceInfo>(m_aMutex) - , m_aClipboardName(aModeString) + , m_aClipboardName(std::move(aModeString)) , m_aClipboardMode(aMode) , m_bOwnClipboardChange(false) , m_bDoClear(false) diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx index 392e4f800925..8a13ec67235c 100644 --- a/vcl/qt5/QtFilePicker.cxx +++ b/vcl/qt5/QtFilePicker.cxx @@ -65,6 +65,7 @@ #include <unx/geninst.h> #include <fpicker/strings.hrc> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::ui::dialogs; @@ -84,10 +85,10 @@ uno::Sequence<OUString> FilePicker_getSupportedServiceNames() } } -QtFilePicker::QtFilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, +QtFilePicker::QtFilePicker(css::uno::Reference<css::uno::XComponentContext> context, QFileDialog::FileMode eMode, bool bUseNative) : QtFilePicker_Base(m_aHelperMutex) - , m_context(context) + , m_context(std::move(context)) , m_bIsFolderPicker(eMode == QFileDialog::Directory) , m_pParentWidget(nullptr) , m_pFileDialog(new QFileDialog(nullptr, {}, QDir::homePath())) diff --git a/vcl/qt5/QtFontFace.cxx b/vcl/qt5/QtFontFace.cxx index 291d7e90fdef..e97bee11d078 100644 --- a/vcl/qt5/QtFontFace.cxx +++ b/vcl/qt5/QtFontFace.cxx @@ -35,6 +35,7 @@ #include <QtGui/QFontDatabase> #include <QtGui/QFontInfo> #include <QtGui/QRawFont> +#include <utility> using namespace vcl; @@ -160,10 +161,9 @@ QtFontFace* QtFontFace::fromQFontDatabase(const QString& aFamily, const QString& FontIdType::FontDB); } -QtFontFace::QtFontFace(const FontAttributes& rFA, const QString& rFontID, - const FontIdType eFontIdType) +QtFontFace::QtFontFace(const FontAttributes& rFA, QString aFontID, const FontIdType eFontIdType) : PhysicalFontFace(rFA) - , m_aFontId(rFontID) + , m_aFontId(std::move(aFontID)) , m_eFontIdType(eFontIdType) , m_bFontCapabilitiesRead(false) { diff --git a/vcl/qt5/QtSvpSurface.cxx b/vcl/qt5/QtSvpSurface.cxx index a2a39c12b387..944110847267 100644 --- a/vcl/qt5/QtSvpSurface.cxx +++ b/vcl/qt5/QtSvpSurface.cxx @@ -33,10 +33,10 @@ Size get_surface_size(cairo_surface_t* surface) namespace cairo { -QtSvpSurface::QtSvpSurface(const CairoSurfaceSharedPtr& pSurface) +QtSvpSurface::QtSvpSurface(CairoSurfaceSharedPtr pSurface) : m_pGraphics(nullptr) , m_pCairoContext(nullptr) - , m_pSurface(pSurface) + , m_pSurface(std::move(pSurface)) { } diff --git a/vcl/qt5/QtXAccessible.cxx b/vcl/qt5/QtXAccessible.cxx index c8ef055a2429..25c0c5e9e120 100644 --- a/vcl/qt5/QtXAccessible.cxx +++ b/vcl/qt5/QtXAccessible.cxx @@ -17,12 +17,13 @@ #include <com/sun/star/accessibility/XAccessible.hpp> #include <sal/log.hxx> +#include <utility> using namespace css::accessibility; using namespace css::uno; QtXAccessible::QtXAccessible(Reference<XAccessible> xAccessible) - : m_xAccessible(xAccessible) + : m_xAccessible(std::move(xAccessible)) { } diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 1ed017b77895..d497cdba4fba 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -25,13 +25,14 @@ #include <rtl/ustrbuf.hxx> +#include <utility> #include <vcl/i18nhelp.hxx> using namespace ::com::sun::star; -vcl::I18nHelper::I18nHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const LanguageTag& rLanguageTag ) +vcl::I18nHelper::I18nHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, LanguageTag aLanguageTag ) : - maLanguageTag( rLanguageTag) + maLanguageTag(std::move( aLanguageTag)) { m_xContext = rxContext; mpLocaleDataWrapper = nullptr; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index c034b88bc285..1e3f53e368eb 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -639,7 +639,7 @@ private: public: SalFlashAttention(VclPtr<vcl::Window> xWidget) - : m_xWidget(xWidget) + : m_xWidget(std::move(xWidget)) , m_aFlashTimer("SalFlashAttention") , m_bOrigControlBackground(false) , m_nFlashCount(1) diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index a1b37b27d464..5fb78dad31f0 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -25,6 +25,7 @@ #include <cppuhelper/compbase.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/svapp.hxx> #include <factory.hxx> @@ -59,8 +60,8 @@ class VCLSession: bool m_bInteractionDone; bool m_bSaveDone; - explicit Listener( const css::uno::Reference< XSessionManagerListener >& xListener ) - : m_xListener( xListener ), + explicit Listener( css::uno::Reference< XSessionManagerListener > xListener ) + : m_xListener(std::move( xListener )), m_bInteractionRequested( false ), m_bInteractionDone( false ), m_bSaveDone( false ) diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index a88a62611ac6..fe2159767a8c 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -32,6 +32,7 @@ #include <i18nlangtag/mslangid.hxx> #include <unotools/syslocale.hxx> #include <unotools/syslocaleoptions.hxx> +#include <utility> #include <vcl/QueueInfo.hxx> #include <vcl/svapp.hxx> #include <vcl/vclmain.hxx> @@ -246,8 +247,8 @@ namespace { class DesktopEnvironmentContext: public cppu::WeakImplHelper< css::uno::XCurrentContext > { public: - explicit DesktopEnvironmentContext( const css::uno::Reference< css::uno::XCurrentContext > & ctx) - : m_xNextContext( ctx ) {} + explicit DesktopEnvironmentContext( css::uno::Reference< css::uno::XCurrentContext > ctx) + : m_xNextContext(std::move( ctx )) {} // XCurrentContext virtual css::uno::Any SAL_CALL getValueByName( const OUString& Name ) override; diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx index 47cfab4bcf9d..5bdb6c8388e5 100644 --- a/vcl/source/app/unohelp2.cxx +++ b/vcl/source/app/unohelp2.cxx @@ -18,6 +18,7 @@ */ #include <sal/log.hxx> +#include <utility> #include <vcl/unohelp2.hxx> #include <sot/exchange.hxx> #include <sot/formats.hxx> @@ -34,7 +35,7 @@ using namespace ::com::sun::star; namespace vcl::unohelper { - TextDataObject::TextDataObject( const OUString& rText ) : maText( rText ) + TextDataObject::TextDataObject( OUString aText ) : maText(std::move( aText )) { } diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 3c40dd8f9832..a02179aea0f6 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -23,6 +23,7 @@ #include <osl/diagnose.h> #include <tools/helpers.hxx> +#include <utility> #include <vcl/bitmap.hxx> #include <vcl/bitmapex.hxx> #include <vcl/outdev.hxx> @@ -67,8 +68,8 @@ Bitmap::Bitmap(const Bitmap& rBitmap) { } -Bitmap::Bitmap(std::shared_ptr<SalBitmap> const & pSalBitmap) - : mxSalBmp(pSalBitmap) +Bitmap::Bitmap(std::shared_ptr<SalBitmap> pSalBitmap) + : mxSalBmp(std::move(pSalBitmap)) , maPrefMapMode(MapMode(MapUnit::MapPixel)) , maPrefSize(mxSalBmp->GetSize()) { diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 7bcc11266719..2f7fa72f8d12 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/builder.hxx> #include <vcl/event.hxx> #include <vcl/cursor.hxx> @@ -120,14 +121,14 @@ struct Impl_IMEInfos bool bCursor; bool bWasCursorOverwrite; - Impl_IMEInfos(sal_Int32 nPos, const OUString& rOldTextAfterStartPos); + Impl_IMEInfos(sal_Int32 nPos, OUString aOldTextAfterStartPos); void CopyAttribs(const ExtTextInputAttr* pA, sal_Int32 nL); void DestroyAttribs(); }; -Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos) - : aOldTextAfterStartPos(rOldTextAfterStartPos), +Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, OUString _aOldTextAfterStartPos) + : aOldTextAfterStartPos(std::move(_aOldTextAfterStartPos)), nPos(nP), nLen(0), bCursor(true), @@ -2275,8 +2276,8 @@ void Edit::ImplHideDDCursor() } } -TextFilter::TextFilter(const OUString &rForbiddenChars) - : sForbiddenChars(rForbiddenChars) +TextFilter::TextFilter(OUString _aForbiddenChars) + : sForbiddenChars(std::move(_aForbiddenChars)) { } diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 54b64373cde0..b344e270572e 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -18,6 +18,7 @@ */ +#include <utility> #include <vcl/toolkit/ivctrl.hxx> #include "imivctl.hxx" #include <vcl/accessiblefactory.hxx> @@ -53,10 +54,10 @@ void collectUIInformation( const OUString& aID, const OUString& aPos) | \*****************************************************************************/ -SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const OUString& rText, - const Image& rImage ) - : aImage(rImage) - , aText(rText) +SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( OUString _aText, + Image _aImage ) + : aImage(std::move(_aImage)) + , aText(std::move(_aText)) , nPos(0) , pblink(nullptr) , pflink(nullptr) diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index 3cf859704281..bf29c1443de7 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -23,6 +23,7 @@ #include <cstddef> +#include <utility> #include <vcl/textdata.hxx> #include "textdat2.hxx" @@ -316,8 +317,8 @@ TextHint::TextHint( SfxHintId Id, sal_Int32 nValue ) : SfxHint( Id ), mnValue(nV { } -TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const OUString& rOldTextAfterStartPos ) - : aOldTextAfterStartPos(rOldTextAfterStartPos) +TEIMEInfos::TEIMEInfos( const TextPaM& rPos, OUString _aOldTextAfterStartPos ) + : aOldTextAfterStartPos(std::move(_aOldTextAfterStartPos)) , aPos(rPos) , nLen(0) , bWasCursorOverwrite(false) diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index 9e0c80b96815..c25b6d44ceb3 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -22,6 +22,7 @@ #include <osl/diagnose.h> #include <sal/log.hxx> #include <rtl/ustrbuf.hxx> +#include <utility> // compare function called by QuickSort static bool CompareStart( const std::unique_ptr<TextCharAttrib>& pFirst, const std::unique_ptr<TextCharAttrib>& pSecond ) @@ -132,8 +133,8 @@ void TextCharAttribList::DeleteEmptyAttribs() mbHasEmptyAttribs = false; } -TextNode::TextNode( const OUString& rText ) : - maText( rText ) +TextNode::TextNode( OUString aText ) : + maText(std::move( aText )) { } diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx index 11657463e82a..9857c09f1033 100644 --- a/vcl/source/edit/textdoc.hxx +++ b/vcl/source/edit/textdoc.hxx @@ -72,7 +72,7 @@ class TextNode void CollapseAttribs( sal_Int32 nIndex, sal_Int32 nDelChars ); public: - TextNode( const OUString& rText ); + TextNode( OUString aText ); TextNode( const TextNode& ) = delete; void operator=( const TextNode& ) = delete; diff --git a/vcl/source/edit/textund2.hxx b/vcl/source/edit/textund2.hxx index 729a130ad456..e537f6701435 100644 --- a/vcl/source/edit/textund2.hxx +++ b/vcl/source/edit/textund2.hxx @@ -78,7 +78,7 @@ private: OUString maText; public: - TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr ); + TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, OUString aStr ); virtual void Undo() override; virtual void Redo() override; @@ -95,7 +95,7 @@ private: OUString maText; public: - TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr ); + TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, OUString aStr ); virtual void Undo() override; virtual void Redo() override; diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index 89dd0c50f316..9bc85b73911d 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -22,6 +22,7 @@ #include <strings.hrc> #include <sal/log.hxx> +#include <utility> #include <vcl/texteng.hxx> #include <vcl/textview.hxx> #include <vcl/textdata.hxx> @@ -248,9 +249,9 @@ OUString TextUndoSplitPara::GetComment () const return VclResId(STR_TEXTUNDO_SPLITPARA); } -TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr ) +TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, OUString aStr ) : TextUndo( pTextEngine ), - maTextPaM( rTextPaM ), maText( rStr ) + maTextPaM( rTextPaM ), maText(std::move( aStr )) { } @@ -296,9 +297,9 @@ OUString TextUndoInsertChars::GetComment () const return VclResId(STR_TEXTUNDO_INSERTCHARS).replaceAll("$1", sText); } -TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr ) +TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, OUString aStr ) : TextUndo( pTextEngine ), - maTextPaM( rTextPaM ), maText( rStr ) + maTextPaM( rTextPaM ), maText(std::move( aStr )) { } diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index ef83beab49ca..78454f0ce495 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -20,6 +20,7 @@ #include <memory> #include <i18nutil/searchopt.hxx> #include <o3tl/deleter.hxx> +#include <utility> #include <vcl/textview.hxx> #include <vcl/texteng.hxx> #include <vcl/settings.hxx> @@ -62,7 +63,7 @@ #include <algorithm> #include <cstddef> -TETextDataObject::TETextDataObject( const OUString& rText ) : maText( rText ) +TETextDataObject::TETextDataObject( OUString aText ) : maText(std::move( aText )) { } diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index 6ef3d3015817..6d7f897de0d4 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -25,6 +25,7 @@ #include <graphic/DetectorTools.hxx> #include <tools/solar.h> #include <tools/zcodec.hxx> +#include <utility> constexpr sal_uInt32 SVG_CHECK_SIZE = 2048; constexpr sal_uInt32 WMF_EMF_CHECK_SIZE = 44; @@ -337,9 +338,9 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen) } // end anonymous namespace -GraphicFormatDetector::GraphicFormatDetector(SvStream& rStream, OUString const& rFormatExtension) +GraphicFormatDetector::GraphicFormatDetector(SvStream& rStream, OUString aFormatExtension) : mrStream(rStream) - , maExtension(rFormatExtension) + , maExtension(std::move(aFormatExtension)) , mnFirstLong(0) , mnSecondLong(0) , mnStreamPosition(0) diff --git a/vcl/source/font/Feature.cxx b/vcl/source/font/Feature.cxx index ba4b09a5def0..ac2592f12f99 100644 --- a/vcl/source/font/Feature.cxx +++ b/vcl/source/font/Feature.cxx @@ -94,11 +94,11 @@ FeatureDefinition::FeatureDefinition() { } -FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString const& rDescription, +FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString aDescription, FeatureParameterType eType, std::vector<FeatureParameter>&& rEnumParameters, uint32_t nDefault) - : m_sDescription(rDescription) + : m_sDescription(std::move(aDescription)) , m_nCode(nCode) , m_nDefault(nDefault) , m_eType(eType) @@ -107,9 +107,9 @@ FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString const& rDescriptio } FeatureDefinition::FeatureDefinition(uint32_t nCode, TranslateId pDescriptionID, - OUString const& rNumericPart) + OUString aNumericPart) : m_pDescriptionID(pDescriptionID) - , m_sNumericPart(rNumericPart) + , m_sNumericPart(std::move(aNumericPart)) , m_nCode(nCode) , m_nDefault(0) , m_eType(FeatureParameterType::BOOL) diff --git a/vcl/source/font/FontSelectPattern.cxx b/vcl/source/font/FontSelectPattern.cxx index 23e7673c8da2..30c2c9aaa574 100644 --- a/vcl/source/font/FontSelectPattern.cxx +++ b/vcl/source/font/FontSelectPattern.cxx @@ -21,6 +21,7 @@ #include <o3tl/safeint.hxx> #include <tools/gen.hxx> +#include <utility> #include <vcl/font.hxx> #include <font/FontSelectPattern.hxx> @@ -34,8 +35,8 @@ const char FontSelectPattern::FEAT_PREFIX = ':'; const char FontSelectPattern::FEAT_SEPARATOR = '&'; FontSelectPattern::FontSelectPattern( const vcl::Font& rFont, - const OUString& rSearchName, const Size& rSize, float fExactHeight, bool bNonAntialias) - : maSearchName( rSearchName ) + OUString aSearchName, const Size& rSize, float fExactHeight, bool bNonAntialias) + : maSearchName(std::move( aSearchName )) , mnWidth( rSize.Width() ) , mnHeight( rSize.Height() ) , mfExactHeight( fExactHeight) diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index b402cd6185e8..b95cbc117bd7 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -24,6 +24,7 @@ #include <font/PhysicalFontFaceCollection.hxx> #include <font/PhysicalFontCollection.hxx> +#include <utility> namespace vcl::font { @@ -92,8 +93,8 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName ) return ImplFontAttrs::None; } -PhysicalFontFamily::PhysicalFontFamily( const OUString& rSearchName ) -: maSearchName( rSearchName ), +PhysicalFontFamily::PhysicalFontFamily( OUString aSearchName ) +: maSearchName(std::move( aSearchName )), mnTypeFaces( FontTypeFaces::NONE ), meFamily( FAMILY_DONTKNOW ), mePitch( PITCH_DONTKNOW ), diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 7ca3e56a2f8c..d1d022c26eed 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -15,6 +15,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/fontcharmap.hxx> #include <impfontcharmap.hxx> #include <rtl/textcvt.h> @@ -431,8 +432,8 @@ FontCharMap::FontCharMap() { } -FontCharMap::FontCharMap( ImplFontCharMapRef const & pIFCMap ) - : mpImplFontCharMap( pIFCMap ) +FontCharMap::FontCharMap( ImplFontCharMapRef pIFCMap ) + : mpImplFontCharMap(std::move( pIFCMap )) { } diff --git a/vcl/source/gdi/WidgetDefinition.cxx b/vcl/source/gdi/WidgetDefinition.cxx index 3c93f1ac5601..bd6019815e0f 100644 --- a/vcl/source/gdi/WidgetDefinition.cxx +++ b/vcl/source/gdi/WidgetDefinition.cxx @@ -8,6 +8,7 @@ * */ +#include <utility> #include <widgetdraw/WidgetDefinition.hxx> #include <sal/config.h> @@ -122,18 +123,17 @@ WidgetDefinitionPart::getStates(ControlType eType, ControlPart ePart, ControlSta return aStatesToAdd; } -WidgetDefinitionState::WidgetDefinitionState(OString const& sEnabled, OString const& sFocused, - OString const& sPressed, OString const& sRollover, - OString const& sDefault, OString const& sSelected, - OString const& sButtonValue, OString const& sExtra) - : msEnabled(sEnabled) - , msFocused(sFocused) - , msPressed(sPressed) - , msRollover(sRollover) - , msDefault(sDefault) - , msSelected(sSelected) - , msButtonValue(sButtonValue) - , msExtra(sExtra) +WidgetDefinitionState::WidgetDefinitionState(OString sEnabled, OString sFocused, OString sPressed, + OString sRollover, OString sDefault, OString sSelected, + OString sButtonValue, OString sExtra) + : msEnabled(std::move(sEnabled)) + , msFocused(std::move(sFocused)) + , msPressed(std::move(sPressed)) + , msRollover(std::move(sRollover)) + , msDefault(std::move(sDefault)) + , msSelected(std::move(sSelected)) + , msButtonValue(std::move(sButtonValue)) + , msExtra(std::move(sExtra)) { } diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx index 4f68c35e4de5..6227e15dad08 100644 --- a/vcl/source/gdi/WidgetDefinitionReader.cxx +++ b/vcl/source/gdi/WidgetDefinitionReader.cxx @@ -8,6 +8,7 @@ * */ +#include <utility> #include <widgetdraw/WidgetDefinitionReader.hxx> #include <sal/config.h> @@ -185,10 +186,9 @@ bool getControlTypeForXmlString(OString const& rString, ControlType& reType) } // end anonymous namespace -WidgetDefinitionReader::WidgetDefinitionReader(OUString const& rDefinitionFile, - OUString const& rResourcePath) - : m_rDefinitionFile(rDefinitionFile) - , m_rResourcePath(rResourcePath) +WidgetDefinitionReader::WidgetDefinitionReader(OUString aDefinitionFile, OUString aResourcePath) + : m_rDefinitionFile(std::move(aDefinitionFile)) + , m_rResourcePath(std::move(aResourcePath)) { } diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index e959e465149a..39467b25dc69 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -20,6 +20,7 @@ #include <sal/log.hxx> #include <tools/stream.hxx> #include <tools/vcompat.hxx> +#include <utility> #include <vcl/graph.hxx> #include <vcl/gfxlink.hxx> #include <vcl/graphicfilter.hxx> @@ -45,10 +46,10 @@ GfxLink::GfxLink(std::unique_ptr<sal_uInt8[]> pBuf, sal_uInt32 nSize, GfxLinkTyp { } -GfxLink::GfxLink(BinaryDataContainer const & rDataConainer, GfxLinkType nType) +GfxLink::GfxLink(BinaryDataContainer aDataConainer, GfxLinkType nType) : meType(nType) , mnUserId(0) - , maDataContainer(rDataConainer) + , maDataContainer(std::move(aDataConainer)) , maHash(0) , mbPrefMapModeValid(false) , mbPrefSizeValid(false) diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx index b14f4263cfcb..8308da0415f5 100644 --- a/vcl/source/gdi/graphictools.cxx +++ b/vcl/source/gdi/graphictools.cxx @@ -19,6 +19,7 @@ #include <tools/stream.hxx> #include <tools/vcompat.hxx> +#include <utility> #include <vcl/TypeSerializer.hxx> #include <vcl/graphictools.hxx> @@ -37,18 +38,18 @@ SvtGraphicStroke::SvtGraphicStroke() : { } -SvtGraphicStroke::SvtGraphicStroke( const tools::Polygon& rPath, - const tools::PolyPolygon& rStartArrow, - const tools::PolyPolygon& rEndArrow, +SvtGraphicStroke::SvtGraphicStroke( tools::Polygon aPath, + tools::PolyPolygon aStartArrow, + tools::PolyPolygon aEndArrow, double fTransparency, double fStrokeWidth, CapType aCap, JoinType aJoin, double fMiterLimit, DashArray&& rDashArray ) : - maPath( rPath ), - maStartArrow( rStartArrow ), - maEndArrow( rEndArrow ), + maPath(std::move( aPath )), + maStartArrow(std::move( aStartArrow )), + maEndArrow(std::move( aEndArrow )), mfTransparency( fTransparency ), mfStrokeWidth( fStrokeWidth ), maCapType( aCap ), @@ -171,7 +172,7 @@ SvtGraphicFill::SvtGraphicFill() : { } -SvtGraphicFill::SvtGraphicFill( const tools::PolyPolygon& rPath, +SvtGraphicFill::SvtGraphicFill( tools::PolyPolygon aPath, Color aFillColor, double fTransparency, FillRule aFillRule, @@ -184,8 +185,8 @@ SvtGraphicFill::SvtGraphicFill( const tools::PolyPolygon& rPath, Color aGradient1stColor, Color aGradient2ndColor, sal_Int32 aGradientStepCount, - const Graphic& aFillGraphic ) : - maPath( rPath ), + Graphic aFillGraphic ) : + maPath(std::move( aPath )), maFillColor( aFillColor ), mfTransparency( fTransparency ), maFillRule( aFillRule ), @@ -198,7 +199,7 @@ SvtGraphicFill::SvtGraphicFill( const tools::PolyPolygon& rPath, maGradient1stColor( aGradient1stColor ), maGradient2ndColor( aGradient2ndColor ), maGradientStepCount( aGradientStepCount ), - maFillGraphic( aFillGraphic ) + maFillGraphic(std::move( aFillGraphic )) { } diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 124ae16f2e20..94da485276ae 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -18,6 +18,7 @@ */ #include <impglyphitem.hxx> +#include <utility> #include <vcl/glyphitemcache.hxx> #include <vcl/vcllayout.hxx> #include <vcl/lazydelete.hxx> @@ -488,9 +489,9 @@ SalLayoutGlyphsCache::GetLayoutGlyphs(VclPtr<const OutputDevice> outputDevice, c } SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey( - const VclPtr<const OutputDevice>& outputDevice, const OUString& t, sal_Int32 i, sal_Int32 l, + const VclPtr<const OutputDevice>& outputDevice, OUString t, sal_Int32 i, sal_Int32 l, tools::Long w) - : text(t) + : text(std::move(t)) , index(i) , len(l) , logicWidth(w) diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 5d7740e2c440..b790b4d40c14 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -31,6 +31,7 @@ #include <unotools/ucbhelper.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/tempfile.hxx> +#include <utility> #include <vcl/filter/SvmReader.hxx> #include <vcl/filter/SvmWriter.hxx> #include <vcl/outdev.hxx> @@ -64,9 +65,9 @@ private: OUString maOriginURL; public: - ImpSwapFile(INetURLObject const & rSwapURL, OUString const & rOriginURL) + ImpSwapFile(INetURLObject const & rSwapURL, OUString aOriginURL) : SwapFile(rSwapURL) - , maOriginURL(rOriginURL) + , maOriginURL(std::move(aOriginURL)) { } @@ -134,8 +135,8 @@ ImpGraphic::ImpGraphic(ImpGraphic&& rImpGraphic) noexcept rImpGraphic.mbDummyContext = false; } -ImpGraphic::ImpGraphic(std::shared_ptr<GfxLink> const & rGfxLink, sal_Int32 nPageIndex) - : mpGfxLink(rGfxLink) +ImpGraphic::ImpGraphic(std::shared_ptr<GfxLink> xGfxLink, sal_Int32 nPageIndex) + : mpGfxLink(std::move(xGfxLink)) , meType(GraphicType::Bitmap) , mnSizeBytes(0) , mbSwapOut(true) @@ -151,12 +152,12 @@ ImpGraphic::ImpGraphic(std::shared_ptr<GfxLink> const & rGfxLink, sal_Int32 nPag maSwapInfo.mnPageIndex = nPageIndex; } -ImpGraphic::ImpGraphic(GraphicExternalLink const & rGraphicExternalLink) : +ImpGraphic::ImpGraphic(GraphicExternalLink aGraphicExternalLink) : meType ( GraphicType::Default ), mnSizeBytes ( 0 ), mbSwapOut ( false ), mbDummyContext ( false ), - maGraphicExternalLink(rGraphicExternalLink), + maGraphicExternalLink(std::move(aGraphicExternalLink)), maLastUsed (std::chrono::high_resolution_clock::now()), mbPrepared (false) { diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 9a85d805b41a..f9d698b420e4 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -24,6 +24,7 @@ #include <tools/stream.hxx> #include <tools/vcompat.hxx> #include <tools/helpers.hxx> +#include <utility> #include <vcl/dibtools.hxx> #include <vcl/filter/SvmReader.hxx> #include <vcl/filter/SvmWriter.hxx> @@ -191,9 +192,9 @@ MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) : {} MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd, - const LineInfo& rLineInfo ) : + LineInfo aLineInfo ) : MetaAction ( MetaActionType::LINE ), - maLineInfo ( rLineInfo ), + maLineInfo (std::move( aLineInfo )), maStartPt ( rStart ), maEndPt ( rEnd ) {} @@ -451,15 +452,15 @@ MetaPolyLineAction::MetaPolyLineAction() : MetaPolyLineAction::~MetaPolyLineAction() {} -MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly ) : +MetaPolyLineAction::MetaPolyLineAction( tools::Polygon aPoly ) : MetaAction ( MetaActionType::POLYLINE ), - maPoly ( rPoly ) + maPoly (std::move( aPoly )) {} -MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) : +MetaPolyLineAction::MetaPolyLineAction( tools::Polygon aPoly, LineInfo aLineInfo ) : MetaAction ( MetaActionType::POLYLINE ), - maLineInfo ( rLineInfo ), - maPoly ( rPoly ) + maLineInfo (std::move( aLineInfo )), + maPoly (std::move( aPoly )) {} void MetaPolyLineAction::Execute( OutputDevice* pOut ) @@ -493,9 +494,9 @@ MetaPolygonAction::MetaPolygonAction() : MetaPolygonAction::~MetaPolygonAction() {} -MetaPolygonAction::MetaPolygonAction( const tools::Polygon& rPoly ) : +MetaPolygonAction::MetaPolygonAction( tools::Polygon aPoly ) : MetaAction ( MetaActionType::POLYGON ), - maPoly ( rPoly ) + maPoly (std::move( aPoly )) {} void MetaPolygonAction::Execute( OutputDevice* pOut ) @@ -525,9 +526,9 @@ MetaPolyPolygonAction::MetaPolyPolygonAction() : MetaPolyPolygonAction::~MetaPolyPolygonAction() {} -MetaPolyPolygonAction::MetaPolyPolygonAction( const tools::PolyPolygon& rPolyPoly ) : +MetaPolyPolygonAction::MetaPolyPolygonAction( tools::PolyPolygon aPolyPoly ) : MetaAction ( MetaActionType::POLYPOLYGON ), - maPolyPoly ( rPolyPoly ) + maPolyPoly (std::move( aPolyPoly )) {} void MetaPolyPolygonAction::Execute( OutputDevice* pOut ) @@ -560,11 +561,11 @@ MetaTextAction::MetaTextAction() : MetaTextAction::~MetaTextAction() {} -MetaTextAction::MetaTextAction( const Point& rPt, const OUString& rStr, +MetaTextAction::MetaTextAction( const Point& rPt, OUString aStr, sal_Int32 nIndex, sal_Int32 nLen ) : MetaAction ( MetaActionType::TEXT ), maPt ( rPt ), - maStr ( rStr ), + maStr (std::move( aStr )), mnIndex ( nIndex ), mnLen ( nLen ) {} @@ -606,27 +607,27 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : } MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, - const OUString& rStr, - const std::vector<sal_Int32>& rDXAry, + OUString aStr, + std::vector<sal_Int32> aDXAry, sal_Int32 nIndex, sal_Int32 nLen ) : MetaAction ( MetaActionType::TEXTARRAY ), maStartPt ( rStartPt ), - maStr ( rStr ), - maDXAry ( rDXAry ), + maStr (std::move( aStr )), + maDXAry (std::move( aDXAry )), mnIndex ( nIndex ), mnLen ( nLen ) { } MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, - const OUString& rStr, + OUString aStr, o3tl::span<const sal_Int32> pDXAry, sal_Int32 nIndex, sal_Int32 nLen ) : MetaAction ( MetaActionType::TEXTARRAY ), maStartPt ( rStartPt ), - maStr ( rStr ), + maStr (std::move( aStr )), maDXAry ( pDXAry.begin(), pDXAry.end() ), mnIndex ( nIndex ), mnLen ( nLen ) @@ -679,11 +680,11 @@ MetaStretchTextAction::~MetaStretchTextAction() {} MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth, - const OUString& rStr, + OUString aStr, sal_Int32 nIndex, sal_Int32 nLen ) : MetaAction ( MetaActionType::STRETCHTEXT ), maPt ( rPt ), - maStr ( rStr ), + maStr (std::move( aStr )), mnWidth ( nWidth ), mnIndex ( nIndex ), mnLen ( nLen ) @@ -718,10 +719,10 @@ MetaTextRectAction::~MetaTextRectAction() {} MetaTextRectAction::MetaTextRectAction( const tools::Rectangle& rRect, - const OUString& rStr, DrawTextFlags nStyle ) : + OUString aStr, DrawTextFlags nStyle ) : MetaAction ( MetaActionType::TEXTRECT ), maRect ( rRect ), - maStr ( rStr ), + maStr (std::move( aStr )), mnStyle ( nStyle ) {} @@ -1183,10 +1184,10 @@ MetaGradientAction::MetaGradientAction() : MetaGradientAction::~MetaGradientAction() {} -MetaGradientAction::MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient ) : +MetaGradientAction::MetaGradientAction( const tools::Rectangle& rRect, Gradient aGradient ) : MetaAction ( MetaActionType::GRADIENT ), maRect ( rRect ), - maGradient ( rGradient ) + maGradient (std::move( aGradient )) {} void MetaGradientAction::Execute( OutputDevice* pOut ) @@ -1213,10 +1214,10 @@ MetaGradientExAction::MetaGradientExAction() : MetaAction ( MetaActionType::GRADIENTEX ) {} -MetaGradientExAction::MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) : +MetaGradientExAction::MetaGradientExAction( tools::PolyPolygon aPolyPoly, Gradient aGradient ) : MetaAction ( MetaActionType::GRADIENTEX ), - maPolyPoly ( rPolyPoly ), - maGradient ( rGradient ) + maPolyPoly (std::move( aPolyPoly )), + maGradient (std::move( aGradient )) {} MetaGradientExAction::~MetaGradientExAction() @@ -1253,9 +1254,9 @@ MetaHatchAction::MetaHatchAction() : MetaHatchAction::~MetaHatchAction() {} -MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) : +MetaHatchAction::MetaHatchAction( tools::PolyPolygon aPolyPoly, const Hatch& rHatch ) : MetaAction ( MetaActionType::HATCH ), - maPolyPoly ( rPolyPoly ), + maPolyPoly (std::move( aPolyPoly )), maHatch ( rHatch ) {} @@ -1288,10 +1289,10 @@ MetaWallpaperAction::~MetaWallpaperAction() {} MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect, - const Wallpaper& rPaper ) : + Wallpaper aPaper ) : MetaAction ( MetaActionType::WALLPAPER ), maRect ( rRect ), - maWallpaper ( rPaper ) + maWallpaper (std::move( aPaper )) {} void MetaWallpaperAction::Execute( OutputDevice* pOut ) @@ -1322,9 +1323,9 @@ MetaClipRegionAction::MetaClipRegionAction() : MetaClipRegionAction::~MetaClipRegionAction() {} -MetaClipRegionAction::MetaClipRegionAction( const vcl::Region& rRegion, bool bClip ) : +MetaClipRegionAction::MetaClipRegionAction( vcl::Region aRegion, bool bClip ) : MetaAction ( MetaActionType::CLIPREGION ), - maRegion ( rRegion ), + maRegion (std::move( aRegion )), mbClip ( bClip ) {} @@ -1390,9 +1391,9 @@ MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction() : MetaISectRegionClipRegionAction::~MetaISectRegionClipRegionAction() {} -MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const vcl::Region& rRegion ) : +MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( vcl::Region aRegion ) : MetaAction ( MetaActionType::ISECTREGIONCLIPREGION ), - maRegion ( rRegion ) + maRegion (std::move( aRegion )) { } @@ -1664,9 +1665,9 @@ MetaFontAction::MetaFontAction() : MetaFontAction::~MetaFontAction() {} -MetaFontAction::MetaFontAction( const vcl::Font& rFont ) : +MetaFontAction::MetaFontAction( vcl::Font aFont ) : MetaAction ( MetaActionType::FONT ), - maFont ( rFont ) + maFont (std::move( aFont )) { // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font, // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems @@ -1769,9 +1770,9 @@ MetaTransparentAction::MetaTransparentAction() : MetaTransparentAction::~MetaTransparentAction() {} -MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) : +MetaTransparentAction::MetaTransparentAction( tools::PolyPolygon aPolyPoly, sal_uInt16 nTransPercent ) : MetaAction ( MetaActionType::Transparent ), - maPolyPoly ( rPolyPoly ), + maPolyPoly (std::move( aPolyPoly )), mnTransPercent ( nTransPercent ) {} @@ -1804,12 +1805,12 @@ MetaFloatTransparentAction::~MetaFloatTransparentAction() {} MetaFloatTransparentAction::MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos, - const Size& rSize, const Gradient& rGradient ) : + const Size& rSize, Gradient aGradient ) : MetaAction ( MetaActionType::FLOATTRANSPARENT ), maMtf ( rMtf ), maPoint ( rPos ), maSize ( rSize ), - maGradient ( rGradient ) + maGradient (std::move( aGradient )) {} void MetaFloatTransparentAction::Execute( OutputDevice* pOut ) @@ -1843,9 +1844,9 @@ MetaEPSAction::~MetaEPSAction() {} ... etc. - the rest is truncated