[Libreoffice-commits] .: framework/source scripting/source sfx2/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun May 8 05:31:27 PDT 2011


 framework/source/lomenubar/MenuItemInfo.cxx        |   10 ++++----
 framework/source/lomenubar/MenuItemInfo.hxx        |   10 ++++----
 scripting/source/stringresource/stringresource.cxx |   26 ++++++++++-----------
 sfx2/source/appl/lnkbase2.cxx                      |    2 -
 sfx2/source/dialog/filtergrouping.cxx              |    4 +--
 5 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 2ec1b9dcbd84e337f61a90b56da5e35e5e67ef03
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun May 8 14:31:03 2011 +0200

    Some cppcheck cleaning

diff --git a/framework/source/lomenubar/MenuItemInfo.cxx b/framework/source/lomenubar/MenuItemInfo.cxx
index c5b22f6..b724f1e 100644
--- a/framework/source/lomenubar/MenuItemInfo.cxx
+++ b/framework/source/lomenubar/MenuItemInfo.cxx
@@ -73,31 +73,31 @@ MenuItemInfo::setVisible (gboolean is_visible)
 
 //Getters
 gchar*
-MenuItemInfo::getLabel ()
+MenuItemInfo::getLabel const()
 {
     return m_label;
 }
 
 gboolean
-MenuItemInfo::getEnabled ()
+MenuItemInfo::getEnabled const()
 {
     return m_is_enabled;
 }
 
 gint
-MenuItemInfo::getCheckState ()
+MenuItemInfo::getCheckState const()
 {
     return m_check_state;
 }
 
 const gchar*
-MenuItemInfo::getCheckType ()
+MenuItemInfo::getCheckType const()
 {
     return m_check_type;
 }
 
 gboolean
-MenuItemInfo::getVisible ()
+MenuItemInfo::getVisible const()
 {
     return m_is_visible;
 }
