diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 09:50:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 10:37:51 +0200 |
commit | 8bc951daf79decbd8a599a409c6d33c5456710e0 (patch) | |
tree | 61d220d83e90a176fbcbe667827eee4b9631a4ca /sw/source/core/layout/pagechg.cxx | |
parent | 10eefdfa6c0250c6069e641e404f34e5a91fe993 (diff) |
long->sal_Int32 in tools/gen.hxx
which triggered a lot of changes in sw/
Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6
Reviewed-on: https://gerrit.libreoffice.org/48806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 238f44cc1afb..d787389b1934 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() : LONG_MAX ); + pPgDsc->GetFootnoteInfo().GetHeight() : SAL_MAX_INT32 ); 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(LONG_MAX); + SetMaxFootnoteHeight(SAL_MAX_INT32); 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( rSz.GetHeight(), long(MINLAY) ) ); - aFrm.Width ( std::max( rSz.GetWidth(), long(MINLAY) ) ); + aFrm.Height( std::max<sal_Int32>( rSz.GetHeight(), MINLAY ) ); + aFrm.Width ( std::max<sal_Int32>( rSz.GetWidth(), 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 = LONG_MAX; + SwTwips nDocPos = SAL_MAX_INT32; 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 == LONG_MAX ) + if ( nDocPos == SAL_MAX_INT32 ) nDocPos = pPrevPage ? pPrevPage->getFrameArea().Top() : pPage->getFrameArea().Top(); // Cases: @@ -1422,7 +1422,7 @@ void SwRootFrame::RemoveSuperfluous() mbCheckSuperfluous = false; SwPageFrame *pPage = GetLastPage(); - long nDocPos = LONG_MAX; + long nDocPos = SAL_MAX_INT32; // 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 != LONG_MAX && + if ( nDocPos != SAL_MAX_INT32 && (!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( nMinPageLeft, aNewPagePos.getX() ); + nMinPageLeft = std::min<sal_Int32>( nMinPageLeft, aNewPagePos.getX() ); nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.getX() + nCurrentPageWidth); // border of nGapBetweenPages around the current page: |