diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-05-08 10:47:35 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-05-08 10:47:35 +0200 |
commit | d3a0593ee14d77a311bd4f83c2de53ffb1eb07ae (patch) | |
tree | 4475c6e492c8e386bfbdcd6dee620c524cc82d49 /sd | |
parent | e8f7f4c38326d7113df2ad898ff864f480336341 (diff) |
Some cppcheck cleaning
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlfamily.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexsoundcollection.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/ppt97animations.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/framework/configuration/ConfigurationUpdater.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 561e0635e674..f1f084bcece0 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -83,7 +83,7 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets() const sal_uInt16 nLen = aLayoutName.Search(String( RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR)))+4; aLayoutName.Erase( nLen ); - if( (maStyleSheets.size() == 0) || !((*maStyleSheets.begin()).second->GetName().Equals( aLayoutName, 0, nLen )) ) + if( (maStyleSheets.empty()) || !((*maStyleSheets.begin()).second->GetName().Equals( aLayoutName, 0, nLen )) ) { maStyleSheets.clear(); diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index 33988419b5aa..5a8431f8d025 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -186,11 +186,11 @@ sal_uInt32 ExSoundCollection::GetId( const String& rString ) sal_uInt32 ExSoundCollection::GetSize() const { sal_uInt32 nSize = 0; - sal_uInt32 i = 1; if (!maEntries.empty()) { nSize += 8 + 12; // size of SoundCollectionContainerHeader + SoundCollAtom boost::ptr_vector<ExSoundEntry>::const_iterator iter; + sal_uInt32 i = 1; for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++i) nSize += iter->GetSize(i); } diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index 8836b1b4851d..ee3dbaffc431 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -711,7 +711,7 @@ void Ppt97Animation::createAndSetCustomAnimationEffect( SdrObject* pObj ) ::sd::CustomAnimationEffectPtr pLastEffect; sal_Int32 nIndex = 0; - for( ; aIter != rEffects.end(); aIter++ ) + for( ; aIter != rEffects.end(); ++aIter ) { ::sd::CustomAnimationEffectPtr pGroupEffect(*aIter); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 3feda9f2d4a0..787b04e9fd93 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -481,7 +481,7 @@ void AnnotationWindow::ResizeIfNeccessary(long aOldHeight, long aNewHeight) } } -void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem) +void AnnotationWindow::SetLanguage(const SvxLanguageItem &aNewItem) { Engine()->SetModifyHdl( Link() ); ESelection aOld = getView()->GetSelection(); diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index 752e5c967e5b..fd88486912ff 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -149,7 +149,7 @@ class AnnotationWindow : public FloatingWindow bool IsProtected() { return mbProtected; } - void SetLanguage(const SvxLanguageItem aNewItem); + void SetLanguage(const SvxLanguageItem &aNewItem); sal_Int32 GetScrollbarWidth(); diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index f616b57d271b..7e12a24b4300 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -257,7 +257,7 @@ void ConfigurationUpdater::CleanRequestedConfiguration (void) // Request the deactivation of pure anchors that have no child. vector<Reference<XResourceId> > aResourcesToDeactivate; CheckPureAnchors(mxRequestedConfiguration, aResourcesToDeactivate); - if (aResourcesToDeactivate.size() > 0) + if (!aResourcesToDeactivate.empty()) { Reference<XConfigurationController> xCC ( mxControllerManager->getConfigurationController()); @@ -328,7 +328,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie // Deactivate pure anchors that have no child. vector<Reference<XResourceId> > aResourcesToDeactivate; CheckPureAnchors(mxCurrentConfiguration, aResourcesToDeactivate); - if (aResourcesToDeactivate.size() > 0) + if (!aResourcesToDeactivate.empty()) mpResourceManager->DeactivateResources(aResourcesToDeactivate, mxCurrentConfiguration); } catch(const RuntimeException&) diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 2eff162d5f53..6ecadd4d2b31 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -184,7 +184,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>& // reverse order so that when one slide is not deleted (to avoid an // empty document) the remaining slide is the first one. ::std::vector<SdPage*>::const_reverse_iterator aI; - for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); aI++) + for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); ++aI) { // Do not delete the last slide in the document. if (xPages->getCount() <= 1) @@ -220,7 +220,7 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>& // reverse order so that when one slide is not deleted (to avoid an // empty document) the remaining slide is the first one. ::std::vector<SdPage*>::const_reverse_iterator aI; - for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); aI++) + for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); ++aI) { // Do not delete the last slide in the document. if (xPages->getCount() <= 1) |