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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 14 19:11:47 UTC 2021


 vcl/win/app/salinfo.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 57d122258437c0a14b303a8d961aa5e8f6f67f57
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jun 14 19:06:26 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jun 14 21:11:07 2021 +0200

    tdf#142832: a blind fix - calculate rectangle size properly
    
    The size was calculated wrong - it needed a "+1". But a rectangle
    constructor taking L, T, R, and B is actually simpler.
    
    Change-Id: I4152f9b43f0ae8f1829038645fcf83bae156c618
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117129
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index 2787797a6ce5..547e54ce54f6 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -65,10 +65,8 @@ bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I
         if( it != m_aDeviceNameToMonitor.end() )
         {
             DisplayMonitor& rMon( m_aMonitors[ it->second ] );
-            rMon.m_aArea = tools::Rectangle( Point( aInfo.rcMonitor.left,
-                                             aInfo.rcMonitor.top ),
-                                      Size( aInfo.rcMonitor.right - aInfo.rcMonitor.left,
-                                            aInfo.rcMonitor.bottom - aInfo.rcMonitor.top ) );
+            rMon.m_aArea = tools::Rectangle(aInfo.rcMonitor.left, aInfo.rcMonitor.top,
+                                            aInfo.rcMonitor.right, aInfo.rcMonitor.bottom);
             if( (aInfo.dwFlags & MONITORINFOF_PRIMARY) != 0 )
                 m_nPrimary = it->second;
         }


More information about the Libreoffice-commits mailing list