[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 18 10:42:48 UTC 2019


 vcl/source/outdev/bitmap.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9cf255dfeda194e601942ea5fcb4b562a080bd8b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 09:07:53 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 18 12:41:41 2019 +0200

    cid#1448479 Logically dead code
    
    Change-Id: I1190bd238fad3e5343e83f9c6261d71a44bc6717
    Reviewed-on: https://gerrit.libreoffice.org/75831
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index b33a5dfcefa6..acbd13e0a5ab 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1235,6 +1235,8 @@ void OutputDevice::DrawTransformedBitmapEx(
             return;
         }
 
+        assert(bSheared || bRotated); // at this point we are either sheared or rotated or both
+
         // fallback; create transformed bitmap the hard way (back-transform
         // the pixels) and paint
         basegfx::B2DRange aVisibleRange(0.0, 0.0, 1.0, 1.0);
@@ -1245,7 +1247,7 @@ void OutputDevice::DrawTransformedBitmapEx(
         // to avoid crashes/resource problems (ca. 1500x3000 here)
         const Size& rOriginalSizePixel(rBitmapEx.GetSizePixel());
         const double fOrigArea(rOriginalSizePixel.Width() * rOriginalSizePixel.Height() * 0.5);
-        const double fOrigAreaScaled(bSheared || bRotated ? fOrigArea * 1.44 : fOrigArea);
+        const double fOrigAreaScaled(fOrigArea * 1.44);
         double fMaximumArea(std::min(4500000.0, std::max(1000000.0, fOrigAreaScaled)));
 
         if(!bMetafile)


More information about the Libreoffice-commits mailing list