diff options
33 files changed, 139 insertions, 118 deletions
diff --git a/canvas/inc/base/cachedprimitivebase.hxx b/canvas/inc/base/cachedprimitivebase.hxx index ffdee6ee26f7..49c808b34068 100644 --- a/canvas/inc/base/cachedprimitivebase.hxx +++ b/canvas/inc/base/cachedprimitivebase.hxx @@ -53,8 +53,8 @@ namespace canvas @param rTarget The target canvas the repaint should happen on. */ - CachedPrimitiveBase( const css::rendering::ViewState& rUsedViewState, - const css::uno::Reference< css::rendering::XCanvas >& rTarget ); + CachedPrimitiveBase( css::rendering::ViewState rUsedViewState, + css::uno::Reference< css::rendering::XCanvas > xTarget ); /// Dispose all internal references virtual void SAL_CALL disposing() override; diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx index 303dc5af05fa..474bd5da247a 100644 --- a/canvas/inc/parametricpolypolygon.hxx +++ b/canvas/inc/parametricpolypolygon.hxx @@ -26,6 +26,7 @@ #include <canvas/canvastoolsdllapi.h> #include <rtl/ref.hxx> +#include <utility> namespace com::sun::star::rendering { class XGraphicDevice; } @@ -54,12 +55,12 @@ namespace canvas */ struct Values { - Values( const ::basegfx::B2DPolygon& rGradientPoly, + Values( ::basegfx::B2DPolygon aGradientPoly, const css::uno::Sequence< css::uno::Sequence< double > >& rColors, const css::uno::Sequence< double >& rStops, double nAspectRatio, GradientType eType ) : - maGradientPoly( rGradientPoly ), + maGradientPoly(std::move( aGradientPoly )), mnAspectRatio( nAspectRatio ), maColors( rColors ), maStops( rStops ), @@ -127,15 +128,15 @@ namespace canvas double fAspect ); /// Private, because objects can only be created from the static factories - ParametricPolyPolygon( const css::uno::Reference< - css::rendering::XGraphicDevice >& rDevice, + ParametricPolyPolygon( css::uno::Reference< + css::rendering::XGraphicDevice > xDevice, const ::basegfx::B2DPolygon& rGradientPoly, GradientType eType, const css::uno::Sequence< css::uno::Sequence< double > >& colors, const css::uno::Sequence< double >& stops, double nAspectRatio ); - ParametricPolyPolygon( const css::uno::Reference< - css::rendering::XGraphicDevice >& rDevice, + ParametricPolyPolygon( css::uno::Reference< + css::rendering::XGraphicDevice > xDevice, GradientType eType, const css::uno::Sequence< css::uno::Sequence< double > >& colors, const css::uno::Sequence< double >& stops ); diff --git a/canvas/inc/rendering/irendermodule.hxx b/canvas/inc/rendering/irendermodule.hxx index 527eedc9fd94..ed16f7eb6a00 100644 --- a/canvas/inc/rendering/irendermodule.hxx +++ b/canvas/inc/rendering/irendermodule.hxx @@ -20,6 +20,7 @@ #pragma once #include <memory> +#include <utility> namespace basegfx { @@ -112,8 +113,8 @@ namespace canvas class RenderModuleGuard { public: - explicit RenderModuleGuard( const std::shared_ptr<IRenderModule>& rRenderModule ) : - mpRenderModule( rRenderModule ) + explicit RenderModuleGuard( std::shared_ptr<IRenderModule> xRenderModule ) : + mpRenderModule(std::move( xRenderModule )) { mpRenderModule->lock(); } diff --git a/canvas/inc/spriteredrawmanager.hxx b/canvas/inc/spriteredrawmanager.hxx index cf2b86e0a8cc..8e4e49e7a7d5 100644 --- a/canvas/inc/spriteredrawmanager.hxx +++ b/canvas/inc/spriteredrawmanager.hxx @@ -25,6 +25,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> +#include <utility> #include <vector> #include <algorithm> @@ -76,10 +77,10 @@ namespace canvas @internal */ - SpriteInfo( const Sprite::Reference& rRef, + SpriteInfo( Sprite::Reference aRef, const ::basegfx::B2DRange& rTrueUpdateArea, bool bNeedsUpdate ) : - mpSprite( rRef ), + mpSprite(std::move( aRef )), maTrueUpdateArea( rTrueUpdateArea ), mbNeedsUpdate( bNeedsUpdate ), mbIsPureMove( false ) @@ -105,11 +106,11 @@ namespace canvas @internal */ - SpriteInfo( const Sprite::Reference& rRef, + SpriteInfo( Sprite::Reference aRef, const ::basegfx::B2DRange& rTrueUpdateArea, bool bNeedsUpdate, bool bIsPureMove ) : - mpSprite( rRef ), + mpSprite(std::move( aRef )), maTrueUpdateArea( rTrueUpdateArea ), mbNeedsUpdate( bNeedsUpdate ), mbIsPureMove( bIsPureMove ) @@ -140,12 +141,12 @@ namespace canvas { enum class ChangeType { move, update }; - SpriteChangeRecord( const Sprite::Reference& rSprite, + SpriteChangeRecord( Sprite::Reference rSprite, const ::basegfx::B2DPoint& rOldPos, const ::basegfx::B2DPoint& rNewPos, const ::basegfx::B2DVector& rSpriteSize ) : meChangeType( ChangeType::move ), - mpAffectedSprite( rSprite ), + mpAffectedSprite(std::move( rSprite )), maOldPos( rOldPos ), maUpdateArea( rNewPos.getX(), rNewPos.getY(), @@ -154,11 +155,11 @@ namespace canvas { } - SpriteChangeRecord( const Sprite::Reference& rSprite, + SpriteChangeRecord( Sprite::Reference rSprite, const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DRange& rUpdateArea ) : meChangeType( ChangeType::update ), - mpAffectedSprite( rSprite ), + mpAffectedSprite(std::move( rSprite )), maOldPos( rPos ), maUpdateArea( rUpdateArea ) { diff --git a/canvas/source/cairo/cairo_cachedbitmap.cxx b/canvas/source/cairo/cairo_cachedbitmap.cxx index c907367a49af..111f797e2e37 100644 --- a/canvas/source/cairo/cairo_cachedbitmap.cxx +++ b/canvas/source/cairo/cairo_cachedbitmap.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/RepaintResult.hpp> +#include <utility> #include <tools/diagnose_ex.h> #include "cairo_cachedbitmap.hxx" @@ -32,13 +33,13 @@ using namespace ::com::sun::star; namespace cairocanvas { - CachedBitmap::CachedBitmap( const SurfaceSharedPtr& pSurface, + CachedBitmap::CachedBitmap( SurfaceSharedPtr pSurface, const rendering::ViewState& rUsedViewState, - const rendering::RenderState& rUsedRenderState, + rendering::RenderState aUsedRenderState, const uno::Reference< rendering::XCanvas >& rTarget ) : CachedPrimitiveBase( rUsedViewState, rTarget ), - mpSurface( pSurface ), - maRenderState( rUsedRenderState ) + mpSurface(std::move( pSurface )), + maRenderState(std::move( aUsedRenderState )) {} void SAL_CALL CachedBitmap::disposing() diff --git a/canvas/source/cairo/cairo_cachedbitmap.hxx b/canvas/source/cairo/cairo_cachedbitmap.hxx index 0af07c07a6c8..159b54bc2a20 100644 --- a/canvas/source/cairo/cairo_cachedbitmap.hxx +++ b/canvas/source/cairo/cairo_cachedbitmap.hxx @@ -34,10 +34,10 @@ namespace cairocanvas /** Create an XCachedPrimitive for given GraphicObject */ - CachedBitmap( const ::cairo::SurfaceSharedPtr& pSurface, - const css::rendering::ViewState& rUsedViewState, - const css::rendering::RenderState& rUsedRenderState, - const css::uno::Reference< css::rendering::XCanvas >& rTarget ); + CachedBitmap( ::cairo::SurfaceSharedPtr pSurface, + const css::rendering::ViewState& rUsedViewState, + css::rendering::RenderState aUsedRenderState, + const css::uno::Reference< css::rendering::XCanvas >& rTarget ); /// Dispose all internal references virtual void SAL_CALL disposing() override; diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index 430bb3b5fc60..fa33b83eb865 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -22,6 +22,7 @@ #include <cppuhelper/supportsservice.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/bitmapex.hxx> #include <vcl/BitmapTools.hxx> @@ -35,10 +36,10 @@ using namespace ::com::sun::star; namespace cairocanvas { CanvasBitmap::CanvasBitmap( const ::basegfx::B2ISize& rSize, - const SurfaceProviderRef& rSurfaceProvider, + SurfaceProviderRef rSurfaceProvider, rendering::XGraphicDevice* pDevice, bool bHasAlpha ) : - mpSurfaceProvider( rSurfaceProvider ), + mpSurfaceProvider(std::move( rSurfaceProvider )), maSize(rSize), mbHasAlpha(bHasAlpha) { diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index a4e55f7b642a..8826bc82ebe2 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -69,7 +69,7 @@ namespace cairocanvas Reference device, with which bitmap should be compatible */ CanvasBitmap( const ::basegfx::B2ISize& rSize, - const SurfaceProviderRef& rDevice, + SurfaceProviderRef rDevice, css::rendering::XGraphicDevice* pDevice, bool bHasAlpha ); diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index cca052d167e0..36c1733ef62a 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/supportsservice.hxx> #include <i18nlangtag/languagetag.hxx> #include <rtl/math.hxx> +#include <utility> #include <vcl/metric.hxx> #include "cairo_canvasfont.hxx" @@ -37,13 +38,13 @@ namespace cairocanvas CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest, const uno::Sequence< beans::PropertyValue >& /*rExtraFontProperties*/, const geometry::Matrix2D& rFontMatrix, - const SurfaceProviderRef& rDevice ) : + SurfaceProviderRef rDevice ) : CanvasFont_Base( m_aMutex ), maFont( vcl::Font( rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.StyleName, Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ), maFontRequest( rFontRequest ), - mpRefDevice( rDevice ) + mpRefDevice(std::move( rDevice )) { maFont->SetAlignment( ALIGN_BASELINE ); maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); diff --git a/canvas/source/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx index 0c26bee66b72..0ebe9acd81ce 100644 --- a/canvas/source/cairo/cairo_canvasfont.hxx +++ b/canvas/source/cairo/cairo_canvasfont.hxx @@ -51,9 +51,9 @@ namespace cairocanvas const CanvasFont& operator=(const CanvasFont&) = delete; CanvasFont( const css::rendering::FontRequest& fontRequest, - const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties, + const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties, const css::geometry::Matrix2D& rFontMatrix, - const SurfaceProviderRef& rDevice ); + SurfaceProviderRef rDevice ); /// Dispose all internal references virtual void SAL_CALL disposing() override; diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 4a0236f6bf4b..cbbf02c5629d 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -28,6 +28,7 @@ #include <basegfx/numeric/ftools.hxx> #include <cppuhelper/supportsservice.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/metric.hxx> #include <vcl/virdev.hxx> @@ -69,15 +70,15 @@ namespace cairocanvas } } - TextLayout::TextLayout( const rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 /*nRandomSeed*/, - const CanvasFont::Reference& rFont, - const SurfaceProviderRef& rRefDevice ) : + TextLayout::TextLayout( rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 /*nRandomSeed*/, + CanvasFont::Reference rFont, + SurfaceProviderRef rRefDevice ) : TextLayout_Base( m_aMutex ), - maText( aText ), - mpFont( rFont ), - mpRefDevice( rRefDevice ), + maText(std::move( aText )), + mpFont(std::move( rFont )), + mpRefDevice(std::move( rRefDevice )), mnTextDirection( nDirection ) { } @@ -286,8 +287,8 @@ namespace cairocanvas class OffsetTransformer { public: - explicit OffsetTransformer( const ::basegfx::B2DHomMatrix& rMat ) : - maMatrix( rMat ) + explicit OffsetTransformer( ::basegfx::B2DHomMatrix aMat ) : + maMatrix(std::move( aMat )) { } diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx index 3349a9d830e6..fb14e620c518 100644 --- a/canvas/source/cairo/cairo_textlayout.hxx +++ b/canvas/source/cairo/cairo_textlayout.hxx @@ -47,11 +47,11 @@ namespace cairocanvas TextLayout(const TextLayout&) = delete; const TextLayout& operator=(const TextLayout&) = delete; - TextLayout( const css::rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 nRandomSeed, - const CanvasFont::Reference& rFont, - const SurfaceProviderRef& rRefDevice ); + TextLayout( css::rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 nRandomSeed, + CanvasFont::Reference rFont, + SurfaceProviderRef rRefDevice ); /// Dispose all internal references virtual void SAL_CALL disposing() override; diff --git a/canvas/source/opengl/ogl_canvasbitmap.cxx b/canvas/source/opengl/ogl_canvasbitmap.cxx index 2a476ec91e58..fa5e53823d8d 100644 --- a/canvas/source/opengl/ogl_canvasbitmap.cxx +++ b/canvas/source/opengl/ogl_canvasbitmap.cxx @@ -11,6 +11,8 @@ #include <tools/diagnose_ex.h> +#include <utility> + #include "ogl_canvasbitmap.hxx" @@ -19,9 +21,9 @@ using namespace ::com::sun::star; namespace oglcanvas { CanvasBitmap::CanvasBitmap( const geometry::IntegerSize2D& rSize, - const SpriteCanvasRef& rDevice, + SpriteCanvasRef rDevice, SpriteDeviceHelper& rDeviceHelper ) : - mpDevice( rDevice ) + mpDevice(std::move( rDevice )) { ENSURE_OR_THROW( mpDevice.is(), "CanvasBitmap::CanvasBitmap(): Invalid surface or device" ); diff --git a/canvas/source/opengl/ogl_canvasbitmap.hxx b/canvas/source/opengl/ogl_canvasbitmap.hxx index 55564c66d018..5cc41bb192bc 100644 --- a/canvas/source/opengl/ogl_canvasbitmap.hxx +++ b/canvas/source/opengl/ogl_canvasbitmap.hxx @@ -46,9 +46,9 @@ namespace oglcanvas @param rDevice Reference device, with which bitmap should be compatible */ - CanvasBitmap( const css::geometry::IntegerSize2D& rSize, - const SpriteCanvasRef& rDevice, - SpriteDeviceHelper& rDeviceHelper ); + CanvasBitmap( const css::geometry::IntegerSize2D& rSize, + SpriteCanvasRef rDevice, + SpriteDeviceHelper& rDeviceHelper ); /** Create verbatim copy (including all recorded actions) */ diff --git a/canvas/source/opengl/ogl_canvasfont.cxx b/canvas/source/opengl/ogl_canvasfont.cxx index 764b848cfa83..7309b9acd279 100644 --- a/canvas/source/opengl/ogl_canvasfont.cxx +++ b/canvas/source/opengl/ogl_canvasfont.cxx @@ -11,6 +11,7 @@ #include <com/sun/star/rendering/FontMetrics.hpp> #include <canvas/canvastools.hxx> +#include <utility> #include "ogl_canvasfont.hxx" #include "ogl_textlayout.hxx" @@ -19,11 +20,11 @@ using namespace ::com::sun::star; namespace oglcanvas { - CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest, + CanvasFont::CanvasFont( rendering::FontRequest aFontRequest, const uno::Sequence< beans::PropertyValue >& extraFontProperties, const geometry::Matrix2D& fontMatrix ) : CanvasFontBaseT( m_aMutex ), - maFontRequest( rFontRequest ), + maFontRequest(std::move( aFontRequest )), mnEmphasisMark(0), maFontMatrix( fontMatrix ) { diff --git a/canvas/source/opengl/ogl_canvasfont.hxx b/canvas/source/opengl/ogl_canvasfont.hxx index 75eda6b0fb31..13b0f78a9d68 100644 --- a/canvas/source/opengl/ogl_canvasfont.hxx +++ b/canvas/source/opengl/ogl_canvasfont.hxx @@ -36,9 +36,9 @@ namespace oglcanvas CanvasFont(const CanvasFont&) = delete; const CanvasFont& operator=(const CanvasFont&) = delete; - CanvasFont( const css::rendering::FontRequest& fontRequest, + CanvasFont( css::rendering::FontRequest fontRequest, const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties, - const css::geometry::Matrix2D& fontMatrix ); + const css::geometry::Matrix2D& fontMatrix ); // XCanvasFont virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) override; diff --git a/canvas/source/opengl/ogl_textlayout.cxx b/canvas/source/opengl/ogl_textlayout.cxx index 41962c8b1ea0..5eab3d9bcf13 100644 --- a/canvas/source/opengl/ogl_textlayout.cxx +++ b/canvas/source/opengl/ogl_textlayout.cxx @@ -9,6 +9,7 @@ #include <sal/config.h> #include <sal/log.hxx> +#include <utility> #include <tools/diagnose_ex.h> @@ -18,13 +19,13 @@ using namespace ::com::sun::star; namespace oglcanvas { - TextLayout::TextLayout( const rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 /*nRandomSeed*/, - const CanvasFont::ImplRef& rFont ) : + TextLayout::TextLayout( rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 /*nRandomSeed*/, + CanvasFont::ImplRef rFont ) : TextLayoutBaseT( m_aMutex ), - maText( aText ), - mpFont( rFont ), + maText(std::move( aText )), + mpFont(std::move( rFont )), mnTextDirection( nDirection ) { } diff --git a/canvas/source/opengl/ogl_textlayout.hxx b/canvas/source/opengl/ogl_textlayout.hxx index f2e6869c466d..ce7b1958993e 100644 --- a/canvas/source/opengl/ogl_textlayout.hxx +++ b/canvas/source/opengl/ogl_textlayout.hxx @@ -27,10 +27,10 @@ namespace oglcanvas public TextLayoutBaseT { public: - TextLayout( const css::rendering::StringContext& aText, - sal_Int8 nDirection, - sal_Int64 nRandomSeed, - const CanvasFont::ImplRef& rFont ); + TextLayout( css::rendering::StringContext aText, + sal_Int8 nDirection, + sal_Int64 nRandomSeed, + CanvasFont::ImplRef rFont ); /// make noncopyable TextLayout(const TextLayout&) = delete; diff --git a/canvas/source/tools/cachedprimitivebase.cxx b/canvas/source/tools/cachedprimitivebase.cxx index 056796fcde98..652e9c900613 100644 --- a/canvas/source/tools/cachedprimitivebase.cxx +++ b/canvas/source/tools/cachedprimitivebase.cxx @@ -25,17 +25,18 @@ #include <cppuhelper/supportsservice.hxx> #include <base/cachedprimitivebase.hxx> +#include <utility> using namespace ::com::sun::star; namespace canvas { - CachedPrimitiveBase::CachedPrimitiveBase( const rendering::ViewState& rUsedViewState, - const uno::Reference< rendering::XCanvas >& rTarget ) : + CachedPrimitiveBase::CachedPrimitiveBase( rendering::ViewState aUsedViewState, + uno::Reference< rendering::XCanvas > xTarget ) : CachedPrimitiveBase_Base( m_aMutex ), - maUsedViewState( rUsedViewState ), - mxTarget( rTarget ) + maUsedViewState(std::move( aUsedViewState )), + mxTarget(std::move( xTarget )) { } diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx index 84a6ed5c48bd..46167dd9a851 100644 --- a/canvas/source/tools/elapsedtime.cxx +++ b/canvas/source/tools/elapsedtime.cxx @@ -22,6 +22,7 @@ #include <canvas/elapsedtime.hxx> #include <tools/time.hxx> +#include <utility> namespace canvas::tools { @@ -41,8 +42,8 @@ ElapsedTime::ElapsedTime() } ElapsedTime::ElapsedTime( - std::shared_ptr<ElapsedTime> const & pTimeBase ) - : m_pTimeBase( pTimeBase ), + std::shared_ptr<ElapsedTime> pTimeBase ) + : m_pTimeBase(std::move( pTimeBase )), m_fLastQueriedTime( 0.0 ), m_fStartTime( getCurrentTime() ), m_fFrozenTime( 0.0 ), diff --git a/canvas/source/tools/pagemanager.hxx b/canvas/source/tools/pagemanager.hxx index a5d905ef726c..57de912a12ba 100644 --- a/canvas/source/tools/pagemanager.hxx +++ b/canvas/source/tools/pagemanager.hxx @@ -21,6 +21,7 @@ #include <basegfx/vector/b2isize.hxx> #include <rendering/irendermodule.hxx> +#include <utility> #include "page.hxx" @@ -30,8 +31,8 @@ namespace canvas class PageManager { public: - explicit PageManager(const std::shared_ptr<canvas::IRenderModule>& rRenderModule) - : mpRenderModule(rRenderModule) + explicit PageManager(std::shared_ptr<canvas::IRenderModule> xRenderModule) + : mpRenderModule(std::move(xRenderModule)) { } diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index 96d8fc7f07da..acad3b58b7d6 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/rendering/XGraphicDevice.hpp> #include <parametricpolypolygon.hxx> +#include <utility> using namespace ::com::sun::star; @@ -197,13 +198,13 @@ namespace canvas { } - ParametricPolyPolygon::ParametricPolyPolygon( const uno::Reference< rendering::XGraphicDevice >& rDevice, + ParametricPolyPolygon::ParametricPolyPolygon( uno::Reference< rendering::XGraphicDevice > xDevice, const ::basegfx::B2DPolygon& rGradientPoly, GradientType eType, const uno::Sequence< uno::Sequence< double > >& rColors, const uno::Sequence< double >& rStops, double nAspectRatio ) : - mxDevice( rDevice ), + mxDevice(std::move( xDevice )), maValues( rGradientPoly, rColors, rStops, @@ -212,11 +213,11 @@ namespace canvas { } - ParametricPolyPolygon::ParametricPolyPolygon( const uno::Reference< rendering::XGraphicDevice >& rDevice, + ParametricPolyPolygon::ParametricPolyPolygon( uno::Reference< rendering::XGraphicDevice > xDevice, GradientType eType, const uno::Sequence< uno::Sequence< double > >& rColors, const uno::Sequence< double >& rStops ) : - mxDevice( rDevice ), + mxDevice(std::move( xDevice )), maValues( ::basegfx::B2DPolygon(), rColors, rStops, diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 25ec64254acc..d60646484056 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -28,6 +28,7 @@ #include <spriteredrawmanager.hxx> #include <boost/range/adaptor/reversed.hpp> +#include <utility> namespace canvas { @@ -43,8 +44,8 @@ namespace canvas class SpriteTracer { public: - explicit SpriteTracer( const Sprite::Reference& rAffectedSprite ) : - mpAffectedSprite(rAffectedSprite), + explicit SpriteTracer( Sprite::Reference rAffectedSprite ) : + mpAffectedSprite(std::move(rAffectedSprite)), mbIsMove( false ), mbIsGenericUpdate( false ) { diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx index 9769931a636e..9dfb0f7c9d36 100644 --- a/canvas/source/tools/surface.cxx +++ b/canvas/source/tools/surface.cxx @@ -22,17 +22,18 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <comphelper/scopeguard.hxx> +#include <utility> #include "surface.hxx" namespace canvas { - Surface::Surface( const PageManagerSharedPtr& rPageManager, - const std::shared_ptr<IColorBuffer>& rColorBuffer, + Surface::Surface( PageManagerSharedPtr rPageManager, + std::shared_ptr<IColorBuffer> xColorBuffer, const ::basegfx::B2IPoint& rPos, const ::basegfx::B2ISize& rSize ) : - mpColorBuffer(rColorBuffer), - mpPageManager(rPageManager), + mpColorBuffer(std::move(xColorBuffer)), + mpPageManager(std::move(rPageManager)), maSourceOffset(rPos), maSize(rSize), mbIsDirty(true) diff --git a/canvas/source/tools/surface.hxx b/canvas/source/tools/surface.hxx index 25b859ba416b..e78925292f27 100644 --- a/canvas/source/tools/surface.hxx +++ b/canvas/source/tools/surface.hxx @@ -41,8 +41,8 @@ namespace canvas { public: - Surface( const PageManagerSharedPtr& rPageManager, - const std::shared_ptr<IColorBuffer>& rColorBuffer, + Surface( PageManagerSharedPtr xPageManager, + std::shared_ptr<IColorBuffer> xColorBuffer, const ::basegfx::B2IPoint& rPos, const ::basegfx::B2ISize& rSize ); ~Surface(); diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx index 46b3d2cd3255..3a1bf4fe3f21 100644 --- a/canvas/source/tools/surfaceproxy.cxx +++ b/canvas/source/tools/surfaceproxy.cxx @@ -23,15 +23,16 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolygontriangulator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <utility> #include "surfaceproxy.hxx" namespace canvas { - SurfaceProxy::SurfaceProxy( const std::shared_ptr<canvas::IColorBuffer>& pBuffer, - const PageManagerSharedPtr& pPageManager ) : - mpPageManager( pPageManager ), - mpBuffer( pBuffer ) + SurfaceProxy::SurfaceProxy( std::shared_ptr<canvas::IColorBuffer> xBuffer, + PageManagerSharedPtr xPageManager ) : + mpPageManager(std::move( xPageManager )), + mpBuffer(std::move( xBuffer )) { const ::basegfx::B2ISize aImageSize(mpBuffer->getWidth(),mpBuffer->getHeight()); const ::basegfx::B2ISize aPageSize(mpPageManager->getPageSize()); diff --git a/canvas/source/tools/surfaceproxy.hxx b/canvas/source/tools/surfaceproxy.hxx index 5c620d3e3bc8..72841d754e0a 100644 --- a/canvas/source/tools/surfaceproxy.hxx +++ b/canvas/source/tools/surfaceproxy.hxx @@ -38,8 +38,8 @@ namespace canvas { public: - SurfaceProxy( const std::shared_ptr<canvas::IColorBuffer>& pBuffer, - const PageManagerSharedPtr &pPageManager ); + SurfaceProxy( std::shared_ptr<canvas::IColorBuffer> xBuffer, + PageManagerSharedPtr xPageManager ); // ISurfaceProxy interface virtual void setColorBufferDirty() override; diff --git a/canvas/source/vcl/cachedbitmap.cxx b/canvas/source/vcl/cachedbitmap.cxx index 404b8888402c..2d44133a797b 100644 --- a/canvas/source/vcl/cachedbitmap.cxx +++ b/canvas/source/vcl/cachedbitmap.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/RepaintResult.hpp> +#include <utility> #include <tools/diagnose_ex.h> #include "cachedbitmap.hxx" @@ -31,16 +32,16 @@ using namespace ::com::sun::star; namespace vclcanvas { - CachedBitmap::CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject, + CachedBitmap::CachedBitmap( GraphicObjectSharedPtr xGraphicObject, const ::Point& rPoint, const ::Size& rSize, const GraphicAttr& rAttr, const rendering::ViewState& rUsedViewState, - const rendering::RenderState& rUsedRenderState, + rendering::RenderState aUsedRenderState, const uno::Reference< rendering::XCanvas >& rTarget ) : CachedPrimitiveBase( rUsedViewState, rTarget ), - mpGraphicObject( rGraphicObject ), - maRenderState(rUsedRenderState), + mpGraphicObject(std::move( xGraphicObject )), + maRenderState(std::move(aUsedRenderState)), maPoint( rPoint ), maSize( rSize ), maAttributes( rAttr ) diff --git a/canvas/source/vcl/cachedbitmap.hxx b/canvas/source/vcl/cachedbitmap.hxx index 1b3b396ebd5a..0ef04654d4c3 100644 --- a/canvas/source/vcl/cachedbitmap.hxx +++ b/canvas/source/vcl/cachedbitmap.hxx @@ -37,12 +37,12 @@ namespace vclcanvas /** Create an XCachedPrimitive for given GraphicObject */ - CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject, + CachedBitmap( GraphicObjectSharedPtr xGraphicObject, const ::Point& rPoint, const ::Size& rSize, const GraphicAttr& rAttr, const css::rendering::ViewState& rUsedViewState, - const css::rendering::RenderState& rUsedRenderState, + css::rendering::RenderState aUsedRenderState, const css::uno::Reference< css::rendering::XCanvas >& rTarget ); /// Dispose all internal references diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 48c291f31c4e..63a3453ff0c4 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/rendering/ViewState.hpp> #include <comphelper/sequence.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> #include <vcl/metric.hxx> #include <vcl/virdev.hxx> @@ -73,16 +74,16 @@ namespace vclcanvas } } - TextLayout::TextLayout( const rendering::StringContext& aText, - sal_Int8 nDirection, - const CanvasFont::Reference& rFont, - const uno::Reference<rendering::XGraphicDevice>& xDevice, - const OutDevProviderSharedPtr& rOutDev ) : + TextLayout::TextLayout( rendering::StringContext aText, + sal_Int8 nDirection, + CanvasFont::Reference rFont, + uno::Reference<rendering::XGraphicDevice> xDevice, + OutDevProviderSharedPtr xOutDev ) : TextLayout_Base( m_aMutex ), - maText( aText ), - mpFont( rFont ), - mxDevice( xDevice ), - mpOutDevProvider( rOutDev ), + maText(std::move( aText )), + mpFont(std::move( rFont )), + mxDevice(std::move( xDevice )), + mpOutDevProvider(std::move( xOutDev )), mnTextDirection( nDirection ) {} @@ -360,8 +361,8 @@ namespace vclcanvas class OffsetTransformer { public: - explicit OffsetTransformer( const ::basegfx::B2DHomMatrix& rMat ) : - maMatrix( rMat ) + explicit OffsetTransformer( ::basegfx::B2DHomMatrix aMat ) : + maMatrix(std::move( aMat )) { } diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx index 6471aa5a67d1..5a403c28070a 100644 --- a/canvas/source/vcl/textlayout.hxx +++ b/canvas/source/vcl/textlayout.hxx @@ -45,12 +45,12 @@ namespace vclcanvas TextLayout(const TextLayout&) = delete; const TextLayout& operator=(const TextLayout&) = delete; - TextLayout( const css::rendering::StringContext& aText, - sal_Int8 nDirection, - const CanvasFont::Reference& rFont, - const css::uno::Reference< - css::rendering::XGraphicDevice>& xDevice, - const OutDevProviderSharedPtr& rOutDev ); + TextLayout( css::rendering::StringContext aText, + sal_Int8 nDirection, + CanvasFont::Reference rFont, + css::uno::Reference< + css::rendering::XGraphicDevice> xDevice, + OutDevProviderSharedPtr xOutDev ); /// Dispose all internal references virtual void SAL_CALL disposing() override; diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index 431f9cee04a1..eb9356a04926 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -39,6 +39,7 @@ #include <comphelper/random.hxx> #include <cppuhelper/bootstrap.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include <vcl/canvastools.hxx> #include <vcl/svapp.hxx> #include <vcl/vclmain.hxx> @@ -92,7 +93,7 @@ class DemoRenderer maColorBlack( vcl::unotools::colorToStdColorSpaceSequence( COL_BLACK) ), maColorRed( vcl::unotools::colorToStdColorSpaceSequence( COL_RED) ), mxCanvas(xCanvas), - mxDevice( xDevice ) + mxDevice(std::move( xDevice )) { // Geometry init geometry::AffineMatrix2D aUnit( 1,0, 0, diff --git a/include/canvas/elapsedtime.hxx b/include/canvas/elapsedtime.hxx index 7519b024c87f..cf73af960eb1 100644 --- a/include/canvas/elapsedtime.hxx +++ b/include/canvas/elapsedtime.hxx @@ -53,7 +53,7 @@ namespace canvas::tools are not taken from the system's time base, but from the provided timer. */ - ElapsedTime( std::shared_ptr<ElapsedTime> const & pTimeBase ); + ElapsedTime( std::shared_ptr<ElapsedTime> xTimeBase ); /** Reset the time |