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

Stephan Bergmann sbergman at redhat.com
Fri Jun 30 06:58:03 UTC 2017


 vcl/source/window/window.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit bba50dbe7e0fd16fba324c675d49991afd62bcb1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 30 08:57:26 2017 +0200

    Fix previous commit for non-MACOSX
    
    Change-Id: I5192d299910120e65ad577fa63846e13a1c31e76

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a300b012b587..04d8e8d5c3b2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -926,8 +926,6 @@ void Window::ReleaseGraphics( bool bRelease )
 
 static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
 {
-    sal_Int32 nResult;
-
 #ifndef MACOSX
     // Setting of HiDPI is unfortunately all only a heuristic; and to add
     // insult to an injury, the system is constantly lying to us about
@@ -935,17 +933,16 @@ static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
     // eg. fdo#77059 - set the value from which we do consider the
     // screen hi-dpi to greater than 168
     if (nDPI > 216)      // 96 * 2   + 96 / 4
-        nResult = 250;
+        return 250;
     else if (nDPI > 168) // 96 * 2   - 96 / 4
-        nResult = 200;
+        return 200;
     else if (nDPI > 120) // 96 * 1.5 - 96 / 4
-        nResult = 150;
+        return 150;
 #else
     (void)nDPI;
-    nResult = 100;
 #endif
 
-    return nResult;
+    return 100;
 }
 
 void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )


More information about the Libreoffice-commits mailing list