[Libreoffice-commits] .: 3 commits - sd/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sat Nov 27 04:49:11 PST 2010
sd/source/core/stlfamily.cxx | 16 ++++++------
sd/source/ui/annotations/annotationmanager.cxx | 33 ++++++++++++-------------
sd/source/ui/view/sdview5.cxx | 2 -
3 files changed, 25 insertions(+), 26 deletions(-)
New commits:
commit 3f248ab1561e00a4734a4ff527bce42eec1b4532
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Nov 27 12:38:31 2010 +0000
cppcheck: use prefix form
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index d3174e9..e88cdb5 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -97,7 +97,7 @@ SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
{
const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
- for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
+ for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); ++iter )
{
if( (*iter)->IsEmptyPresObj() && implIsMultiPresObj(pPage->GetPresObjKind(*iter)) )
{
commit 878141035afffd4a90d8ed2cb5caa595c8bba149
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Nov 27 12:25:14 2010 +0000
cppcheck: use prefix form
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 162a361..0dcc164 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -88,7 +88,7 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets()
maStyleSheets.clear();
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) && (pStyle->GetName().Equals( aLayoutName, 0, nLen )) )
@@ -166,7 +166,7 @@ SdStyleSheet* SdStyleFamily::GetSheetByName( const OUString& rName ) throw(NoSuc
else
{
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) && (pStyle->GetApiName() == rName) )
@@ -286,7 +286,7 @@ Sequence< OUString > SAL_CALL SdStyleFamily::getElementNames() throw(RuntimeExce
{
std::vector< OUString > aNames;
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) )
@@ -314,7 +314,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasByName( const OUString& aName ) throw(Runtim
else
{
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) && ( pStyle->GetApiName() == aName ) )
@@ -349,7 +349,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasElements() throw(RuntimeException)
else
{
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) )
@@ -377,7 +377,7 @@ sal_Int32 SAL_CALL SdStyleFamily::getCount() throw(RuntimeException)
else
{
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) )
@@ -404,7 +404,7 @@ Any SAL_CALL SdStyleFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBounds
{
PresStyleMap::iterator iter( rStyleSheets.begin() );
while( Index-- && (iter != rStyleSheets.end()) )
- iter++;
+ ++iter;
if( (Index==-1) && (iter != rStyleSheets.end()) )
return Any( Reference< XStyle >( (*iter).second.get() ) );
@@ -413,7 +413,7 @@ Any SAL_CALL SdStyleFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBounds
else
{
const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
{
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
if( pStyle && (pStyle->GetFamily() == mnFamily) )
commit a668f21ba14caa8a5de6f723ace3234ec99f2009
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Nov 27 11:07:43 2010 +0000
cppcheck: use prefix form
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 4c8ce20..8595635 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -398,7 +398,7 @@ void AnnotationManagerImpl::InsertAnnotation()
Rectangle aNewRect( x, y, x + width - 1, y + height - 1 );
bool bFree = true;
- for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); iter++ )
+ for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
{
RealPoint2D aPoint( (*iter)->getPosition() );
aTagRect.nLeft = sal::static_int_cast< long >( aPoint.X * 100.0 );
@@ -554,7 +554,7 @@ void AnnotationManagerImpl::DeleteAnnotationsByAuthor( const rtl::OUString& sAut
if( pPage && !pPage->getAnnotations().empty() )
{
AnnotationVector aAnnotations( pPage->getAnnotations() );
- for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); iter++ )
+ for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
{
Reference< XAnnotation > xAnnotation( *iter );
if( xAnnotation->getAuthor() == sAuthor )
@@ -585,7 +585,7 @@ void AnnotationManagerImpl::DeleteAllAnnotations()
{
AnnotationVector aAnnotations( pPage->getAnnotations() );
- for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); iter++ )
+ for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
{
pPage->removeAnnotation( (*iter) );
}
@@ -663,11 +663,11 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
{
if( xCurrent.is() )
{
- for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); iter++ )
+ for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
{
if( (*iter) == xCurrent )
{
- iter++;
+ ++iter;
if( iter != aAnnotations.end() )
{
SelectAnnotation( (*iter) );
@@ -687,20 +687,19 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
{
if( xCurrent.is() )
{
- for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); iter++ )
- {
- if( (*iter) == xCurrent )
- {
- if( iter != aAnnotations.begin() )
- {
- iter--;
+ for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
+ {
+ if( (*iter) == xCurrent )
+ {
+ if( iter != aAnnotations.begin() )
+ {
+ --iter;
SelectAnnotation( (*iter) );
return;
-
- }
- break;
- }
- }
+ }
+ break;
+ }
+ }
}
else if( !aAnnotations.empty() )
{
More information about the Libreoffice-commits
mailing list