Kaydet (Commit) c4dc8406 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Andras Timar

Fix mis-merge

...where fb6f2e11 "Resolves: #i121407# Gallery
reorganizations..." first cherry-picked the younger 8012fae6cedcf325130d70adf0a486e8918f452f
before f7d373d1 "Added ColorDepth change test with assertion to
the Bitmap::Scale method" then cherry-picked the older 4be8cc07,
leading to the two checks at the top of Bitmap::Scale to not return early as intended.

Thanks to clang-tidy clang-analyzer-deadcode.DeadStores for flagging this.

Change-Id: Id89cc517a9f7efdff040c70f3b0e640d969cf24d
(cherry picked from commit 0aa9cd69)
Reviewed-on: https://gerrit.libreoffice.org/18310Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 26be1fc2
......@@ -866,22 +866,20 @@ bool Bitmap::ImplConvertGhosted()
bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag )
{
bool bRetval(false);
const sal_uInt16 nStartCount(GetBitCount());
if(basegfx::fTools::equalZero(rScaleX) || basegfx::fTools::equalZero(rScaleY))
{
// no scale
bRetval = true;
return true;
}
if(basegfx::fTools::equal(rScaleX, 1.0) && basegfx::fTools::equal(rScaleY, 1.0))
{
// no scale
bRetval = true;
return true;
}
const sal_uInt16 nStartCount(GetBitCount());
if( mpImpBmp )
{
// implementation specific scaling
......@@ -917,6 +915,8 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag n
if (nStartCount == 1 && nScaleFlag != BmpScaleFlag::NONE)
nScaleFlag = BmpScaleFlag::Fast;
bool bRetval(false);
switch(nScaleFlag)
{
case BmpScaleFlag::NONE :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment