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

Armin Le Grand Armin.Le.Grand at cib.de
Wed Apr 4 12:05:32 UTC 2018


 vcl/source/window/printdlg.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d940d478be430ea59956dacc42df1f4fd2126506
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Wed Apr 4 12:31:08 2018 +0200

    PrintPreviewWindow dynamic preview Bitmap III
    
    Corrected condition for test if maximum is reached
    
    Change-Id: I24795dfa15093fe0f4eb71d94e18b9f0a33a6891
    Reviewed-on: https://gerrit.libreoffice.org/52372
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 23da5dd941d5..6ca8876aea27 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -331,7 +331,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap()
     const double fPreviewSizeSquare(static_cast<double>(maPreviewBitmap.GetSizePixel().getWidth() * maPreviewBitmap.GetSizePixel().getHeight()));
 
     // test as equal up to 0.1% (0.001)
-    if(fPreviewSizeSquare == 0.0 || fabs((fScaledSizeSquare / fPreviewSizeSquare) - 1.0) < 0.001)
+    if(fPreviewSizeSquare != 0.0 && fabs((fScaledSizeSquare / fPreviewSizeSquare) - 1.0) < 0.001)
     {
         // maximum is reached, avoid bigger scaling
         return;


More information about the Libreoffice-commits mailing list