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@collabora.com>
This commit is contained in:
Mike Kaganski 2021-06-14 19:06:26 +02:00
parent b525bc6235
commit 57d1222584

View file

@ -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;
}