summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/core/drawdoc2.cxx4
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx10
3 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index b5546c1d4066..2a12ebc9a600 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -569,8 +569,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const * pRefDocument /* =
sal_uLong nTop = aPageOffset.Y();
sal_uLong nLeft = aPageOffset.X();
- sal_uLong nBottom = std::max(static_cast<::tools::Long>(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), 0L);
- sal_uLong nRight = std::max(static_cast<::tools::Long>(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), 0L);
+ sal_uLong nBottom = std::max(::tools::Long(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), ::tools::Long(0));
+ sal_uLong nRight = std::max(::tools::Long(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), ::tools::Long(0));
pPage->SetBorder(nLeft, nTop, nRight, nBottom);
}
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index e84b4cce95f4..a7bcee55aaea 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -137,7 +137,7 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf )
if( !!aTmp )
{
- const Link<long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) );
+ const Link<::tools::Long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) );
aTmp.Vectorize( rMtf, static_cast<sal_uInt8>(m_xMtReduce->get_value(FieldUnit::NONE)), &aPrgsHdl );
if (m_xCbFillHoles->get_active())
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 53dd0f75c688..18ec833b160f 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -565,8 +565,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
}
else
{
- ::tools::Long nLeft = std::max(0L, rLRSpace.GetLeft() - aPagePos.X());
- ::tools::Long nRight = std::max(0L, rLRSpace.GetRight() + aPagePos.X() +
+ ::tools::Long nLeft = std::max(::tools::Long(0), rLRSpace.GetLeft() - aPagePos.X());
+ ::tools::Long nRight = std::max(::tools::Long(0), rLRSpace.GetRight() + aPagePos.X() +
aPageSize.Width() - aViewSize.Width());
sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
@@ -631,8 +631,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
}
else
{
- ::tools::Long nUpper = std::max(0L, rULSpace.GetUpper() - aPagePos.Y());
- ::tools::Long nLower = std::max(0L, rULSpace.GetLower() + aPagePos.Y() +
+ ::tools::Long nUpper = std::max(::tools::Long(0), rULSpace.GetUpper() - aPagePos.Y());
+ ::tools::Long nLower = std::max(::tools::Long(0), rULSpace.GetLower() + aPagePos.Y() +
aPageSize.Height() - aViewSize.Height());
sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
@@ -841,7 +841,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
// like that.
const auto nAbsLSpace=aFormat.GetAbsLSpace();
const ::tools::Long nTxtLeft=rItem.GetTextLeft();
- const ::tools::Long nLeftIndent=std::max(0L,nTxtLeft - nAbsLSpace);
+ const ::tools::Long nLeftIndent=std::max(::tools::Long(0),nTxtLeft - nAbsLSpace);
aLRSpaceItem.SetTextLeft(nLeftIndent);
// control for clipped left indent - remainder
// reduces number format first line indent