summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2020-10-28 08:30:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-11 06:34:17 +0100
commit3d90997fb6f232d8008df4d166d7b97b869c200f (patch)
treed26a1756dac5b7b55fac0f4322fe25ea02e9017e /vcl/win/window/salframe.cxx
parent3de38e95561ab7ca114d9f3307702ba89c4e3e9a (diff)
make tools::Long 64-bit on Windows platform
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 13ae25af8225..ab4102056604 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1214,19 +1214,19 @@ void WinSalFrame::Show( bool bVisible, bool bNoActivate )
ImplSalShow( mhWnd, bVisible, bNoActivate );
}
-void WinSalFrame::SetMinClientSize( long nWidth, long nHeight )
+void WinSalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight )
{
mnMinWidth = nWidth;
mnMinHeight = nHeight;
}
-void WinSalFrame::SetMaxClientSize( long nWidth, long nHeight )
+void WinSalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight )
{
mnMaxWidth = nWidth;
mnMaxHeight = nHeight;
}
-void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
+void WinSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
sal_uInt16 nFlags )
{
bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
@@ -1578,7 +1578,7 @@ void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
rRect.SetBottom( aRect.bottom-1 );
}
-void WinSalFrame::GetClientSize( long& rWidth, long& rHeight )
+void WinSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight )
{
rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
@@ -1614,10 +1614,10 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState )
RECT aRect2 = aWinRect;
AdjustWindowRectEx( &aRect2, GetWindowStyle( mhWnd ),
FALSE, GetWindowExStyle( mhWnd ) );
- long nTopDeco = abs( aWinRect.top - aRect2.top );
- long nLeftDeco = abs( aWinRect.left - aRect2.left );
- long nBottomDeco = abs( aWinRect.bottom - aRect2.bottom );
- long nRightDeco = abs( aWinRect.right - aRect2.right );
+ tools::Long nTopDeco = abs( aWinRect.top - aRect2.top );
+ tools::Long nLeftDeco = abs( aWinRect.left - aRect2.left );
+ tools::Long nBottomDeco = abs( aWinRect.bottom - aRect2.bottom );
+ tools::Long nRightDeco = abs( aWinRect.right - aRect2.right );
// adjust window position/size to fit the screen
if ( !(pState->mnMask & (WindowStateMask::X | WindowStateMask::Y)) )
@@ -2176,7 +2176,7 @@ void WinSalFrame::CaptureMouse( bool bCapture )
SendMessageW( mhWnd, nMsg, 0, 0 );
}
-void WinSalFrame::SetPointerPos( long nX, long nY )
+void WinSalFrame::SetPointerPos( tools::Long nX, tools::Long nY )
{
POINT aPt;
aPt.x = static_cast<int>(nX);
@@ -2927,15 +2927,15 @@ void WinSalFrame::BeginSetClipRegion( sal_uInt32 nRects )
mbFirstClipRect = true;
}
-void WinSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void WinSalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if( ! mpClipRgnData )
return;
RECT* pRect = mpNextClipRect;
RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ tools::Long nRight = nX + nWidth;
+ tools::Long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
@@ -4520,7 +4520,7 @@ static LRESULT ImplMeasureItem( HWND hWnd, WPARAM wParam, LPARAM lParam )
Size checkSize( GetSystemMetrics( SM_CXMENUCHECK ), GetSystemMetrics( SM_CYMENUCHECK ) );
pMI->itemWidth = checkSize.Width() + 3 + bmpSize.Width() + 3 + strSize.cx;
- pMI->itemHeight = std::max( std::max( checkSize.Height(), bmpSize.Height() ), strSize.cy );
+ pMI->itemHeight = std::max( std::max( checkSize.Height(), bmpSize.Height() ), tools::Long(strSize.cy) );
pMI->itemHeight += 4;
DeleteObject( SelectObject(hdc, hfntOld) );