summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/pagechg.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-07 11:45:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-07 14:13:18 +0200
commitd36f7c5bd2115fcdd26ba8ff7b6a0446dea70bd4 (patch)
tree5ae4b15f3302a538ac55d714ba0529ca4c1de87a /sw/source/core/layout/pagechg.cxx
parent61d57bcebd1a246603cbcd9ad5e0a7df1a8d66cd (diff)
Revert "long->sal_Int32 in tools/gen.hxx"
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r--sw/source/core/layout/pagechg.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index d787389b1934..238f44cc1afb 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -184,7 +184,7 @@ SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPg
else
m_bHasGrid = false;
SetMaxFootnoteHeight( pPgDsc->GetFootnoteInfo().GetHeight() ?
- pPgDsc->GetFootnoteInfo().GetHeight() : SAL_MAX_INT32 );
+ pPgDsc->GetFootnoteInfo().GetHeight() : LONG_MAX );
mnFrameType = SwFrameType::Page;
m_bInvalidLayout = m_bInvalidContent = m_bInvalidSpelling = m_bInvalidSmartTags = m_bInvalidAutoCmplWrds = m_bInvalidWordCount = true;
m_bInvalidFlyLayout = m_bInvalidFlyContent = m_bInvalidFlyInCnt = m_bFootnotePage = m_bEndNotePage = false;
@@ -551,7 +551,7 @@ void SwPageFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
SetMaxFootnoteHeight(m_pDesc->GetFootnoteInfo().GetHeight());
if(!GetMaxFootnoteHeight())
- SetMaxFootnoteHeight(SAL_MAX_INT32);
+ SetMaxFootnoteHeight(LONG_MAX);
SetColMaxFootnoteHeight();
// here, the page might be destroyed:
static_cast<SwRootFrame*>(GetUpper())->RemoveFootnotes(nullptr, false, true);
@@ -648,8 +648,8 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.Height( std::max<sal_Int32>( rSz.GetHeight(), MINLAY ) );
- aFrm.Width ( std::max<sal_Int32>( rSz.GetWidth(), MINLAY ) );
+ aFrm.Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
+ aFrm.Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
}
if ( GetUpper() )
@@ -1018,7 +1018,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
// For the update of page numbering fields, nDocPos provides
// the page position from where invalidation should start.
- SwTwips nDocPos = SAL_MAX_INT32;
+ SwTwips nDocPos = LONG_MAX;
SwRootFrame *pRoot = static_cast<SwRootFrame*>(pStart->GetUpper());
SwDoc* pDoc = pStart->GetFormat()->GetDoc();
@@ -1052,7 +1052,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
pImp->CheckWaitCursor();
// invalidate the field, starting from here
- if ( nDocPos == SAL_MAX_INT32 )
+ if ( nDocPos == LONG_MAX )
nDocPos = pPrevPage ? pPrevPage->getFrameArea().Top() : pPage->getFrameArea().Top();
// Cases:
@@ -1422,7 +1422,7 @@ void SwRootFrame::RemoveSuperfluous()
mbCheckSuperfluous = false;
SwPageFrame *pPage = GetLastPage();
- long nDocPos = SAL_MAX_INT32;
+ long nDocPos = LONG_MAX;
// Check the corresponding last page if it is empty and stop loop at the last non-empty page.
do
@@ -1488,7 +1488,7 @@ void SwRootFrame::RemoveSuperfluous()
} while ( pPage );
SwViewShell *pSh = getRootFrame()->GetCurrShell();
- if ( nDocPos != SAL_MAX_INT32 &&
+ if ( nDocPos != LONG_MAX &&
(!pSh || !pSh->Imp()->IsUpdateExpFields()) )
{
SwDocPosUpdate aMsgHint( nDocPos );
@@ -2291,7 +2291,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
const bool bLastColumn = pPageToAdjust->GetNext() == pEndOfRow;
const bool bLastRow = !pEndOfRow;
- nMinPageLeft = std::min<sal_Int32>( nMinPageLeft, aNewPagePos.getX() );
+ nMinPageLeft = std::min( nMinPageLeft, aNewPagePos.getX() );
nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.getX() + nCurrentPageWidth);
// border of nGapBetweenPages around the current page: