clang-tidy modernize-pass-by-value in canvas

Change-Id: Ib6e1b6182d83b09dbf5e2aeb9cf3e4ca11d9f48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134712
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2022-05-21 17:59:07 +02:00
parent 098df8583b
commit 08f757c32f
33 changed files with 139 additions and 118 deletions

View File

@ -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;

View File

@ -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 );

View File

@ -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();
}

View File

@ -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 )
{

View File

@ -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()

View File

@ -34,9 +34,9 @@ namespace cairocanvas
/** Create an XCachedPrimitive for given GraphicObject
*/
CachedBitmap( const ::cairo::SurfaceSharedPtr& pSurface,
CachedBitmap( ::cairo::SurfaceSharedPtr pSurface,
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

View File

@ -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)
{

View File

@ -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 );

View File

@ -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 );

View File

@ -53,7 +53,7 @@ namespace cairocanvas
CanvasFont( const css::rendering::FontRequest& fontRequest,
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;

View File

@ -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,
TextLayout::TextLayout( rendering::StringContext aText,
sal_Int8 nDirection,
sal_Int64 /*nRandomSeed*/,
const CanvasFont::Reference& rFont,
const SurfaceProviderRef& rRefDevice ) :
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 ))
{
}

View File

@ -47,11 +47,11 @@ namespace cairocanvas
TextLayout(const TextLayout&) = delete;
const TextLayout& operator=(const TextLayout&) = delete;
TextLayout( const css::rendering::StringContext& aText,
TextLayout( css::rendering::StringContext aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
const SurfaceProviderRef& rRefDevice );
CanvasFont::Reference rFont,
SurfaceProviderRef rRefDevice );
/// Dispose all internal references
virtual void SAL_CALL disposing() override;

View File

@ -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" );

View File

@ -47,7 +47,7 @@ namespace oglcanvas
Reference device, with which bitmap should be compatible
*/
CanvasBitmap( const css::geometry::IntegerSize2D& rSize,
const SpriteCanvasRef& rDevice,
SpriteCanvasRef rDevice,
SpriteDeviceHelper& rDeviceHelper );
/** Create verbatim copy (including all recorded actions)

View File

@ -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 )
{

View File

@ -36,7 +36,7 @@ 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 );

View File

@ -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,
TextLayout::TextLayout( rendering::StringContext aText,
sal_Int8 nDirection,
sal_Int64 /*nRandomSeed*/,
const CanvasFont::ImplRef& rFont ) :
CanvasFont::ImplRef rFont ) :
TextLayoutBaseT( m_aMutex ),
maText( aText ),
mpFont( rFont ),
maText(std::move( aText )),
mpFont(std::move( rFont )),
mnTextDirection( nDirection )
{
}

View File

@ -27,10 +27,10 @@ namespace oglcanvas
public TextLayoutBaseT
{
public:
TextLayout( const css::rendering::StringContext& aText,
TextLayout( css::rendering::StringContext aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::ImplRef& rFont );
CanvasFont::ImplRef rFont );
/// make noncopyable
TextLayout(const TextLayout&) = delete;

View File

@ -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 ))
{
}

View File

@ -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 ),

View File

@ -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))
{
}

View File

@ -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,

View File

@ -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 )
{

View File

@ -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)

View File

@ -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();

View File

@ -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());

View File

@ -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;

View File

@ -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 )

View File

@ -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

View File

@ -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,
TextLayout::TextLayout( rendering::StringContext aText,
sal_Int8 nDirection,
const CanvasFont::Reference& rFont,
const uno::Reference<rendering::XGraphicDevice>& xDevice,
const OutDevProviderSharedPtr& rOutDev ) :
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 ))
{
}

View File

@ -45,12 +45,12 @@ namespace vclcanvas
TextLayout(const TextLayout&) = delete;
const TextLayout& operator=(const TextLayout&) = delete;
TextLayout( const css::rendering::StringContext& aText,
TextLayout( css::rendering::StringContext aText,
sal_Int8 nDirection,
const CanvasFont::Reference& rFont,
const css::uno::Reference<
css::rendering::XGraphicDevice>& xDevice,
const OutDevProviderSharedPtr& rOutDev );
CanvasFont::Reference rFont,
css::uno::Reference<
css::rendering::XGraphicDevice> xDevice,
OutDevProviderSharedPtr xOutDev );
/// Dispose all internal references
virtual void SAL_CALL disposing() override;

View File

@ -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,

View File

@ -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