[Libreoffice-commits] .: animations/source sd/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Sun May 8 01:47:54 PDT 2011
animations/source/animcore/animcore.cxx | 2 +-
sd/source/core/stlfamily.cxx | 2 +-
sd/source/filter/eppt/pptexsoundcollection.cxx | 2 +-
sd/source/filter/ppt/ppt97animations.cxx | 2 +-
sd/source/ui/annotations/annotationwindow.cxx | 2 +-
sd/source/ui/annotations/annotationwindow.hxx | 2 +-
sd/source/ui/framework/configuration/ConfigurationUpdater.cxx | 4 ++--
sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 4 ++--
8 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 342df67f7fdc73d9fa79dd58c2264b70c155a4f2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun May 8 10:47:35 2011 +0200
Some cppcheck cleaning
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index 6b2bc41..693c8d3 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -1874,7 +1874,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertAfter( const Reference
if( ::std::find(maChilds.begin(), maChilds.end(), newChild) != maChilds.end() )
throw ElementExistException();
- before++;
+ ++before;
if( before != maChilds.end() )
maChilds.insert( before, newChild );
else
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 7103c61..d3f92ce 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 9bb6221..80bb642 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 4a74793..197ee72 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 3d0011e..12e8617 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 29d8f9c..03c70cf 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 157b698..7a01659 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 9c081cc..3d8726d 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)
More information about the Libreoffice-commits
mailing list