diff options
Diffstat (limited to 'vcl/source')
45 files changed, 227 insertions, 188 deletions
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() {} MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize, - const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) : + GfxLink aGfxLink, const GDIMetaFile& rSubst ) : MetaAction ( MetaActionType::EPS ), - maGfxLink ( rGfxLink ), + maGfxLink (std::move( aGfxLink )), maSubst ( rSubst ), maPoint ( rPoint ), maSize ( rSize ) @@ -1916,9 +1917,9 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) : ImplInitDynamicData( rAct.mpData.get(), rAct.mnDataSize ); } -MetaCommentAction::MetaCommentAction( const OString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) : +MetaCommentAction::MetaCommentAction( OString aComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) : MetaAction ( MetaActionType::COMMENT ), - maComment ( rComment ), + maComment (std::move( aComment )), mnValue ( nValue ) { ImplInitDynamicData( pData, nDataSize ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index ae78eda251e5..514b0506ac68 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -59,6 +59,7 @@ #include <tools/urlobj.hxx> #include <tools/zcodec.hxx> #include <svl/cryptosign.hxx> +#include <utility> #include <vcl/bitmapex.hxx> #include <vcl/canvastools.hxx> #include <vcl/cvtgrf.hxx> @@ -1191,7 +1192,7 @@ double PDFPage::getHeight() const return fRet; } -PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, +PDFWriterImpl::PDFWriterImpl( PDFWriter::PDFWriterContext aContext, const css::uno::Reference< css::beans::XMaterialHolder >& xEnc, PDFWriter& i_rOuterFace) : VirtualDevice(Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::NONE, OUTDEV_PDF), @@ -1208,7 +1209,7 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, m_nSignatureLastByteRangeNoOffset( 0 ), m_nResourceDict( -1 ), m_nFontDictObject( -1 ), - m_aContext(rContext), + m_aContext(std::move(aContext)), m_aFile(m_aContext.URL), m_bOpen(false), m_DocDigest(::comphelper::HashType::MD5), diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index c02023dd1aef..3a467484d00f 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -27,6 +27,7 @@ #include <tools/debug.hxx> #include <tools/urlobj.hxx> +#include <utility> #include <vcl/metaact.hxx> #include <vcl/print.hxx> #include <vcl/printer/Options.hxx> @@ -302,9 +303,9 @@ struct PrintJobAsync std::shared_ptr<PrinterController> mxController; JobSetup maInitSetup; - PrintJobAsync(const std::shared_ptr<PrinterController>& i_xController, + PrintJobAsync(std::shared_ptr<PrinterController> i_xController, const JobSetup& i_rInitSetup) - : mxController( i_xController ), maInitSetup( i_rInitSetup ) + : mxController(std::move( i_xController )), maInitSetup( i_rInitSetup ) {} DECL_LINK( ExecJob, void*, void ); diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 9ad27f9cacd8..8f1514450111 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -20,6 +20,7 @@ #include <tools/diagnose_ex.h> #include <tools/stream.hxx> #include <sal/log.hxx> +#include <utility> #include <vcl/vectorgraphicdata.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -293,10 +294,10 @@ std::pair<VectorGraphicData::State, size_t> VectorGraphicData::getSizeBytes() co } VectorGraphicData::VectorGraphicData( - const BinaryDataContainer& rDataContainer, + BinaryDataContainer aDataContainer, VectorGraphicDataType eVectorDataType, sal_Int32 nPageIndex) -: maDataContainer(rDataContainer), +: maDataContainer(std::move(aDataContainer)), mbSequenceCreated(false), mNestedBitmapSize(0), meType(eVectorDataType), diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index 413355e60680..4eac9f772bd2 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -25,6 +25,7 @@ #include <osl/diagnose.h> #include <tools/fract.hxx> #include <tools/helpers.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/metaact.hxx> #include <vcl/GraphicObject.hxx> @@ -292,16 +293,16 @@ struct GrfSimpleCacheObj Graphic maGraphic; GraphicAttr maAttr; - GrfSimpleCacheObj( const Graphic& rGraphic, const GraphicAttr& rAttr ) : - maGraphic( rGraphic ), maAttr( rAttr ) {} + GrfSimpleCacheObj( Graphic aGraphic, const GraphicAttr& rAttr ) : + maGraphic(std::move( aGraphic )), maAttr( rAttr ) {} }; GraphicObject::GraphicObject() { } -GraphicObject::GraphicObject(const Graphic& rGraphic) - : maGraphic(rGraphic) +GraphicObject::GraphicObject(Graphic aGraphic) + : maGraphic(std::move(aGraphic)) { } diff --git a/vcl/source/graphic/VectorGraphicSearch.cxx b/vcl/source/graphic/VectorGraphicSearch.cxx index 710c6e5f52e6..6d26fd861fd7 100644 --- a/vcl/source/graphic/VectorGraphicSearch.cxx +++ b/vcl/source/graphic/VectorGraphicSearch.cxx @@ -8,6 +8,7 @@ * */ +#include <utility> #include <vcl/VectorGraphicSearch.hxx> #include <vcl/filter/PDFiumLibrary.hxx> @@ -191,9 +192,9 @@ public: ~Implementation() { mpSearchContext.reset(); } }; -VectorGraphicSearch::VectorGraphicSearch(Graphic const& rGraphic) +VectorGraphicSearch::VectorGraphicSearch(Graphic aGraphic) : mpImplementation(std::make_unique<VectorGraphicSearch::Implementation>()) - , maGraphic(rGraphic) + , maGraphic(std::move(aGraphic)) { } diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx index 855376dc1fb5..e17b45e7a922 100644 --- a/vcl/source/helper/driverblocklist.cxx +++ b/vcl/source/helper/driverblocklist.cxx @@ -13,6 +13,7 @@ #include <string_view> #include <sal/log.hxx> +#include <utility> #ifdef _WIN32 #if !defined WIN32_LEAN_AND_MEAN @@ -179,10 +180,10 @@ std::string_view GetVendorNameFromId(uint32_t id) } } -Parser::Parser(const OUString& rURL, std::vector<DriverInfo>& rDriverList, VersionType versionType) +Parser::Parser(OUString aURL, std::vector<DriverInfo>& rDriverList, VersionType versionType) : meBlockType(BlockType::UNKNOWN) , mrDriverList(rDriverList) - , maURL(rURL) + , maURL(std::move(aURL)) , mVersionType(versionType) { } @@ -558,8 +559,8 @@ namespace { struct compareIgnoreAsciiCase { - explicit compareIgnoreAsciiCase(const OUString& rString) - : maString(rString) + explicit compareIgnoreAsciiCase(OUString aString) + : maString(std::move(aString)) { } @@ -585,11 +586,11 @@ DriverInfo::DriverInfo() { } -DriverInfo::DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op, +DriverInfo::DriverInfo(OperatingSystem os, OUString vendor, VersionComparisonOp op, uint64_t driverVersion, bool bAllowlisted, const char* suggestedVersion /* = nullptr */) : meOperatingSystem(os) - , maAdapterVendor(vendor) + , maAdapterVendor(std::move(vendor)) , mbAllowlisted(bAllowlisted) , meComparisonOp(op) , mnDriverVersion(driverVersion) diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx index a5637c3bb452..65ce3ca0c441 100644 --- a/vcl/source/image/ImplImage.cxx +++ b/vcl/source/image/ImplImage.cxx @@ -18,6 +18,7 @@ */ #include <sal/log.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/bitmapex.hxx> #include <vcl/settings.hxx> @@ -35,9 +36,9 @@ ImplImage::ImplImage(const BitmapEx &rBitmapEx) { } -ImplImage::ImplImage(const OUString &aStockName) +ImplImage::ImplImage(OUString aStockName) : maBitmapChecksum(0) - , maStockName(aStockName) + , maStockName(std::move(aStockName)) { } diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 5f2d1e94af6a..94105a48545d 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -46,6 +46,7 @@ #include <tools/urlobj.hxx> #include <implimagetree.hxx> +#include <utility> #include <vcl/bitmapex.hxx> #include <vcl/dibtools.hxx> #include <vcl/settings.hxx> @@ -647,8 +648,8 @@ class FolderFileAccess : public ::cppu::WeakImplHelper<css::container::XNameAcce public: uno::Reference< uno::XComponentContext > mxContext; OUString maURL; - FolderFileAccess(uno::Reference< uno::XComponentContext > const & context, OUString const & url) - : mxContext(context), maURL(url) {} + FolderFileAccess(uno::Reference< uno::XComponentContext > context, OUString url) + : mxContext(std::move(context)), maURL(std::move(url)) {} // XElementAccess virtual css::uno::Type SAL_CALL getElementType() override { return cppu::UnoType<io::XInputStream>::get(); } virtual sal_Bool SAL_CALL hasElements() override { return true; } diff --git a/vcl/source/text/ImplLayoutArgs.cxx b/vcl/source/text/ImplLayoutArgs.cxx index dbdc6e18f5a0..80e85a66dc26 100644 --- a/vcl/source/text/ImplLayoutArgs.cxx +++ b/vcl/source/text/ImplLayoutArgs.cxx @@ -24,13 +24,14 @@ #include <algorithm> #include <memory> +#include <utility> namespace vcl::text { ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr, int nMinCharPos, int nEndCharPos, - SalLayoutFlags nFlags, const LanguageTag& rLanguageTag, + SalLayoutFlags nFlags, LanguageTag aLanguageTag, vcl::text::TextLayoutCache const* const pLayoutCache) - : maLanguageTag(rLanguageTag) + : maLanguageTag(std::move(aLanguageTag)) , mnFlags(nFlags) , mrStr(rStr) , mnMinCharPos(nMinCharPos) diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx index 84a0717c6252..034d9655f7af 100644 --- a/vcl/source/treelist/imap.cxx +++ b/vcl/source/treelist/imap.cxx @@ -21,6 +21,7 @@ #include <tools/urlobj.hxx> #include <tools/fract.hxx> #include <tools/GenericTypeSerializer.hxx> +#include <utility> #include <vcl/outdev.hxx> #include <vcl/svapp.hxx> #include <vcl/mapmod.hxx> @@ -51,13 +52,13 @@ IMapObject::IMapObject() { } -IMapObject::IMapObject( const OUString& rURL, const OUString& rAltText, const OUString& rDesc, - const OUString& rTarget, const OUString& rName, bool bURLActive ) -: aURL( rURL ) -, aAltText( rAltText ) -, aDesc( rDesc ) -, aTarget( rTarget ) -, aName( rName ) +IMapObject::IMapObject( OUString _aURL, OUString _aAltText, OUString _aDesc, + OUString _aTarget, OUString _aName, bool bURLActive ) +: aURL(std::move( _aURL )) +, aAltText(std::move( _aAltText )) +, aDesc(std::move( _aDesc )) +, aTarget(std::move( _aTarget )) +, aName(std::move( _aName )) , bActive( bURLActive ) , nReadVersion( 0 ) { @@ -550,8 +551,8 @@ bool IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj ) |* \******************************************************************************/ -ImageMap::ImageMap( const OUString& rName ) -: aName( rName ) +ImageMap::ImageMap( OUString _aName ) +: aName(std::move( _aName )) { } diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx index 75d2bb4cf03a..ef6250a767cd 100644 --- a/vcl/source/treelist/svlbitm.cxx +++ b/vcl/source/treelist/svlbitm.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/toolkit/treelistbox.hxx> #include <vcl/toolkit/svlbitm.hxx> #include <vcl/toolkit/treelistentry.hxx> @@ -167,11 +168,11 @@ bool SvLBoxButtonData::IsRadio() const { // *************************************************************** -SvLBoxString::SvLBoxString(const OUString& rStr) +SvLBoxString::SvLBoxString(OUString aStr) : mbEmphasized(false) , mbCustom(false) , mfAlign(0.0) - , maText(rStr) + , maText(std::move(aStr)) { } diff --git a/vcl/source/window/bubblewindow.cxx b/vcl/source/window/bubblewindow.cxx index 1a4a46a3fea2..00a20714e0cf 100644 --- a/vcl/source/window/bubblewindow.cxx +++ b/vcl/source/window/bubblewindow.cxx @@ -18,6 +18,7 @@ */ #include <rtl/ustrbuf.hxx> +#include <utility> #include <vcl/menubarupdateicon.hxx> #include <vcl/lineinfo.hxx> #include <vcl/settings.hxx> @@ -33,15 +34,15 @@ #define TEXT_MAX_WIDTH 300 #define TEXT_MAX_HEIGHT 200 -BubbleWindow::BubbleWindow( vcl::Window* pParent, const OUString& rTitle, - const OUString& rText, const Image& rImage ) +BubbleWindow::BubbleWindow( vcl::Window* pParent, OUString aTitle, + OUString aText, Image aImage ) : FloatingWindow( pParent, WB_SYSTEMWINDOW | WB_OWNERDRAWDECORATION | WB_NOBORDER ) - , maBubbleTitle( rTitle ) - , maBubbleText( rText ) - , maBubbleImage( rImage ) + , maBubbleTitle(std::move( aTitle )) + , maBubbleText(std::move( aText )) + , maBubbleImage(std::move( aImage )) , maMaxTextSize( TEXT_MAX_WIDTH, TEXT_MAX_HEIGHT ) , mnTipOffset( 0 ) { diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index d25426cedbe7..0afa10535670 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -24,6 +24,7 @@ #include <sal/log.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/resmgr.hxx> +#include <utility> #include <vcl/builder.hxx> #include <vcl/dialoghelper.hxx> #include <vcl/menu.hxx> @@ -442,19 +443,19 @@ namespace weld } VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUString& sUIFile, - const OString& sID, const css::uno::Reference<css::frame::XFrame>& rFrame, + OString sID, css::uno::Reference<css::frame::XFrame> xFrame, bool bLegacy, const NotebookBarAddonsItem* pNotebookBarAddonsItem) : m_pNotebookBarAddonsItem(pNotebookBarAddonsItem ? new NotebookBarAddonsItem(*pNotebookBarAddonsItem) : new NotebookBarAddonsItem{}) - , m_sID(sID) + , m_sID(std::move(sID)) , m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8)) , m_pStringReplace(Translate::GetReadStringHook()) , m_pParent(pParent) , m_bToplevelParentFound(false) , m_bLegacy(bLegacy) , m_pParserState(new ParserState) - , m_xFrame(rFrame) + , m_xFrame(std::move(xFrame)) { m_bToplevelHasDeferredInit = pParent && ((pParent->IsSystemWindow() && static_cast<SystemWindow*>(pParent)->isDeferredInit()) || @@ -4394,8 +4395,8 @@ VclBuilder::ParserState::ParserState() , m_nLastMenuItemId(0) {} -VclBuilder::MenuAndId::MenuAndId(const OString &rId, Menu *pMenu) - : m_sID(rId) +VclBuilder::MenuAndId::MenuAndId(OString aId, Menu *pMenu) + : m_sID(std::move(aId)) , m_pMenu(pMenu) {} diff --git a/vcl/source/window/commandevent.cxx b/vcl/source/window/commandevent.cxx index 812409ca1307..e38b526a623d 100644 --- a/vcl/source/window/commandevent.cxx +++ b/vcl/source/window/commandevent.cxx @@ -19,12 +19,13 @@ #include <string.h> +#include <utility> #include <vcl/commandevent.hxx> -CommandExtTextInputData::CommandExtTextInputData( const OUString& rText, +CommandExtTextInputData::CommandExtTextInputData( OUString aText, const ExtTextInputAttr* pTextAttr, sal_Int32 nCursorPos, sal_uInt16 nCursorFlags, bool bOnlyCursor) - : maText(rText) + : maText(std::move(aText)) { if ( pTextAttr && !maText.isEmpty() ) { diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx index 71191122b2c5..7dc1b3253874 100644 --- a/vcl/source/window/errinf.cxx +++ b/vcl/source/window/errinf.cxx @@ -21,6 +21,7 @@ #include <sal/log.hxx> #include <tools/debug.hxx> +#include <utility> #include <vcl/errinf.hxx> #include <algorithm> @@ -321,8 +322,8 @@ DialogMask DynamicErrorInfo::GetDialogMask() const } StringErrorInfo::StringErrorInfo( - ErrCode nArgUserId, const OUString& aStringP, DialogMask nMask) -: DynamicErrorInfo(nArgUserId, nMask), aString(aStringP) + ErrCode nArgUserId, OUString aStringP, DialogMask nMask) +: DynamicErrorInfo(nArgUserId, nMask), aString(std::move(aStringP)) { } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 258ea8dc1105..facfeb8c71f0 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -36,6 +36,7 @@ #include <o3tl/enumrange.hxx> #include <o3tl/string_view.hxx> #include <tools/stream.hxx> +#include <utility> #include <vcl/builder.hxx> #include <vcl/toolkit/button.hxx> #include <vcl/cvtgrf.hxx> @@ -2440,7 +2441,7 @@ MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle) } MessageDialog::MessageDialog(vcl::Window* pParent, - const OUString &rMessage, + OUString aMessage, VclMessageType eMessageType, VclButtonsType eButtonsType) : Dialog(pParent, WB_MOVEABLE | WB_3DLOOK | WB_CLOSEABLE) @@ -2451,7 +2452,7 @@ MessageDialog::MessageDialog(vcl::Window* pParent, , m_pImage(nullptr) , m_pPrimaryMessage(nullptr) , m_pSecondaryMessage(nullptr) - , m_sPrimaryString(rMessage) + , m_sPrimaryString(std::move(aMessage)) { SetType(WindowType::MESSBOX); create_owned_areas(); diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx index 25af6fc6db8e..e02dddc6f024 100644 --- a/vcl/source/window/menuitemlist.hxx +++ b/vcl/source/window/menuitemlist.hxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/vclenum.hxx> #include <vcl/glyphitem.hxx> #include <vcl/image.hxx> @@ -72,12 +73,12 @@ struct MenuItemData , bHiddenOnGUI(false) { } - MenuItemData( const OUString& rStr ) + MenuItemData( OUString aStr ) : nId(0) , eType(MenuItemType::DONTKNOW) , nBits(MenuItemBits::NONE) , pSubMenu(nullptr) - , aText(rStr) + , aText(std::move(aStr)) , nUserValue(nullptr) , aUserValueReleaseFunc(nullptr) , aImage() diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index b2b3cf67a46d..87ee7f0891c2 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -24,6 +24,7 @@ #include <unotools/localedatawrapper.hxx> #include <officecfg/Office/Common.hxx> +#include <utility> #include <vcl/QueueInfo.hxx> #include <vcl/commandevent.hxx> #include <vcl/decoview.hxx> @@ -526,9 +527,9 @@ Size const & PrintDialog::getJobPageSize() return maFirstPageSize; } -PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterController>& i_rController) +PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterController> i_xController) : GenericDialogController(i_pWindow, "vcl/ui/printdialog.ui", "PrintDialog") - , maPController( i_rController ) + , maPController(std::move( i_xController )) , mxTabCtrl(m_xBuilder->weld_notebook("tabcontrol")) , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow")) , mxPageLayoutFrame(m_xBuilder->weld_frame("layoutframe")) diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 5a1112da5c6a..5237aec9365f 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -18,6 +18,7 @@ */ #include <sal/config.h> +#include <utility> #include <vcl/uitest/logger.hxx> #include <sal/log.hxx> @@ -110,24 +111,24 @@ ImplToolItem::ImplToolItem() init(ToolBoxItemId(0), ToolBoxItemBits::NONE, true); } -ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, const Image& rImage, +ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, Image aImage, ToolBoxItemBits nItemBits ) : - maImage( rImage ) + maImage(std::move( aImage )) { init(nItemId, nItemBits, false); } -ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, const OUString& rText, +ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, OUString aText, ToolBoxItemBits nItemBits ) : - maText( rText ) + maText(std::move( aText )) { init(nItemId, nItemBits, false); } -ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, const Image& rImage, - const OUString& rText, ToolBoxItemBits nItemBits ) : - maImage( rImage ), - maText( rText ) +ImplToolItem::ImplToolItem( ToolBoxItemId nItemId, Image aImage, + OUString aText, ToolBoxItemBits nItemBits ) : + maImage(std::move( aImage )), + maText(std::move( aText )) { init(nItemId, nItemBits, false); } |