From 6da921838f9756608553bd7dd231f4393ee0803d Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Mon, 4 May 2015 08:02:47 +0200 Subject: Use more proper integer types and range-based for loops Change-Id: Icbda6c3ab23622e1d9f73d3a9a30ff0c278684cf --- sw/source/core/view/viewsh.cxx | 6 +++--- sw/source/core/view/vprint.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 12591b989349..bbed011bf66a 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -926,7 +926,7 @@ void SwViewShell::CalcLayout() const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0; if ( bEndProgress ) { - sal_uInt16 nEndPage = GetLayout()->GetPageNum(); + long nEndPage = GetLayout()->GetPageNum(); nEndPage += nEndPage * 10 / 100; ::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() ); } @@ -1492,9 +1492,9 @@ void SwViewShell::_PaintDesktop( const SwRegionRects &rRegion ) GetOut()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); GetOut()->SetLineColor(); - for ( sal_uInt16 i = 0; i < rRegion.size(); ++i ) + for ( auto &rRgn : rRegion ) { - const Rectangle aRectangle(rRegion[i].SVRect()); + const Rectangle aRectangle(rRgn.SVRect()); // #i93170# // Here we have a real Problem. On the one hand we have the buffering for paint diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 4bc1c06207c6..92ad716a076e 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -378,7 +378,7 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) // get page descriptor - fall back to the first one if pPage could not be found const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDesc( - pPage->GetPageDesc()->GetName() ) : &pPrtDoc->GetPageDesc( (sal_uInt16)0 ); + pPage->GetPageDesc()->GetName() ) : &pPrtDoc->GetPageDesc( 0 ); if( !pFESh->IsTableMode() && pActCrsr && pActCrsr->HasMark() ) { // Tweak paragraph attributes of last paragraph -- cgit