summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-05-04 08:02:47 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-05-05 23:38:36 +0200
commit6da921838f9756608553bd7dd231f4393ee0803d (patch)
tree7c0682e415e577ab4bc9a6a0a343c677908d97b3 /sw
parent5c793b582e5afda68bb6acf7aa22f70c48f59b12 (diff)
Use more proper integer types and range-based for loops
Change-Id: Icbda6c3ab23622e1d9f73d3a9a30ff0c278684cf
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx6
-rw-r--r--sw/source/core/view/vprint.cxx2
2 files changed, 4 insertions, 4 deletions
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