Some cppcheck cleaning
This commit is contained in:
@@ -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
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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&)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user