diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-04-05 16:02:17 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-04-05 11:03:49 +0200 |
commit | 4eaa447630756f64bceba81e1a787c289c120152 (patch) | |
tree | af31eaf5940c2f5188b7ef82550959e23b9c23a1 /vcl/source/bitmap/bitmap.cxx | |
parent | 4e9dbb4c81dfd99cfec4a36372b09a96ad4d4133 (diff) |
vcl: ImplAssignWithSize() -> ReassignWithSize()
Change-Id: I278a976028762f5c101dfd46ee62c4aa06bd719d
Reviewed-on: https://gerrit.libreoffice.org/52422
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/bitmap/bitmap.cxx')
-rw-r--r-- | vcl/source/bitmap/bitmap.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index bf13e87fe68c..86868f70826a 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -302,20 +302,22 @@ void Bitmap::ImplMakeUnique() } } -void Bitmap::ImplAssignWithSize( const Bitmap& rBitmap ) +void Bitmap::ReassignWithSize(const Bitmap& rBitmap) { - const Size aOldSizePix( GetSizePixel() ); - const Size aNewSizePix( rBitmap.GetSizePixel() ); - const MapMode aOldMapMode( maPrefMapMode ); - Size aNewPrefSize; + const Size aOldSizePix(GetSizePixel()); + const Size aNewSizePix(rBitmap.GetSizePixel()); + const MapMode aOldMapMode(maPrefMapMode); + Size aNewPrefSize; - if( ( aOldSizePix != aNewSizePix ) && aOldSizePix.Width() && aOldSizePix.Height() ) + if ((aOldSizePix != aNewSizePix) && aOldSizePix.Width() && aOldSizePix.Height()) { - aNewPrefSize.setWidth( FRound( maPrefSize.Width() * aNewSizePix.Width() / aOldSizePix.Width() ) ); - aNewPrefSize.setHeight( FRound( maPrefSize.Height() * aNewSizePix.Height() / aOldSizePix.Height() ) ); + aNewPrefSize.setWidth(FRound(maPrefSize.Width() * aNewSizePix.Width() / aOldSizePix.Width())); + aNewPrefSize.setHeight(FRound(maPrefSize.Height() * aNewSizePix.Height() / aOldSizePix.Height())); } else + { aNewPrefSize = maPrefSize; + } *this = rBitmap; @@ -413,7 +415,7 @@ bool Bitmap::Crop( const tools::Rectangle& rRectPixel ) pReadAcc.reset(); if( bRet ) - ImplAssignWithSize( aNewBmp ); + ReassignWithSize( aNewBmp ); } } @@ -810,8 +812,8 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) pReadAcc.reset(); - if( bRet ) - ImplAssignWithSize( aNewBmp ); + if (bRet) + ReassignWithSize(aNewBmp); } } |