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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 10 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 2925183e9cf7..fb70bf4b1844 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -759,7 +759,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) ImplInitLayoutMode( GetRefDevice(), nPara, nIndex ); - std::unique_ptr<long[]> pBuf(new long[ pNode->Len() ]); + std::unique_ptr<tools::Long[]> pBuf(new tools::Long[ pNode->Len() ]); bool bSameLineAgain = false; // For TextRanger, if the height changes. TabInfo aCurrentTab; @@ -1050,7 +1050,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) OUString aFieldValue = static_cast<const EditCharAttribField*>(pNextFeature)->GetFieldValue(); // get size, but also DXArray to allow length information in line breaking below const sal_Int32 nLength(aFieldValue.getLength()); - std::unique_ptr<long[]> pTmpDXArray(new long[nLength]); + std::unique_ptr<tools::Long[]> pTmpDXArray(new tools::Long[nLength]); pPortion->GetSize() = aTmpFont.QuickGetTextSize(GetRefDevice(), aFieldValue, 0, aFieldValue.getLength(), pTmpDXArray.get()); // So no scrolling for oversized fields @@ -3176,7 +3176,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po sal_Int32 nTextStart = 0; sal_Int32 nTextLen = 0; const tools::Long* pDXArray = nullptr; - std::unique_ptr<long[]> pTmpDXArray; + std::unique_ptr<tools::Long[]> pTmpDXArray; if ( rTextPortion.GetKind() == PortionKind::TEXT ) { @@ -3363,7 +3363,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po } } - pTmpDXArray.reset(new long[ aText.getLength() ]); + pTmpDXArray.reset(new tools::Long[ aText.getLength() ]); pDXArray = pTmpDXArray.get(); aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, pTmpDXArray.get() ); @@ -3390,7 +3390,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po nTextLen = aText.getLength(); // crash when accessing 0 pointer in pDXArray - pTmpDXArray.reset(new long[ aText.getLength() ]); + pTmpDXArray.reset(new tools::Long[ aText.getLength() ]); pDXArray = pTmpDXArray.get(); aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), pTmpDXArray.get() ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 73c62414bd53..d6f1301a8424 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -976,7 +976,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, if(bStrippingPortions) { const vcl::Font& aSvxFont(pOutDev->GetFont()); - std::unique_ptr<long[]> pBuf(new long[ pPara->GetText().getLength() ]); + std::unique_ptr<tools::Long[]> pBuf(new tools::Long[ pPara->GetText().getLength() ]); pOutDev->GetTextArray( pPara->GetText(), pBuf.get() ); if(bSymbol) |