summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap3.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-03 16:29:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-03 16:36:55 +0200
commit0aa9cd69598e1c022aa676f81dc7bc2f03e58b2c (patch)
tree583321fe91b80c7caec107516b04fb9d471a113a /vcl/source/gdi/bitmap3.cxx
parent5ab60e85b1319e8bf0c698bc804bd78f3eb7a8ca (diff)
Fix mis-merge
...where fb6f2e1109abdd09e80dbcd6660a9530fc06ff0f "Resolves: #i121407# Gallery reorganizations..." first cherry-picked the younger 8012fae6cedcf325130d70adf0a486e8918f452f before f7d373d18f965b36f310d44044bdba6476f6eb03 "Added ColorDepth change test with assertion to the Bitmap::Scale method" then cherry-picked the older 4be8cc079667cca2cae91dba9e46c16ccff1537f, 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
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r--vcl/source/gdi/bitmap3.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index b2704e15c17a..9d1ec353b92c 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -873,22 +873,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
@@ -924,6 +922,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 :