diff --git a/framework/source/lomenubar/MenuItemInfo.hxx b/framework/source/lomenubar/MenuItemInfo.hxx
index b04b8fc..11fc4a2 100644
--- a/framework/source/lomenubar/MenuItemInfo.hxx
+++ b/framework/source/lomenubar/MenuItemInfo.hxx
@@ -45,10 +45,10 @@ class MenuItemInfo {
     void setVisible (gboolean is_visible);
 
     //Getters
-    gchar*       getLabel ();
-    gboolean     getEnabled ();
-    gint         getCheckState ();
-    const gchar* getCheckType ();
-    gboolean     getVisible ();
+    gchar*       getLabel const();
+    gboolean     getEnabled const();
+    gint         getCheckState const();
+    const gchar* getCheckType const();
+    gboolean     getVisible const();
 };
 #endif // __MENU_ITEM_INFO_HXX__
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index f9a5340..efbaa08 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -123,13 +123,13 @@ StringResourceImpl::StringResourceImpl( const Reference< XComponentContext >& rx
 
 StringResourceImpl::~StringResourceImpl()
 {
-    for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         delete pLocaleItem;
     }
 
-    for( LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin(); it != m_aDeletedLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin(); it != m_aDeletedLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         delete pLocaleItem;
@@ -326,7 +326,7 @@ Sequence< Locale > StringResourceImpl::getLocales(  )
     Sequence< Locale > aLocalSeq( nSize );
     Locale* pLocales = aLocalSeq.getArray();
     int iTarget = 0;
-    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         pLocales[iTarget] = pLocaleItem->m_locale;
@@ -566,7 +566,7 @@ void StringResourceImpl::removeLocale( const Locale& locale )
             if( m_pCurrentLocaleItem == pRemoveItem ||
                 m_pDefaultLocaleItem  == pRemoveItem )
             {
-                for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+                for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
                 {
                     LocaleItem* pLocaleItem = *it;
                     if( pLocaleItem != pRemoveItem )
@@ -586,7 +586,7 @@ void StringResourceImpl::removeLocale( const Locale& locale )
                 }
             }
         }
-        for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+        for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
         {
             LocaleItem* pLocaleItem = *it;
             if( pLocaleItem == pRemoveItem )
@@ -666,7 +666,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
     LocaleItem* pRetItem = NULL;
 
     // Search for locale
-    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem )
@@ -699,7 +699,7 @@ LocaleItem* StringResourceImpl::getClosestMatchItemForLocale( const Locale& loca
     // Search for locale
     for( sal_Int32 iPass = 0 ; iPass <= 2 ; ++iPass )
     {
-        for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+        for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
         {
             LocaleItem* pLocaleItem = *it;
             if( pLocaleItem )
@@ -1058,7 +1058,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
         }
     }
 
-    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem != NULL && (bStoreAll || pLocaleItem->m_bModified) && 
@@ -1097,7 +1097,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
     if( bUsedForStore )
     {
         for( LocaleItemVectorIt it = m_aChangedDefaultLocaleVector.begin(); 
-             it != m_aChangedDefaultLocaleVector.end(); it++ )
+             it != m_aChangedDefaultLocaleVector.end(); ++it )
         {
             LocaleItem* pLocaleItem = *it;
             if( pLocaleItem != NULL )
@@ -1196,7 +1196,7 @@ void StringResourcePersistenceImpl::implKillChangedDefaultFiles
 {
     // Delete files for changed defaults
     for( LocaleItemVectorIt it = m_aChangedDefaultLocaleVector.begin(); 
-         it != m_aChangedDefaultLocaleVector.end(); it++ )
+         it != m_aChangedDefaultLocaleVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem != NULL )
@@ -1228,7 +1228,7 @@ void StringResourcePersistenceImpl::implStoreAtLocation
     if( bUsedForStore || bKillAll )
         implKillRemovedLocaleFiles( Location, aNameBase, xFileAccess );
 
-    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem != NULL && (bStoreAll || bKillAll || pLocaleItem->m_bModified) && 
@@ -1431,7 +1431,7 @@ Sequence< sal_Int8 > StringResourcePersistenceImpl::exportBinary(  )
     sal_Int32 iLocale = 0;
     sal_Int32 iDefault = 0;
     for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); 
-         it != m_aLocaleItemVector.end(); it++,iLocale++ )
+         it != m_aLocaleItemVector.end(); ++it,++iLocale )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
@@ -1740,7 +1740,7 @@ bool checkNamingSceme( const ::rtl::OUString& aName, const ::rtl::OUString& aNam
 
 void StringResourcePersistenceImpl::implLoadAllLocales( void )
 {
-    for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ )
+    for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
     {
         LocaleItem* pLocaleItem = *it;
         if( pLocaleItem != NULL )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index b2a58c0..2123de6 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -630,7 +630,7 @@ static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt )
             for( int i = 0; i < 2; ++i )
             {
                 for( std::vector<DdeTopic*>::iterator iterTopic = rTopics.begin();
-                     iterTopic != rTopics.end(); iterTopic++ )
+                     iterTopic != rTopics.end(); ++iterTopic )
                     if( (*iterTopic)->GetName() == sTopic )
                         return *iterTopic;
 
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index d1605d4..8bb6055 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -1093,7 +1093,7 @@ namespace sfx2
         if ( xFilterGroupManager.is() )
         {
             // Add both html/pdf filter as a filter group to get a separator between both groups
-            if ( aImportantFilterGroup.size() > 0 )
+            if ( !aImportantFilterGroup.empty() )
             {
                 Sequence< StringPair > aFilters( aImportantFilterGroup.size() );
                 for ( sal_Int32 i = 0; i < (sal_Int32)aImportantFilterGroup.size(); i++ )
@@ -1113,7 +1113,7 @@ namespace sfx2
                 }
             }
 
-            if ( aFilterGroup.size() > 0 )
+            if ( !aFilterGroup.empty() )
             {
                 Sequence< StringPair > aFilters( aFilterGroup.size() );
                 for ( sal_Int32 i = 0; i < (sal_Int32)aFilterGroup.size(); i++ )


More information about the Libreoffice-commits mailing list