[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/source
Stephan Bergmann
sbergman at redhat.com
Fri Sep 4 03:19:19 PDT 2015
vcl/source/gdi/bitmap3.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 47cac2f3f42e127c51a900cb5a98d32f7044c5fe
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 3 16:29:31 2015 +0200
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
(cherry picked from commit 0aa9cd69598e1c022aa676f81dc7bc2f03e58b2c)
Reviewed-on: https://gerrit.libreoffice.org/18311
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 6891289..a38f6d5 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -859,22 +859,20 @@ bool Bitmap::ImplConvertGhosted()
bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 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
@@ -910,6 +908,8 @@ bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nSc
if (nStartCount == 1 && nScaleFlag != BMP_SCALE_NONE)
nScaleFlag = BMP_SCALE_FAST;
+ bool bRetval(false);
+
switch(nScaleFlag)
{
case BMP_SCALE_NONE :
More information about the Libreoffice-commits
mailing list