Kaydet (Commit) 6da92183 authored tarafından Matteo Casalin's avatar Matteo Casalin

Use more proper integer types and range-based for loops

Change-Id: Icbda6c3ab23622e1d9f73d3a9a30ff0c278684cf
üst 5c793b58
...@@ -926,7 +926,7 @@ void SwViewShell::CalcLayout() ...@@ -926,7 +926,7 @@ void SwViewShell::CalcLayout()
const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0; const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress ) if ( bEndProgress )
{ {
sal_uInt16 nEndPage = GetLayout()->GetPageNum(); long nEndPage = GetLayout()->GetPageNum();
nEndPage += nEndPage * 10 / 100; nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() ); ::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
} }
...@@ -1492,9 +1492,9 @@ void SwViewShell::_PaintDesktop( const SwRegionRects &rRegion ) ...@@ -1492,9 +1492,9 @@ void SwViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); GetOut()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
GetOut()->SetLineColor(); 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# // #i93170#
// Here we have a real Problem. On the one hand we have the buffering for paint // Here we have a real Problem. On the one hand we have the buffering for paint
......
...@@ -378,7 +378,7 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) ...@@ -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 // get page descriptor - fall back to the first one if pPage could not be found
const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDesc( 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() ) if( !pFESh->IsTableMode() && pActCrsr && pActCrsr->HasMark() )
{ // Tweak paragraph attributes of last paragraph { // Tweak paragraph attributes of last paragraph
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment