[Libreoffice-commits] core.git: include/vcl vcl/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Sat Mar 31 09:04:18 UTC 2018
include/vcl/hatch.hxx | 1 -
include/vcl/lineinfo.hxx | 1 -
vcl/source/gdi/alpha.cxx | 18 ++++--------------
vcl/source/gdi/bitmapex.cxx | 25 ++-----------------------
vcl/source/gdi/gradient.cxx | 32 ++++++--------------------------
vcl/source/gdi/hatch.cxx | 26 ++++----------------------
vcl/source/gdi/jobset.cxx | 20 ++++----------------
vcl/source/gdi/lineinfo.cxx | 37 +++++--------------------------------
vcl/source/gdi/mapmod.cxx | 29 +++++------------------------
vcl/source/gdi/print.cxx | 14 ++------------
vcl/source/gdi/region.cxx | 23 +++--------------------
vcl/source/gdi/wall.cxx | 26 +++++---------------------
12 files changed, 40 insertions(+), 212 deletions(-)
New commits:
commit 82b6d86305ad823700f9d1ccbebba785b0387a5b
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Mar 26 18:47:37 2018 +0200
clang-tidy modernize-use-equals-default in vcl/source/gdi
Change-Id: I5d7f842603ebb96b1b99b594da39bba7f845d41a
Reviewed-on: https://gerrit.libreoffice.org/52170
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/hatch.hxx b/include/vcl/hatch.hxx
index 3b326b4642c5..70286d9cc7ec 100644
--- a/include/vcl/hatch.hxx
+++ b/include/vcl/hatch.hxx
@@ -37,7 +37,6 @@ struct ImplHatch
sal_uInt16 mnAngle;
ImplHatch();
- ImplHatch( const ImplHatch& rImplHatch );
bool operator==( const ImplHatch& rImplHatch ) const;
};
diff --git a/include/vcl/lineinfo.hxx b/include/vcl/lineinfo.hxx
index 4bfa3df339ff..4ed486d55452 100644
--- a/include/vcl/lineinfo.hxx
+++ b/include/vcl/lineinfo.hxx
@@ -44,7 +44,6 @@ struct ImplLineInfo
css::drawing::LineCap meLineCap;
ImplLineInfo();
- ImplLineInfo( const ImplLineInfo& rImplLineInfo );
bool operator==( const ImplLineInfo& ) const;
};
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 25180f805319..4f39015287a9 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -22,9 +22,7 @@
#include <vcl/alpha.hxx>
#include <bitmapwriteaccess.hxx>
-AlphaMask::AlphaMask()
-{
-}
+AlphaMask::AlphaMask() = default;
AlphaMask::AlphaMask( const Bitmap& rBitmap ) :
Bitmap( rBitmap )
@@ -33,15 +31,9 @@ AlphaMask::AlphaMask( const Bitmap& rBitmap ) :
Convert( BmpConversion::N8BitGreys );
}
-AlphaMask::AlphaMask( const AlphaMask& rAlphaMask ) :
- Bitmap( rAlphaMask )
-{
-}
+AlphaMask::AlphaMask( const AlphaMask& ) = default;
-AlphaMask::AlphaMask( AlphaMask&& rAlphaMask ) :
- Bitmap( std::move(rAlphaMask) )
-{
-}
+AlphaMask::AlphaMask( AlphaMask&& ) = default;
AlphaMask::AlphaMask( const Size& rSizePixel, const sal_uInt8* pEraseTransparency ) :
Bitmap( rSizePixel, 8, &Bitmap::GetGreyPalette( 256 ) )
@@ -50,9 +42,7 @@ AlphaMask::AlphaMask( const Size& rSizePixel, const sal_uInt8* pEraseTransparenc
Bitmap::Erase( Color( *pEraseTransparency, *pEraseTransparency, *pEraseTransparency ) );
}
-AlphaMask::~AlphaMask()
-{
-}
+AlphaMask::~AlphaMask() = default;
AlphaMask& AlphaMask::operator=( const Bitmap& rBitmap )
{
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index dba603347679..63856412e01a 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -54,15 +54,7 @@ BitmapEx::BitmapEx()
{
}
-BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) :
- maBitmap ( rBitmapEx.maBitmap ),
- maMask ( rBitmapEx.maMask ),
- maBitmapSize ( rBitmapEx.maBitmapSize ),
- maTransparentColor ( rBitmapEx.maTransparentColor ),
- meTransparent ( rBitmapEx.meTransparent ),
- mbAlpha ( rBitmapEx.mbAlpha )
-{
-}
+BitmapEx::BitmapEx( const BitmapEx& ) = default;
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize )
: meTransparent(TransparentType::NONE)
@@ -173,20 +165,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
"BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
}
-BitmapEx& BitmapEx::operator=( const BitmapEx& rBitmapEx )
-{
- if( &rBitmapEx != this )
- {
- maBitmap = rBitmapEx.maBitmap;
- maMask = rBitmapEx.maMask;
- maBitmapSize = rBitmapEx.maBitmapSize;
- maTransparentColor = rBitmapEx.maTransparentColor;
- meTransparent = rBitmapEx.meTransparent;
- mbAlpha = rBitmapEx.mbAlpha;
- }
-
- return *this;
-}
+BitmapEx& BitmapEx::operator=( const BitmapEx& ) = default;
bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
{
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index c9552bb875d9..3dd7ded0b141 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -64,20 +64,11 @@ bool Impl_Gradient::operator==( const Impl_Gradient& rImpl_Gradient ) const
(maEndColor == rImpl_Gradient.maEndColor);
}
-Gradient::Gradient() :
- mpImplGradient()
-{
-}
+Gradient::Gradient() = default;
-Gradient::Gradient( const Gradient& rGradient ) :
- mpImplGradient( rGradient.mpImplGradient )
-{
-}
+Gradient::Gradient( const Gradient& ) = default;
-Gradient::Gradient( Gradient&& rGradient ) :
- mpImplGradient( std::move(rGradient.mpImplGradient) )
-{
-}
+Gradient::Gradient( Gradient&& ) = default;
Gradient::Gradient( GradientStyle eStyle,
const Color& rStartColor, const Color& rEndColor ) :
@@ -88,9 +79,7 @@ Gradient::Gradient( GradientStyle eStyle,
mpImplGradient->maEndColor = rEndColor;
}
-Gradient::~Gradient()
-{
-}
+Gradient::~Gradient() = default;
void Gradient::SetStyle( GradientStyle eStyle )
{
@@ -220,18 +209,9 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB
}
}
-Gradient& Gradient::operator=( const Gradient& rGradient )
-{
- mpImplGradient = rGradient.mpImplGradient;
+Gradient& Gradient::operator=( const Gradient& ) = default;
- return *this;
-}
-
-Gradient& Gradient::operator=( Gradient&& rGradient )
-{
- mpImplGradient = std::move(rGradient.mpImplGradient);
- return *this;
-}
+Gradient& Gradient::operator=( Gradient&& ) = default;
bool Gradient::operator==( const Gradient& rGradient ) const
{
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index ac2accdbd26d..1e4b4fa7bf92 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -29,14 +29,6 @@ ImplHatch::ImplHatch() :
{
}
-ImplHatch::ImplHatch( const ImplHatch& rImplHatch ) :
- maColor ( rImplHatch.maColor ),
- meStyle ( rImplHatch.meStyle ),
- mnDistance ( rImplHatch.mnDistance ),
- mnAngle ( rImplHatch.mnAngle )
-{
-}
-
bool ImplHatch::operator==( const ImplHatch& rImplHatch ) const
{
return maColor == rImplHatch.maColor &&
@@ -45,13 +37,9 @@ bool ImplHatch::operator==( const ImplHatch& rImplHatch ) const
mnAngle == rImplHatch.mnAngle;
}
-Hatch::Hatch() : mpImplHatch()
-{
-}
+Hatch::Hatch() = default;
-Hatch::Hatch( const Hatch& rHatch ) : mpImplHatch( rHatch.mpImplHatch )
-{
-}
+Hatch::Hatch( const Hatch& ) = default;
Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
long nDistance, sal_uInt16 nAngle10 ) : mpImplHatch()
@@ -62,15 +50,9 @@ Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
mpImplHatch->mnAngle = nAngle10;
}
-Hatch::~Hatch()
-{
-}
+Hatch::~Hatch() = default;
-Hatch& Hatch::operator=( const Hatch& rHatch )
-{
- mpImplHatch = rHatch.mpImplHatch;
- return *this;
-}
+Hatch& Hatch::operator=( const Hatch& ) = default;
bool Hatch::operator==( const Hatch& rHatch ) const
{
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 06b5ed6583d6..95c8669a7f97 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -162,17 +162,9 @@ void ImplJobSetup::SetValueMap( const OUString& rKey, const OUString& rValue )
maValueMap [ rKey ] = rValue;
}
-JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
-{
- mpData = rJobSetup.mpData;
- return *this;
-}
+JobSetup& JobSetup::operator=( const JobSetup& ) = default;
-JobSetup& JobSetup::operator=( JobSetup&& rJobSetup )
-{
- mpData = std::move(rJobSetup.mpData);
- return *this;
-}
+JobSetup& JobSetup::operator=( JobSetup&& ) = default;
bool ImplJobSetup::operator==( const ImplJobSetup& rImplJobSetup ) const
{
@@ -201,13 +193,9 @@ JobSetup::JobSetup() : mpData(theGlobalDefault::get())
{
}
-JobSetup::JobSetup( const JobSetup& rJobSetup ) : mpData(rJobSetup.mpData)
-{
-}
+JobSetup::JobSetup( const JobSetup& ) = default;
-JobSetup::~JobSetup()
-{
-}
+JobSetup::~JobSetup() = default;
bool JobSetup::operator==( const JobSetup& rJobSetup ) const
{
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index f8b48da94520..f8bc5591a3e9 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -39,19 +39,6 @@ ImplLineInfo::ImplLineInfo() :
{
}
-ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) :
- meStyle ( rImplLineInfo.meStyle ),
- mnWidth ( rImplLineInfo.mnWidth ),
- mnDashCount ( rImplLineInfo.mnDashCount ),
- mnDashLen ( rImplLineInfo.mnDashLen ),
- mnDotCount ( rImplLineInfo.mnDotCount ),
- mnDotLen ( rImplLineInfo.mnDotLen ),
- mnDistance ( rImplLineInfo.mnDistance ),
- meLineJoin ( rImplLineInfo.meLineJoin ),
- meLineCap ( rImplLineInfo.meLineCap )
-{
-}
-
inline bool ImplLineInfo::operator==( const ImplLineInfo& rB ) const
{
return(meStyle == rB.meStyle
@@ -72,29 +59,15 @@ LineInfo::LineInfo( LineStyle eStyle, long nWidth ) : mpImplLineInfo()
mpImplLineInfo->mnWidth = nWidth;
}
-LineInfo::LineInfo( const LineInfo& rLineInfo ) : mpImplLineInfo(rLineInfo.mpImplLineInfo)
-{
-}
+LineInfo::LineInfo( const LineInfo& ) = default;
-LineInfo::LineInfo( LineInfo&& rLineInfo ) : mpImplLineInfo(std::move(rLineInfo.mpImplLineInfo))
-{
-}
+LineInfo::LineInfo( LineInfo&& ) = default;
-LineInfo::~LineInfo()
-{
-}
+LineInfo::~LineInfo() = default;
-LineInfo& LineInfo::operator=( const LineInfo& rLineInfo )
-{
- mpImplLineInfo = rLineInfo.mpImplLineInfo;
- return *this;
-}
+LineInfo& LineInfo::operator=( const LineInfo& ) = default;
-LineInfo& LineInfo::operator=( LineInfo&& rLineInfo )
-{
- mpImplLineInfo = std::move(rLineInfo.mpImplLineInfo);
- return *this;
-}
+LineInfo& LineInfo::operator=( LineInfo&& ) = default;
bool LineInfo::operator==( const LineInfo& rLineInfo ) const
{
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 740794e67bde..6d5573414c57 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -52,14 +52,7 @@ MapMode::ImplMapMode::ImplMapMode() :
mbSimple = true;
}
-MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
- meUnit( rImplMapMode.meUnit ),
- maOrigin( rImplMapMode.maOrigin ),
- maScaleX( rImplMapMode.maScaleX ),
- maScaleY( rImplMapMode.maScaleY ),
- mbSimple( rImplMapMode.mbSimple )
-{
-}
+MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& ) = default;
bool MapMode::ImplMapMode::operator==( const ImplMapMode& rImpMapMode ) const
{
@@ -79,9 +72,7 @@ MapMode::MapMode() : mpImplMapMode(theGlobalDefault::get())
{
}
-MapMode::MapMode( const MapMode& rMapMode ) : mpImplMapMode( rMapMode.mpImplMapMode )
-{
-}
+MapMode::MapMode( const MapMode& ) = default;
MapMode::MapMode( MapUnit eUnit ) : mpImplMapMode()
{
@@ -100,9 +91,7 @@ MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg,
mpImplMapMode->mbSimple = false;
}
-MapMode::~MapMode()
-{
-}
+MapMode::~MapMode() = default;
void MapMode::SetMapUnit( MapUnit eUnit )
{
@@ -129,17 +118,9 @@ void MapMode::SetScaleY( const Fraction& rScaleY )
mpImplMapMode->mbSimple = false;
}
-MapMode& MapMode::operator=( const MapMode& rMapMode )
-{
- mpImplMapMode = rMapMode.mpImplMapMode;
- return *this;
-}
+MapMode& MapMode::operator=( const MapMode& ) = default;
-MapMode& MapMode::operator=( MapMode&& rMapMode )
-{
- mpImplMapMode = std::move(rMapMode.mpImplMapMode);
- return *this;
-}
+MapMode& MapMode::operator=( MapMode&& ) = default;
bool MapMode::operator==( const MapMode& rMapMode ) const
{
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6286f3a67c2e..67dd278e4bb4 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -336,19 +336,9 @@ QueueInfo::QueueInfo()
mnJobs = 0;
}
-QueueInfo::QueueInfo( const QueueInfo& rInfo ) :
- maPrinterName( rInfo.maPrinterName ),
- maDriver( rInfo.maDriver ),
- maLocation( rInfo.maLocation ),
- maComment( rInfo.maComment ),
- mnStatus( rInfo.mnStatus ),
- mnJobs( rInfo.mnJobs )
-{
-}
+QueueInfo::QueueInfo( const QueueInfo& ) = default;
-QueueInfo::~QueueInfo()
-{
-}
+QueueInfo::~QueueInfo() = default;
SalPrinterQueueInfo::SalPrinterQueueInfo()
{
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 4c68d6ddee1c..e56228be8468 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -365,13 +365,7 @@ Region::Region(const basegfx::B2DPolyPolygon& rPolyPoly)
}
}
-Region::Region(const vcl::Region& rRegion)
-: mpB2DPolyPolygon(rRegion.mpB2DPolyPolygon),
- mpPolyPolygon(rRegion.mpPolyPolygon),
- mpRegionBand(rRegion.mpRegionBand),
- mbIsNull(rRegion.mbIsNull)
-{
-}
+Region::Region(const vcl::Region&) = default;
Region::Region(vcl::Region&& rRegion)
: mpB2DPolyPolygon(std::move(rRegion.mpB2DPolyPolygon)),
@@ -382,9 +376,7 @@ Region::Region(vcl::Region&& rRegion)
rRegion.mbIsNull = true;
}
-Region::~Region()
-{
-}
+Region::~Region() = default;
void vcl::Region::ImplCreatePolyPolyRegion( const tools::PolyPolygon& rPolyPoly )
{
@@ -1445,16 +1437,7 @@ void vcl::Region::SetEmpty()
mbIsNull = false;
}
-Region& vcl::Region::operator=( const vcl::Region& rRegion )
-{
- // reset all content
- mpB2DPolyPolygon = rRegion.mpB2DPolyPolygon;
- mpPolyPolygon = rRegion.mpPolyPolygon;
- mpRegionBand = rRegion.mpRegionBand;
- mbIsNull = rRegion.mbIsNull;
-
- return *this;
-}
+Region& vcl::Region::operator=( const vcl::Region& ) = default;
Region& vcl::Region::operator=( vcl::Region&& rRegion )
{
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 8898ec5f6ca3..3045dfe50a9c 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -142,15 +142,9 @@ Wallpaper::Wallpaper() : mpImplWallpaper(theGlobalDefault::get())
{
}
-Wallpaper::Wallpaper( const Wallpaper& rWallpaper )
- : mpImplWallpaper( rWallpaper.mpImplWallpaper)
-{
-}
+Wallpaper::Wallpaper( const Wallpaper& ) = default;
-Wallpaper::Wallpaper( Wallpaper&& rWallpaper )
- : mpImplWallpaper( std::move(rWallpaper.mpImplWallpaper) )
-{
-}
+Wallpaper::Wallpaper( Wallpaper&& ) = default;
Wallpaper::Wallpaper( const Color& rColor ) : mpImplWallpaper()
{
@@ -170,9 +164,7 @@ Wallpaper::Wallpaper( const Gradient& rGradient ) : mpImplWallpaper()
mpImplWallpaper->meStyle = WallpaperStyle::Tile;
}
-Wallpaper::~Wallpaper()
-{
-}
+Wallpaper::~Wallpaper() = default;
void Wallpaper::ImplSetCachedBitmap( BitmapEx& rBmp ) const
{
@@ -344,17 +336,9 @@ bool Wallpaper::IsScrollable() const
return false;
}
-Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper )
-{
- mpImplWallpaper = rWallpaper.mpImplWallpaper;
- return *this;
-}
+Wallpaper& Wallpaper::operator=( const Wallpaper& ) = default;
-Wallpaper& Wallpaper::operator=( Wallpaper&& rWallpaper )
-{
- mpImplWallpaper = std::move(rWallpaper.mpImplWallpaper);
- return *this;
-}
+Wallpaper& Wallpaper::operator=( Wallpaper&& ) = default;
bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const
{
More information about the Libreoffice-commits
mailing list