[Libreoffice-commits] core.git: 3 commits - filter/source oox/source toolkit/source
Julien Nabet
serval2412 at yahoo.fr
Sat Mar 30 08:31:07 PDT 2013
filter/source/msfilter/escherex.cxx | 5 +----
oox/source/drawingml/customshapeproperties.cxx | 5 ++---
toolkit/source/controls/tree/treedatamodel.cxx | 4 ++--
3 files changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 9cc04cb09590cd00395244f81bbf6c3292b99c2b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 16:20:06 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
+ convert while loop in for loop
Change-Id: I615e2c724481047b557a4da9bb0753ec6eaecb90
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 48173b7..aab5cc4 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -169,8 +169,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq )
{
- std::vector< CustomShapeGuide >::const_iterator aIter( maAdjustmentGuideList.begin() );
- while( aIter != maAdjustmentGuideList.end() )
+ for (std::vector< CustomShapeGuide >::const_iterator aIter( maAdjustmentGuideList.begin() ), aEnd(maAdjustmentGuideList.end());
+ aIter != aEnd; ++aIter)
{
if ( (*aIter).maName.getLength() > 3 )
{
@@ -190,7 +190,6 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aAdjustmentVal.Name = (*aIter).maName;
aAdjustmentSeq[ 0 ] = aAdjustmentVal;
}
- aIter++;
}
aGeoPropSeq[ i ].Value <<= aAdjustmentSeq;
xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
commit c34a5ec1a60510871bf62ab380536d82078bb53d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 16:12:46 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
Change-Id: Ibf5004c1e66edac10ec6392577fe26ea2aaed330
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index 43e26c4..90fe37d 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -423,7 +423,7 @@ void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const
TreeNodeVector::iterator aIter( maChildren.begin() );
while( (nChildIndex-- > 0) && (aIter != maChildren.end()) )
- aIter++;
+ ++aIter;
maChildren.insert( aIter, xImpl );
xImpl->setParent( this );
@@ -443,7 +443,7 @@ void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw
{
TreeNodeVector::iterator aIter( maChildren.begin() );
while( nChildIndex-- && (aIter != maChildren.end()) )
- aIter++;
+ ++aIter;
if( aIter != maChildren.end() )
{
commit bca67a76b00ec7234b6a414a9772c9a7cacd8fd7
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 15:55:54 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
+ convert while loop into for loop
Change-Id: I64c2379c28d3c1074ed17129152568371680db19
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 0f99932..9c9d727 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4523,13 +4523,10 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom )
else
mpOutStrm->SeekRel( nSize );
}
- std::vector< sal_uInt32 >::iterator aIter( mOffsets.begin() );
- std::vector< sal_uInt32 >::iterator aEnd( mOffsets.end() );
- while( aIter != aEnd )
+ for (std::vector< sal_uInt32 >::iterator aIter( mOffsets.begin() ), aEnd( mOffsets.end() ); aIter != aEnd ; ++aIter)
{
if ( *aIter > nCurPos )
*aIter += nBytes;
- aIter++;
}
mpOutStrm->Seek( STREAM_SEEK_TO_END );
nSource = mpOutStrm->Tell();
More information about the Libreoffice-commits
mailing list