[Libreoffice-commits] core.git: 5 commits - filter/source sfx2/source svtools/source svx/source vcl/source
Julien Nabet
serval2412 at yahoo.fr
Sat Mar 30 09:58:56 PDT 2013
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 6 ++----
sfx2/source/control/thumbnailviewacc.cxx | 6 ++----
svtools/source/misc/transfer.cxx | 3 +--
svx/source/table/tablemodel.cxx | 2 +-
vcl/source/gdi/pdfextoutdevdata.cxx | 6 ++----
5 files changed, 8 insertions(+), 15 deletions(-)
New commits:
commit 6d92441407f98eb8a662ccc4451ae7dd4980631e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:56:38 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
Change-Id: I2e0459426323555ca78ed38c0749690269fdc3d1
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 24ae46d2..cabd9ec 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -48,7 +48,6 @@ void ThumbnailViewAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOld
if( nEventId )
{
::std::vector< uno::Reference< accessibility::XAccessibleEventListener > > aTmpListeners( mxEventListeners );
- ::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator aIter( aTmpListeners.begin() );
accessibility::AccessibleEventObject aEvtObject;
aEvtObject.EventId = nEventId;
@@ -56,7 +55,8 @@ void ThumbnailViewAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOld
aEvtObject.NewValue = rNewValue;
aEvtObject.OldValue = rOldValue;
- while( aIter != aTmpListeners.end() )
+ for (::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator aIter( aTmpListeners.begin() ), aEnd( aTmpListeners.end() );
+ aIter != aEnd ; ++aIter)
{
try
{
@@ -65,8 +65,6 @@ void ThumbnailViewAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOld
catch(const uno::Exception&)
{
}
-
- aIter++;
}
}
}
commit fe5e53a81860b422a3aa863d0ecdc8dca6f5b364
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:55:50 2013 +0100
Prefer to be sure not to have invalided iterator problems
Change-Id: I2d520b88927c6acb3d248da05815822315bd066f
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index b92a3ed..a682f54 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -696,9 +696,8 @@ void TransferableHelper::RemoveFormat( SotFormatStringId nFormat )
void TransferableHelper::RemoveFormat( const DataFlavor& rFlavor )
{
DataFlavorExVector::iterator aIter( mpFormats->begin() );
- const DataFlavorExVector::const_iterator aEnd( mpFormats->end() );
- while (aIter != aEnd)
+ while (aIter != mpFormats->end())
{
if( TransferableDataHelper::IsEqual( *aIter, rFlavor ) )
aIter = mpFormats->erase( aIter );
commit aea686264f7cd78409ac484e514023d464307de9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:48:10 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
Change-Id: I272c2efc21f78dbd35c6dff6143c4770aed4ec16
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 8461b57..45eb7ed 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -141,9 +141,8 @@ sal_Int32 GlobalSyncData::GetMappedStructId( sal_Int32 nStructId )
void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
{
- std::deque< PDFExtOutDevDataSync::Action >::iterator aIter( mActions.begin() );
- std::deque< PDFExtOutDevDataSync::Action >::iterator aEnd( mActions.end() );
- while( aIter != aEnd )
+ for (std::deque< PDFExtOutDevDataSync::Action >::const_iterator aIter( mActions.begin() ), aEnd( mActions.end() ) ;
+ aIter != aEnd ; ++aIter)
{
switch( *aIter )
{
@@ -283,7 +282,6 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
case PDFExtOutDevDataSync::EndGroupGfxLink:
break;
}
- aIter++;
}
}
commit 05c2155ebed44e588ebc71c82e4c9599aa20b4de
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:45:08 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
Change-Id: I7172436c6fea867cdb7a8f8d97b215efcd0a1ab5
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 0791c3f..a7d1e2d 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1317,16 +1317,14 @@ std::vector< application_info_impl* >& getApplicationInfos()
const application_info_impl* getApplicationInfo( const OUString& rServiceName )
{
std::vector< application_info_impl* >& rInfos = getApplicationInfos();
- std::vector< application_info_impl* >::iterator aIter( rInfos.begin() );
- while( aIter != rInfos.end() )
+ for (std::vector< application_info_impl* >::const_iterator aIter( rInfos.begin() ), aEnd( rInfos.end() );
+ aIter != aEnd ; ++aIter)
{
- // if( rServiceName == (*aIter)->maDocumentService )
if( rServiceName == (*aIter)->maXMLExporter ||
rServiceName == (*aIter)->maXMLImporter)
{
return (*aIter);
}
- ++aIter;
}
return NULL;
}
commit 55c7ad94e1c0c306cadd8f37e266484482dcb37b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:42:34 2013 +0100
Prefer prefix ++/-- operators for non-primitive types
Change-Id: Ib4c9cf4406683a2d298967dbff8e084cbd9a7b4c
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index 7e0b566..2ed05f8 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -104,7 +104,7 @@ template< class Vec, class Iter, class Entry > sal_Int32 insert_range( Vec& rVec
sal_Int32 nFind = nIndex;
Iter aIter( rVector.begin() );
while( nFind-- )
- aIter++;
+ ++aIter;
Entry aEmpty;
rVector.insert( aIter, nCount, aEmpty );
More information about the Libreoffice-commits
mailing list