diff options
author | Noel Grandin <noel@peralex.com> | 2020-10-28 08:30:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-11 06:34:17 +0100 |
commit | 3d90997fb6f232d8008df4d166d7b97b869c200f (patch) | |
tree | d26a1756dac5b7b55fac0f4322fe25ea02e9017e /sc | |
parent | 3de38e95561ab7ca114d9f3307702ba89c4e3e9a (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 'sc')
-rw-r--r-- | sc/source/core/data/fillinfo.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xltools.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 3507a4fd7025..0a2d84f7727b 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -973,7 +973,7 @@ void ScDocument::FillInfo( { tools::Long nSize = 0; for( SCCOL nDocCol = nFirstRealDocCol; nDocCol < nFirstDocCol; ++nDocCol ) - nSize += std::max( static_cast< tools::Long >( GetColWidth( nDocCol, nTab ) * fColScale ), 1L ); + nSize += std::max( tools::Long(GetColWidth( nDocCol, nTab ) * fColScale), tools::Long(1) ); rArray.SetAddMergedLeftSize( nCol, nRow, nSize ); } // additional space after last column @@ -981,7 +981,7 @@ void ScDocument::FillInfo( { tools::Long nSize = 0; for( SCCOL nDocCol = nLastDocCol + 1; nDocCol <= nLastRealDocCol; ++nDocCol ) - nSize += std::max( static_cast< tools::Long >( GetColWidth( nDocCol, nTab ) * fColScale ), 1L ); + nSize += std::max( tools::Long(GetColWidth( nDocCol, nTab ) * fColScale), tools::Long(1) ); rArray.SetAddMergedRightSize( nCol, nRow, nSize ); } // additional space above first row @@ -989,7 +989,7 @@ void ScDocument::FillInfo( { tools::Long nSize = 0; for( SCROW nDocRow = nFirstRealDocRow; nDocRow < nFirstDocRow; ++nDocRow ) - nSize += std::max( static_cast< tools::Long >( GetRowHeight( nDocRow, nTab ) * fRowScale ), 1L ); + nSize += std::max( tools::Long(GetRowHeight( nDocRow, nTab ) * fRowScale), tools::Long(1) ); rArray.SetAddMergedTopSize( nCol, nRow, nSize ); } // additional space beyond last row @@ -997,7 +997,7 @@ void ScDocument::FillInfo( { tools::Long nSize = 0; for( SCROW nDocRow = nLastDocRow + 1; nDocRow <= nLastRealDocRow; ++nDocRow ) - nSize += std::max( static_cast< tools::Long >( GetRowHeight( nDocRow, nTab ) * fRowScale ), 1L ); + nSize += std::max( tools::Long(GetRowHeight( nDocRow, nTab ) * fRowScale), tools::Long(1) ); rArray.SetAddMergedBottomSize( nCol, nRow, nSize ); } diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index 8ab44ed5a87f..8654ed5d444d 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -340,7 +340,7 @@ double XclTools::GetXclDefColWidthCorrection( tools::Long nXclDefFontHeight ) // TODO: convert this to take font digit width directly (and possibly DPI?), to avoid guessing // the digit width and pixel size. Or DPI might stay 96, to not follow Excel dependency on DPI // in addition to used font, and have absolute size of the correction fixed 5/96 in. - return 40960.0 / ::std::max( nXclDefFontHeight - 15, 60L ) + 50.0; + return 40960.0 / ::std::max( nXclDefFontHeight - 15, tools::Long(60) ) + 50.0; } // formatting |