[Libreoffice-commits] core.git: 3 commits - sd/source svx/source

Julien Nabet serval2412 at yahoo.fr
Mon Apr 1 10:12:05 PDT 2013


 sd/source/core/drawdoc.cxx                     |    3 ++-
 sd/source/ui/annotations/annotationmanager.cxx |    4 +++-
 sd/source/ui/dlg/RemoteDialog.cxx              |    4 +++-
 svx/source/table/tabledesign.cxx               |   24 ++++++++++++++++++------
 4 files changed, 26 insertions(+), 9 deletions(-)

New commits:
commit 76d5a2847ac60c7f8c662d3780885609eaf503e5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Apr 1 19:09:39 2013 +0200

    Prefer prefix ++/-- operators for non-primitive types
    
    Change-Id: Ib5e17d5bb94d9b19008ca15e042b443689aba9b1

diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index 4702792..a84dc2e 100644
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -536,7 +536,9 @@ Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchE
 {
     SolarMutexGuard aGuard;
 
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::const_iterator iter( maDesigns.begin() );
+        iter != aEnd; ++iter)
     {
         if( (*iter)->getName() == rName )
             return Any( (*iter) );
@@ -554,7 +556,9 @@ Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames() throw(Runtime
     Sequence< OUString > aRet( maDesigns.size() );
     OUString* pNames = aRet.getArray();
 
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::const_iterator iter( maDesigns.begin() );
+         iter != aEnd; ++iter)
         *pNames++ = (*iter)->getName();
 
     return aRet;
@@ -566,7 +570,9 @@ sal_Bool SAL_CALL TableDesignFamily::hasByName( const OUString& aName ) throw(Ru
 {
     SolarMutexGuard aGuard;
 
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::const_iterator iter( maDesigns.begin() );
+        iter != aEnd; ++iter)
         if( (*iter)->getName() == aName )
             return sal_True;
 
@@ -627,7 +633,9 @@ void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any&
         throw IllegalArgumentException();
 
     xStyle->setName( rName );
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::const_iterator iter( maDesigns.begin() );
+        iter != aEnd; ++iter)
         if( (*iter)->getName() == rName )
             throw ElementExistException();
 
@@ -640,7 +648,9 @@ void SAL_CALL TableDesignFamily::removeByName( const OUString& rName ) throw(NoS
 {
     SolarMutexGuard aGuard;
 
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::iterator iter( maDesigns.begin() );
+        iter != aEnd; ++iter)
     {
         if( (*iter)->getName() == rName )
         {
@@ -665,7 +675,9 @@ void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any
     if( !xStyle.is() )
         throw IllegalArgumentException();
 
-    for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ )
+    const TableDesignStyleVector::const_iterator aEnd( maDesigns.end() );
+    for( TableDesignStyleVector::iterator iter( maDesigns.begin() );
+        iter != aEnd; ++iter)
     {
         if( (*iter)->getName() == rName )
         {
commit 79894c1de064a65b3a793e063c8f3aa96426c70a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Apr 1 19:02:44 2013 +0200

    Prefer prefix ++/-- operators for non-primitive types
    
    Change-Id: I0471261e01ed5fb45cb470abd5bc1e809f2873be

diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index c91d358..c4c6897 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -762,7 +762,9 @@ void AnnotationManagerImpl::SelectAnnotation( ::com::sun::star::uno::Reference<
 {
     mxSelectedAnnotation = xAnnotation;
 
-    for( AnnotationTagVector::iterator iter( maTagVector.begin() ); iter != maTagVector.end(); iter++ )
+    const AnnotationTagVector::const_iterator aEnd( maTagVector.end() );
+    for( AnnotationTagVector::const_iterator iter( maTagVector.begin() );
+        iter != aEnd; ++iter)
     {
         if( (*iter)->GetAnnotation() == xAnnotation )
         {
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index 60fd783..8aec838 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -31,8 +31,10 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
 
     vector<ClientInfo*> aClients( RemoteServer::getClients() );
 
+    const vector<ClientInfo*>::const_iterator aEnd( aClients.end() );
+
     for ( vector<ClientInfo*>::const_iterator aIt( aClients.begin() );
-        aIt < aClients.end(); aIt++ )
+        aIt != aEnd; ++aIt )
     {
         mClientBox.addEntry( *aIt );
     }
commit fb31dfbda781721a56c7e3a4f5a9873ecc1f5095
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Apr 1 18:53:16 2013 +0200

    Prefer prefix ++/-- operators for non-primitive types
    
    Change-Id: I19faf2d0608b2b405d30296bcdccd86583be2f11

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 3f36d86..6687bc7 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -959,7 +959,8 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const rtl::OUString& rAutho
     }
 
     sal_uInt16 idx = 0;
-    for( std::vector< OUString >::iterator iter( maAnnotationAuthors.begin() ); iter != maAnnotationAuthors.end(); iter++ )
+    const std::vector< OUString >::const_iterator aEnd( maAnnotationAuthors.end());
+    for( std::vector< OUString >::const_iterator iter( maAnnotationAuthors.begin() ); iter != aEnd; ++iter )
     {
         if( (*iter) == rAuthor )
         {


More information about the Libreoffice-commits mailing list