summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2010-11-25 06:34:20 -0800
committerJoseph Powers <jpowers27@cox.net>2010-11-25 06:34:20 -0800
commit5639343fbb93e26499c4f592c8108a2efd1b5516 (patch)
tree5ffbaf8daf9eca84078a88a8f3fc9c806fa396ce
parent4fb0d337b939674dde86255b3423273779f08e60 (diff)
cppcheck: use ++i instead of i++
-rw-r--r--desktop/source/migration/cfgfilter.cxx102
-rw-r--r--svx/source/svdraw/svdpntv.cxx104
2 files changed, 103 insertions, 103 deletions
diff --git a/desktop/source/migration/cfgfilter.cxx b/desktop/source/migration/cfgfilter.cxx
index 5220965edb..5928ad8ce7 100644
--- a/desktop/source/migration/cfgfilter.cxx
+++ b/desktop/source/migration/cfgfilter.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
@@ -45,15 +45,15 @@ namespace desktop {
CConfigFilter::CConfigFilter(const strings_v* include, const strings_v* exclude)
: m_pvInclude(include)
- , m_pvExclude(exclude)
+ , m_pvExclude(exclude)
{
-}
+}
void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
throw (Exception)
{
NamedValue nv;
- for (sal_Int32 i=0; i < seqArgs.getLength(); i++)
+ for (sal_Int32 i=0; i < seqArgs.getLength(); ++i)
{
if (seqArgs[i] >>= nv)
{
@@ -65,7 +65,7 @@ void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
}
if (m_aCurrentComponent.getLength() == 0)
m_aCurrentComponent = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown.component"));
-
+
if (!m_xSourceLayer.is()) {
throw Exception();
}
@@ -79,7 +79,7 @@ void CConfigFilter::pushElement(rtl::OUString aName, sal_Bool bUse)
if (!m_elementStack.empty()) {
aPath = m_elementStack.top().path; // or use base path
aPath += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- }
+ }
aPath += aName;
// create element
@@ -106,25 +106,25 @@ sal_Bool CConfigFilter::checkElement(rtl::OUString aName)
aFullPath = m_elementStack.top().path + OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aFullPath += aName;
-
+
// check whether any include patterns patch this path
for (strings_v::const_iterator i_in = m_pvInclude->begin();
- i_in != m_pvInclude->end(); i_in++)
+ i_in != m_pvInclude->end(); ++i_in)
{
// pattern is beginning of path
// or path is a begiing for pattern
- if (i_in->match(aFullPath.copy(0, i_in->getLength()>aFullPath.getLength()
- ? aFullPath.getLength() : i_in->getLength()), 0))
+ if (i_in->match(aFullPath.copy(0, i_in->getLength()>aFullPath.getLength()
+ ? aFullPath.getLength() : i_in->getLength()), 0))
{
bResult = sal_True;
break; // one match is enough
- }
+ }
}
// if match is found, check for exclusion
if (bResult)
{
for (strings_v::const_iterator i_ex = m_pvExclude->begin();
- i_ex != m_pvExclude->end(); i_ex++)
+ i_ex != m_pvExclude->end(); ++i_ex)
{
if (aFullPath.match(*i_ex, 0)) // pattern is beginning of path
{
@@ -142,13 +142,13 @@ void CConfigFilter::popElement()
}
-void SAL_CALL CConfigFilter::readData(
+void SAL_CALL CConfigFilter::readData(
const Reference< configuration::backend::XLayerHandler >& layerHandler)
throw (
com::sun::star::lang::NullPointerException, lang::WrappedTargetException,
com::sun::star::configuration::backend::MalformedDataException)
{
- // when readData is called, the submitted handler will be stored
+ // when readData is called, the submitted handler will be stored
// in m_xLayerHandler. we will then submit ourself as a handler to
// the SourceLayer in m_xSourceLayer.
// when the source calls our handler functions we will use the patterns that
@@ -165,23 +165,23 @@ void SAL_CALL CConfigFilter::readData(
}
// XLayerHandler
-void SAL_CALL CConfigFilter::startLayer()
+void SAL_CALL CConfigFilter::startLayer()
throw(::com::sun::star::lang::WrappedTargetException)
{
m_xLayerHandler->startLayer();
}
-void SAL_CALL CConfigFilter::endLayer()
- throw(
+void SAL_CALL CConfigFilter::endLayer()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
m_xLayerHandler->endLayer();
}
-void SAL_CALL CConfigFilter::overrideNode(
- const OUString& aName,
- sal_Int16 aAttributes,
+void SAL_CALL CConfigFilter::overrideNode(
+ const OUString& aName,
+ sal_Int16 aAttributes,
sal_Bool bClear)
throw(
::com::sun::star::configuration::backend::MalformedDataException,
@@ -191,15 +191,15 @@ void SAL_CALL CConfigFilter::overrideNode(
{
m_xLayerHandler->overrideNode(aName, aAttributes, bClear);
pushElement(aName);
- }
+ }
else
pushElement(aName, sal_False);
}
void SAL_CALL CConfigFilter::addOrReplaceNode(
- const OUString& aName,
- sal_Int16 aAttributes)
- throw(
+ const OUString& aName,
+ sal_Int16 aAttributes)
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -212,10 +212,10 @@ void SAL_CALL CConfigFilter::addOrReplaceNode(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
+void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
const OUString& aName,
const com::sun::star::configuration::backend::TemplateIdentifier& aTemplate,
- sal_Int16 aAttributes )
+ sal_Int16 aAttributes )
throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
@@ -229,21 +229,21 @@ void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::endNode()
- throw(
+void SAL_CALL CConfigFilter::endNode()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
if (checkCurrentElement())
{
- m_xLayerHandler->endNode();
+ m_xLayerHandler->endNode();
}
popElement();
}
-void SAL_CALL CConfigFilter::dropNode(
- const OUString& aName )
- throw(
+void SAL_CALL CConfigFilter::dropNode(
+ const OUString& aName )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -254,12 +254,12 @@ void SAL_CALL CConfigFilter::dropNode(
}
}
-void SAL_CALL CConfigFilter::overrideProperty(
+void SAL_CALL CConfigFilter::overrideProperty(
const OUString& aName,
sal_Int16 aAttributes,
const Type& aType,
- sal_Bool bClear )
- throw(
+ sal_Bool bClear )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -271,9 +271,9 @@ void SAL_CALL CConfigFilter::overrideProperty(
pushElement(aName, sal_False);
}
-void SAL_CALL CConfigFilter::setPropertyValue(
- const Any& aValue )
- throw(
+void SAL_CALL CConfigFilter::setPropertyValue(
+ const Any& aValue )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -281,10 +281,10 @@ void SAL_CALL CConfigFilter::setPropertyValue(
m_xLayerHandler->setPropertyValue(aValue);
}
-void SAL_CALL CConfigFilter::setPropertyValueForLocale(
+void SAL_CALL CConfigFilter::setPropertyValueForLocale(
const Any& aValue,
- const OUString& aLocale )
- throw(
+ const OUString& aLocale )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -292,8 +292,8 @@ void SAL_CALL CConfigFilter::setPropertyValueForLocale(
m_xLayerHandler->setPropertyValueForLocale(aValue, aLocale);
}
-void SAL_CALL CConfigFilter::endProperty()
- throw(
+void SAL_CALL CConfigFilter::endProperty()
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
@@ -305,30 +305,30 @@ void SAL_CALL CConfigFilter::endProperty()
}
-void SAL_CALL CConfigFilter::addProperty(
+void SAL_CALL CConfigFilter::addProperty(
const rtl::OUString& aName,
sal_Int16 aAttributes,
const Type& aType )
- throw(
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
- if (checkElement(aName))
+ if (checkElement(aName))
m_xLayerHandler->addProperty(aName, aAttributes, aType);
}
-void SAL_CALL CConfigFilter::addPropertyWithValue(
+void SAL_CALL CConfigFilter::addPropertyWithValue(
const rtl::OUString& aName,
sal_Int16 aAttributes,
- const Any& aValue )
- throw(
+ const Any& aValue )
+ throw(
::com::sun::star::configuration::backend::MalformedDataException,
::com::sun::star::lang::WrappedTargetException )
{
// add property with value doesn't push the property
- if (checkElement(aName))
+ if (checkElement(aName))
m_xLayerHandler->addPropertyWithValue(aName, aAttributes, aValue);
-
+
}
} // namespace desktop
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)