summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-03-30 17:39:58 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-03-30 17:39:58 +0100
commit9a62bcf53ffc21ebcf7a09ad3be62cc210892168 (patch)
treea76e90ad777b382fedd70dc5fa9347580fafedc9 /svx
parent89789bfd53ec69db9a33dd23deb438c0cdab9874 (diff)
Prefer prefix ++/-- operators for non-primitive types
+ convert while loops into for loops Change-Id: Icb01b55d2932193f83344bda8c69c9a9954f6de0
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdoashp.cxx30
1 files changed, 12 insertions, 18 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index c2a69891eeaf..7bc80fd5c4a5 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1578,8 +1578,8 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co
}
}
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() );
+ aIter != aEnd; ++aIter )
{
try
{
@@ -1599,7 +1599,6 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co
catch ( const uno::RuntimeException& )
{
}
- aIter++;
}
InvalidateRenderGeometry();
}
@@ -2008,8 +2007,8 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj
pObj->NbcMirror( aLeft, aRight );
}
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() );
+ aIter != aEnd ; ++aIter )
{
try
{
@@ -2061,7 +2060,6 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj
catch ( const uno::RuntimeException& )
{
}
- aIter++;
}
}
}
@@ -2088,15 +2086,14 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point aDestination, const
pObj->SetRectsDirty(sal_True);
pObj->InvalidateRenderGeometry();
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() ) ;
+ aIter != aEnd; ++aIter)
{
if ( aIter->nMode & CUSTOMSHAPE_HANDLE_RESIZE_FIXED )
{
if ( aIter->xInteraction.is() )
aIter->xInteraction->setControllerPosition( aIter->aPosition );
}
- aIter++;
}
}
aInteractionHandle.xInteraction->setControllerPosition( aPt );
@@ -2177,8 +2174,8 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
aRect = aRect1;
SetRectsDirty();
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() );
+ aIter != aEnd ; ++aIter)
{
try
{
@@ -2188,7 +2185,6 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat )
catch ( const uno::RuntimeException& )
{
}
- aIter++;
}
SetBoundRectDirty();
@@ -2513,8 +2509,8 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
SetRectsDirty();
SetChanged();
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd ( aInteractionHandles.end() );
+ aIter != aEnd ; ++aIter)
{
try
{
@@ -2524,7 +2520,6 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
catch ( const uno::RuntimeException& )
{
}
- aIter++;
}
InvalidateRenderGeometry();
}
@@ -2546,8 +2541,8 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
aRect = aNewTextRect;
SetRectsDirty();
- std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
- while ( aIter != aInteractionHandles.end() )
+ for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() ) ;
+ aIter != aEnd ; ++aIter)
{
try
{
@@ -2557,7 +2552,6 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
catch ( const uno::RuntimeException& )
{
}
- aIter++;
}
InvalidateRenderGeometry();