diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-14 09:44:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-14 11:18:21 +0200 |
commit | 2d009c405714934ae5f95f4131510cb4e9c2493f (patch) | |
tree | 33670e0adb62d646a3e7ecdfadee92e25222be22 /svx | |
parent | bdd97cb83e09225905a6272caf91579a0a77d3c2 (diff) |
loplugin:moveit
Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/XPropertyTable.cxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 5 | ||||
-rw-r--r-- | svx/source/xoutdev/xpool.cxx | 3 |
5 files changed, 8 insertions, 10 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 2be9a7c8d382..8a727909fb81 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -783,7 +783,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) if( bReplace ) { aFont.SetColor( aCol ); - pAct = new MetaFontAction( aFont ); + pAct = new MetaFontAction( std::move(aFont) ); } aMtf.AddAction( pAct ); @@ -801,7 +801,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) if( bReplace ) { aWall.SetColor( aCol ); - pAct = new MetaWallpaperAction( pAct->GetRect(), aWall ); + pAct = new MetaWallpaperAction( pAct->GetRect(), std::move(aWall) ); } aMtf.AddAction( pAct ); diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 3422f5e2919c..68cb1bc0c45d 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -391,7 +391,7 @@ void GalleryTransferable::InitData( bool bLazy ) Graphic aGraphic; if (mpTheme && mpTheme->GetGraphic(mnObjectPos, aGraphic)) - mpGraphicObject.reset(new GraphicObject( aGraphic )); + mpGraphicObject.reset(new GraphicObject( std::move(aGraphic) )); } if( !mxModelStream.is() ) @@ -428,7 +428,7 @@ void GalleryTransferable::InitData( bool bLazy ) Graphic aGraphic; if (mpTheme && mpTheme->GetGraphic(mnObjectPos, aGraphic)) - mpGraphicObject.reset(new GraphicObject( aGraphic )); + mpGraphicObject.reset(new GraphicObject( std::move(aGraphic) )); } } break; diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 56bb135237f8..c1105335ae84 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -639,7 +639,7 @@ std::unique_ptr<XPropertyEntry> SvxUnoXBitmapTable::createEntry(const OUString& if (aGraphic.IsNone()) return nullptr; - GraphicObject aGraphicObject(aGraphic); + GraphicObject aGraphicObject(std::move(aGraphic)); return std::make_unique<XBitmapEntry>(aGraphicObject, rName); } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 03e85db36922..6c5c76bfce73 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -358,7 +358,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() Graphic aGraphic(GetGraphic()); if (aGraphic.GetType() != GraphicType::NONE) { - mxGrfObj.reset(new GraphicObject(aGraphic)); + mxGrfObj.reset(new GraphicObject(std::move(aGraphic))); } return *mxGrfObj; } @@ -856,8 +856,7 @@ uno::Reference<io::XInputStream> SAL_CALL SvXMLGraphicHelper::createInputStream( { Reference<XInputStream> xInputStream; - Graphic aGraphic(rxGraphic); - GraphicObject aGraphicObject(aGraphic); + GraphicObject aGraphicObject((Graphic(rxGraphic))); if (SvXMLGraphicHelperMode::Write == meCreateMode) { diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index b3e044e83696..65a096de3910 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -74,7 +74,6 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster) { // prepare some defaults const OUString aNullStr; - const Graphic aNullGraphic; const basegfx::B2DPolyPolygon aNullPol; const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color @@ -111,7 +110,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster) rPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol); rPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(XGradient(COL_BLACK, COL_WHITE)); rPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (aNullHatch); - rPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (aNullGraphic); + rPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (Graphic()); rPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem; rPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem; rPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem; |