From 5639343fbb93e26499c4f592c8108a2efd1b5516 Mon Sep 17 00:00:00 2001 From: Joseph Powers Date: Thu, 25 Nov 2010 06:34:20 -0800 Subject: cppcheck: use ++i instead of i++ --- svx/source/svdraw/svdpntv.cxx | 104 +++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 734b123583..6b746d8b09 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -146,7 +146,7 @@ void ImplEncirclementOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPos SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const { - for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); a++) + for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); ++a) { if(&((*a)->GetOutputDevice()) == &rOut) { @@ -188,7 +188,7 @@ SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld) } OutputDevice* SdrPaintView::GetFirstOutputDevice() const -{ +{ if(PaintWindowCount()) { return &(GetPaintWindow(0)->GetOutputDevice()); @@ -280,7 +280,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut) pMod=pModel1; ImpClearVars(); - if(pOut) + if(pOut) { AddWindowToPaintView(pOut); } @@ -302,7 +302,7 @@ SdrPaintView::~SdrPaintView() ClearPageView(); #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { delete pItemBrowser; } @@ -344,9 +344,9 @@ void __EXPORT SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) } if (eKind==HINT_PAGEORDERCHG) { const SdrPage* pPg=pSdrHint->GetPage(); - - if(pPg && !pPg->IsInserted()) - { + + if(pPg && !pPg->IsInserted()) + { if(mpPageView && mpPageView->GetPage() == pPg) { HideSdrPage(); @@ -399,7 +399,7 @@ void SdrPaintView::ModelHasChanged() } #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { pItemBrowser->SetDirty(); } @@ -415,7 +415,7 @@ BOOL SdrPaintView::IsAction() const void SdrPaintView::MovAction(const Point& rPnt) { - if (IsEncirclement()) + if (IsEncirclement()) { MovEncirclement(rPnt); } @@ -423,7 +423,7 @@ void SdrPaintView::MovAction(const Point& rPnt) void SdrPaintView::EndAction() { - if(IsEncirclement()) + if(IsEncirclement()) { EndEncirclement(); } @@ -441,7 +441,7 @@ void SdrPaintView::BrkAction() void SdrPaintView::TakeActionRect(Rectangle& rRect) const { - if(IsEncirclement()) + if(IsEncirclement()) { rRect = Rectangle(aDragStat.GetStart(),aDragStat.GetNow()); } @@ -465,7 +465,7 @@ SdrPageView* SdrPaintView::GetTextEditPageView() const USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const { if (nMinMov>=0) return USHORT(nMinMov); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -479,7 +479,7 @@ USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) USHORT SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const { if (nHitTol>=0) return USHORT(nHitTol); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -521,7 +521,7 @@ void SdrPaintView::BegEncirclement(const Point& rPnt) void SdrPaintView::MovEncirclement(const Point& rPnt) { - if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) + if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) { aDragStat.NextMove(rPnt); @@ -537,10 +537,10 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) if(IsEncirclement()) { - if(aDragStat.IsMinMoved()) + if(aDragStat.IsMinMoved()) { aRetval = Rectangle(aDragStat.GetStart(), aDragStat.GetNow()); - + if(!bNoJustify) { aRetval.Justify(); @@ -556,7 +556,7 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) void SdrPaintView::BrkEncirclement() { - if(IsEncirclement()) + if(IsEncirclement()) { DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)"); delete mpEncirclementOverlay; @@ -617,7 +617,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -639,7 +639,7 @@ void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -688,7 +688,7 @@ bool SdrPaintView::IsLayerLocked(const XubString& rName) const { return mpPageView->IsLayerLocked(rName); } - + return false; } @@ -759,11 +759,11 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c #endif // SVX_REPAINT_TIMER_TEST // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType()) { Window* pWindow = (Window*)pOut; @@ -781,7 +781,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -957,11 +957,11 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& if(pKnownTarget) { // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + // #i76114# Intersecting the region with the Window's paint region is disabled // for print preview in Calc, because the intersection can be empty (if the paint // region is outside of the table area of the page), and then no clip region @@ -983,7 +983,7 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -1076,7 +1076,7 @@ void SdrPaintView::GlueInvalidate() const { SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); @@ -1104,7 +1104,7 @@ void SdrPaintView::InvalidateAllWin() { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { InvalidateOneWin((Window&)pPaintWindow->GetOutputDevice()); } @@ -1119,12 +1119,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); Rectangle aRect(rRect); - if(bPlus1Pix) + if(bPlus1Pix) { Size aPixSiz(1,1); Size aSiz(rOutDev.PixelToLogic(aPixSiz)); @@ -1133,12 +1133,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) aRect.Right ()+=aSiz.Width(); aRect.Bottom()+=aSiz.Height(); } - + Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); - - if (aRect.IsOver(aOutRect)) + + if (aRect.IsOver(aOutRect)) { InvalidateOneWin((Window&)rOutDev, aRect); } @@ -1381,16 +1381,16 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/) { } -void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) -{ - SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); +void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) +{ + SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); } -void SdrPaintView::SetAnimationPause( bool bSet ) -{ +void SdrPaintView::SetAnimationPause( bool bSet ) +{ if((bool)bAnimationPause != bSet) { - bAnimationPause = bSet; + bAnimationPause = bSet; if(mpPageView) { @@ -1409,9 +1409,9 @@ void SdrPaintView::SetAnimationPause( bool bSet ) } } -void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) -{ - eAnimationMode = eMode; +void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) +{ + eAnimationMode = eMode; } void SdrPaintView::VisAreaChanged(const OutputDevice* pOut) @@ -1482,8 +1482,8 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor) } // #114898# -bool SdrPaintView::IsBufferedOutputAllowed() const -{ +bool SdrPaintView::IsBufferedOutputAllowed() const +{ return (mbBufferedOutputAllowed && maDrawinglayerOpt.IsPaintBuffer()); } @@ -1496,8 +1496,8 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew) } } -bool SdrPaintView::IsBufferedOverlayAllowed() const -{ +bool SdrPaintView::IsBufferedOverlayAllowed() const +{ return (mbBufferedOverlayAllowed && maDrawinglayerOpt.IsOverlayBuffer()); } @@ -1509,9 +1509,9 @@ void SdrPaintView::SetBufferedOverlayAllowed(bool bNew) } } -sal_Bool SdrPaintView::IsPagePaintingAllowed() const -{ - return mbPagePaintingAllowed; +sal_Bool SdrPaintView::IsPagePaintingAllowed() const +{ + return mbPagePaintingAllowed; } void SdrPaintView::SetPagePaintingAllowed(bool bNew) -- cgit v1.2.3