diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2010-12-27 09:29:07 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-12-27 09:29:07 +0100 |
commit | 50e49fd312f829cbab1f4430ad6db3d869fb4a5a (patch) | |
tree | 9dbc772c5240f083da6ccb53d29881476b5ab19f | |
parent | 43e38e5e0b431ffde390fad34c79dd9d9aec4487 (diff) |
cppcheck prefix operator in components
-rw-r--r-- | cui/source/customize/acccfg.cxx | 2 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 90 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 28 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 18 |
4 files changed, 70 insertions, 68 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 6eb6dcf0f8a8..b848f362bd1e 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1397,7 +1397,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG a = xUICommandLabels->getByName( aCmdURL ); if ( a >>= aPropSeq ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { if ( aPropSeq[i].Name.equalsAscii( "Name" )) { diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5a539d92ec49..4c886adc3601 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -142,7 +142,7 @@ void printPropertySet( OSL_TRACE("printPropertySet: %d properties", aPropDetails.getLength()); - for ( sal_Int32 i = 0; i < aPropDetails.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropDetails.getLength(); ++i ) { OUString tmp; sal_Int32 ival; @@ -171,7 +171,7 @@ void printProperties( const OUString& prefix, const uno::Sequence< beans::PropertyValue >& aProp ) { - for ( sal_Int32 i = 0; i < aProp.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProp.getLength(); ++i ) { OUString tmp; @@ -463,7 +463,7 @@ OUString GetUIModuleName( const OUString& aModuleId, const uno::Reference< css:: if ( a >>= aSeq ) { OUString aUIName; - for ( sal_Int32 i = 0; i < aSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aSeq.getLength(); ++i ) { if ( aSeq[i].Name.equalsAscii( "ooSetupFactoryUIName" )) { @@ -503,7 +503,7 @@ bool GetMenuItemData( uno::Sequence< beans::PropertyValue > aProp; if ( rItemContainer->getByIndex( nIndex ) >>= aProp ) { - for ( sal_Int32 i = 0; i < aProp.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProp.getLength(); ++i ) { if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) { @@ -553,7 +553,7 @@ bool GetToolbarItemData( uno::Sequence< beans::PropertyValue > aProp; if ( rItemContainer->getByIndex( nIndex ) >>= aProp ) { - for ( sal_Int32 i = 0; i < aProp.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProp.getLength(); ++i ) { if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) { @@ -637,7 +637,7 @@ ConvertSvxConfigEntry( uno::Sequence< beans::PropertyValue > tmpPropSeq; if ( a >>= tmpPropSeq ) { - for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); ++i ) { if ( tmpPropSeq[i].Name.equals( aDescriptorLabel ) ) { @@ -724,7 +724,7 @@ ConvertToolbarEntry( uno::Sequence< beans::PropertyValue > tmpPropSeq; if ( a >>= tmpPropSeq ) { - for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); ++i ) { if ( tmpPropSeq[i].Name.equals( aDescriptorLabel ) ) { @@ -1158,7 +1158,7 @@ bool MenuSaveInData::LoadSubMenus( if ( !xMenuSettings.is() ) return true; - for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ ) + for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); ++nIndex ) { uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; @@ -1193,7 +1193,7 @@ bool MenuSaveInData::LoadSubMenus( uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) { @@ -1446,7 +1446,7 @@ public: while ( n <= nHalfSize ) { rOutDev.DrawRect( Rectangle( nX+n, nY+n, nX+n, nY+nSize-n ) ); - n++; + ++n; } rOutDev.SetFillColor( aOldFillColor ); @@ -1845,7 +1845,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) DBG_UNHANDLED_EXCEPTION(); } - for ( sal_Int32 i = 0; i < aFrameList.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aFrameList.getLength(); ++i ) { SaveInData* pData = NULL; uno::Reference < frame::XFrame > xf = aFrameList[i]; @@ -1978,7 +1978,7 @@ BOOL SvxConfigPage::FillItemSet( SfxItemSet& ) { bool result = FALSE; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); ++i ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -2426,7 +2426,7 @@ void SvxMenuConfigPage::Init() SvxMenuConfigPage::~SvxMenuConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); ++i ) { MenuSaveInData* pData = (MenuSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -3054,7 +3054,7 @@ SvxConfigEntry::SvxConfigEntry( sal_uInt16 nType( css::ui::ItemType::DEFAULT ); OUString aHelpURL_; - for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ ) + for ( sal_Int32 i = 0; i < rProperties.getLength(); ++i ) { if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) { @@ -3093,7 +3093,7 @@ SvxConfigEntry::SvxConfigEntry( uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) { @@ -3181,7 +3181,7 @@ SvxConfigEntry::GetProperties( uno::Sequence< beans::PropertyValue > tmpPropSeq; if ( a >>= tmpPropSeq ) { - for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); ++i ) { if ( tmpPropSeq[i].Name.equals( aDescriptorLabel ) ) { @@ -3381,7 +3381,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( SvxToolbarConfigPage::~SvxToolbarConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); ++i ) { ToolbarSaveInData* pData = (ToolbarSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -3634,7 +3634,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) USHORT nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); ++i ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3731,7 +3731,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) USHORT nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); ++i ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3814,7 +3814,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) USHORT nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); ++i ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3886,7 +3886,7 @@ void SvxToolbarConfigPage::Init() USHORT nPos = 0; if ( m_aURLToSelect.getLength() != 0 ) { - for ( USHORT i = 0 ; i < aTopLevelListBox.GetEntryCount(); i++ ) + for ( USHORT i = 0 ; i < aTopLevelListBox.GetEntryCount(); ++i ) { SvxConfigEntry* pData = (SvxConfigEntry*) aTopLevelListBox.GetEntryData( i ); @@ -4017,7 +4017,7 @@ void ToolbarSaveInData::SetSystemStyle( if ( a >>= aProps ) { - for ( sal_Int32 i = 0; i < aProps.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE) ) { @@ -4055,7 +4055,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( sal_Int32 i = 0; i < aProps.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE) ) { @@ -4089,7 +4089,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( sal_Int32 i = 0; i < aProps.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_UINAME) ) { @@ -4116,7 +4116,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) { @@ -4158,7 +4158,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() GetConfigManager()->getUIElementsInfo( css::ui::UIElementType::TOOLBAR ); - for ( sal_Int32 i = 0; i < info.getLength(); i++ ) + for ( sal_Int32 i = 0; i < info.getLength(); ++i ) { uno::Sequence< beans::PropertyValue > props = info[ i ]; @@ -4166,7 +4166,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() OUString systemname; OUString uiname; - for ( sal_Int32 j = 0; j < props.getLength(); j++ ) + for ( sal_Int32 j = 0; j < props.getLength(); ++j ) { if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_RESOURCEURL) ) { @@ -4235,7 +4235,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() xParentCfgMgr->getUIElementsInfo( css::ui::UIElementType::TOOLBAR ); - for ( sal_Int32 i = 0; i < info_.getLength(); i++ ) + for ( sal_Int32 i = 0; i < info_.getLength(); ++i ) { uno::Sequence< beans::PropertyValue > props = info_[ i ]; @@ -4243,7 +4243,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() OUString systemname; OUString uiname; - for ( sal_Int32 j = 0; j < props.getLength(); j++ ) + for ( sal_Int32 j = 0; j < props.getLength(); ++j ) { if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_RESOURCEURL) ) { @@ -4692,7 +4692,7 @@ bool ToolbarSaveInData::LoadToolbar( { SvxEntries* pEntries = pParentData->GetEntries(); - for ( sal_Int32 nIndex = 0; nIndex < xToolbarSettings->getCount(); nIndex++ ) + for ( sal_Int32 nIndex = 0; nIndex < xToolbarSettings->getCount(); ++nIndex ) { uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; @@ -4729,7 +4729,7 @@ bool ToolbarSaveInData::LoadToolbar( uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) { @@ -4929,7 +4929,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) SvxNewToolbarDialog* pNameDialog = new SvxNewToolbarDialog( 0, aNewName ); USHORT nInsertPos; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); ++i ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -5381,7 +5381,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( m_xImportedImageManager.is() ) { names = m_xImportedImageManager->getAllImageNames( GetImageType() ); - for ( sal_Int32 n = 0; n < names.getLength(); n++ ) + for ( sal_Int32 n = 0; n < names.getLength(); ++n ) mImageInfo.insert( ImageInfo::value_type( names[n], false )); } USHORT nId = 1; @@ -5411,12 +5411,12 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( m_xParentImageManager.is() ) { names = m_xParentImageManager->getAllImageNames( GetImageType() ); - for ( sal_Int32 n = 0; n < names.getLength(); n++ ) + for ( sal_Int32 n = 0; n < names.getLength(); ++n ) aImageInfo.insert( ImageInfo::value_type( names[n], false )); } names = m_xImageManager->getAllImageNames( GetImageType() ); - for ( sal_Int32 n = 0; n < names.getLength(); n++ ) + for ( sal_Int32 n = 0; n < names.getLength(); ++n ) { ImageInfo::iterator pIter = aImageInfo.find( names[n] ); if ( pIter != aImageInfo.end() ) @@ -5476,7 +5476,7 @@ SvxIconSelectorDialog::~SvxIconSelectorDialog() { USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (USHORT n = 0; n < nCount; ++n) { USHORT nId = aTbSymbol.GetItemId(n); @@ -5495,7 +5495,7 @@ uno::Reference< graphic::XGraphic> SvxIconSelectorDialog::GetSelectedIcon() uno::Reference< graphic::XGraphic > result; USHORT nId; - for ( USHORT n = 0; n < aTbSymbol.GetItemCount(); n++ ) + for ( USHORT n = 0; n < aTbSymbol.GetItemCount(); ++n ) { nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) @@ -5515,7 +5515,7 @@ IMPL_LINK( SvxIconSelectorDialog, SelectHdl, ToolBox *, pToolBox ) USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (USHORT n = 0; n < nCount; ++n) { USHORT nId = aTbSymbol.GetItemId( n ); @@ -5582,7 +5582,7 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton ) { USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (USHORT n = 0; n < nCount; ++n) { USHORT nId = aTbSymbol.GetItemId( n ); @@ -5642,7 +5642,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( bool bResult( false ); USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (USHORT n = 0; n < nCount; ++n) { USHORT nId = aTbSymbol.GetItemId( n ); @@ -5726,7 +5726,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( rPaths[0].lastIndexOf( '/' ) != rPaths[0].getLength() -1 ) aSourcePath = rPaths[0] + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - for ( sal_Int32 i = 1; i < rPaths.getLength(); i++ ) + for ( sal_Int32 i = 1; i < rPaths.getLength(); ++i ) { ::rtl::OUString aPath = aSourcePath + rPaths[i]; if ( m_xImportedImageManager->hasImage( GetImageType(), aPath ) ) @@ -5740,7 +5740,7 @@ void SvxIconSelectorDialog::ImportGraphics( } else if ( ret == 5 ) { - for ( sal_Int32 k = i; k < rPaths.getLength(); k++ ) + for ( sal_Int32 k = i; k < rPaths.getLength(); ++k ) { aPath = aSourcePath + rPaths[k]; bool bHasReplaced = ReplaceGraphicItem( aPath ); @@ -5751,7 +5751,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( result == FALSE ) { rejected[ rejectedCount ] = rPaths[i]; - rejectedCount++; + ++rejectedCount; } } } @@ -5764,7 +5764,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( result == FALSE ) { rejected[ rejectedCount ] = rPaths[i]; - rejectedCount++; + ++rejectedCount; } } } @@ -5777,7 +5777,7 @@ void SvxIconSelectorDialog::ImportGraphics( OUString fPath; if (rejectedCount > 1) fPath = rPaths[0].copy(8) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - for ( sal_Int32 i = 0; i < rejectedCount; i++ ) + for ( sal_Int32 i = 0; i < rejectedCount; ++i ) { message += fPath + rejected[i]; message += newLine; diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 7d6e89b4bff5..86eed6d9ce8b 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -315,7 +315,7 @@ void SfxConfigFunctionListBox_Impl::ClearAll() */ { USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + for ( USHORT i=0; i<nCount; ++i ) { SfxGroupInfo_Impl *pData = aArr[i]; @@ -530,7 +530,7 @@ SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl() void SfxConfigGroupListBox_Impl::ClearAll() { USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + for ( USHORT i=0; i<nCount; ++i ) { SfxGroupInfo_Impl *pData = aArr[i]; if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER @@ -554,7 +554,8 @@ void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) { pImp->m_aScriptType = rScriptType; ULONG nPos=0; - SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); + SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos ); + ++nPos; while ( pEntry ) { SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); @@ -571,7 +572,8 @@ void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) Expand( pEntry ); } - pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); + pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos ); + ++nPos; } } @@ -876,7 +878,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); } - for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + for ( sal_Int32 n = 0; n < children.getLength(); ++n ) { Reference< browse::XBrowseNode >& theChild = children[n]; BOOL bDisplay = TRUE; @@ -924,7 +926,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul Sequence< Reference< browse::XBrowseNode > > grandchildren = children[n]->getChildNodes(); - for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + for ( sal_Int32 m = 0; m < grandchildren.getLength(); ++m ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { @@ -1173,7 +1175,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() xDoc = static_cast< XModel* >( pBasInfo->pObject ); SbModule *pMod = (SbModule*) pInfo->pObject; - for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) + for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); ++nMeth ) { SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth); SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(), @@ -1210,7 +1212,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() Sequence< Reference< browse::XBrowseNode > > children = rootNode->getChildNodes(); - for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + for ( sal_Int32 n = 0; n < children.getLength(); ++n ) { if (children[n]->getType() == browse::BrowseNodeTypes::SCRIPT) { @@ -1315,7 +1317,7 @@ BOOL SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) ULONG nParentPos = 0; while ( pEntry && pEntry != pParent ) { - nParentPos++; + ++nParentPos; pEntry = GetNextEntryInView( pEntry ); } @@ -1346,7 +1348,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) BasicManager* pMgr( GetBasicManager( *pEntry ) ); SvLBoxEntry *pLibEntry = 0; - for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++) + for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); ++nLib ) { StarBASIC* pLib = pMgr->GetLib( nLib ); pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry ); @@ -1379,7 +1381,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) } SvLBoxEntry *pModEntry = 0; - for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) + for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); ++nMod ) { SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); @@ -1432,7 +1434,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) } sal_Int32 nLen = children.getLength(); - for ( sal_Int32 n = 0; n < nLen; n++ ) + for ( sal_Int32 n = 0; n < nLen; ++n ) { Reference< browse::XBrowseNode >& theChild = children[n]; ::rtl::OUString aName( theChild->getName() ); @@ -1469,7 +1471,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) Sequence< Reference< browse::XBrowseNode > > grandchildren = children[n]->getChildNodes(); - for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + for ( sal_Int32 m = 0; m < grandchildren.getLength(); ++m ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index b3fd2e69dc95..97d37d3688ed 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -145,7 +145,7 @@ IMPL_LINK( SvxConfigFunctionListBox_Impl, TimerHdl, Timer*, EMPTYARG) void SvxConfigFunctionListBox_Impl::ClearAll() { USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + for ( USHORT i=0; i<nCount; ++i ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -278,7 +278,7 @@ SvxConfigGroupListBox_Impl::~SvxConfigGroupListBox_Impl() void SvxConfigGroupListBox_Impl::ClearAll() { USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + for ( USHORT i=0; i<nCount; ++i ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -370,7 +370,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows sCurrentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xWorkingDocument ); } - for ( long n = 0; n < children.getLength(); n++ ) + for ( long n = 0; n < children.getLength(); ++n ) { Reference< browse::XBrowseNode >& theChild = children[n]; //#139111# some crash reports show that it might be unset @@ -434,7 +434,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows Sequence< Reference< browse::XBrowseNode > > grandchildren = children[n]->getChildNodes(); - for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + for ( sal_Int32 m = 0; m < grandchildren.getLength(); ++m ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { @@ -532,7 +532,7 @@ void SvxConfigGroupListBox_Impl::Init() Sequence< sal_Int16 > gids = xDIP->getSupportedCommandGroups(); - for ( sal_Int32 i = 0; i < gids.getLength(); i++ ) + for ( sal_Int32 i = 0; i < gids.getLength(); ++i ) { Sequence< frame::DispatchInformation > commands; try @@ -757,7 +757,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { } - for ( sal_Int32 i = 0; i < commands.getLength(); i++ ) + for ( sal_Int32 i = 0; i < commands.getLength(); ++i ) { if ( commands[i].Command.getLength() == 0 ) { @@ -781,7 +781,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() if ( a >>= aPropSeq ) { - for ( sal_Int32 k = 0; k < aPropSeq.getLength(); k++ ) + for ( sal_Int32 k = 0; k < aPropSeq.getLength(); ++k ) { if ( aPropSeq[k].Name.equalsAscii( "Name" ) ) { @@ -834,7 +834,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() Sequence< Reference< browse::XBrowseNode > > children = rootNode->getChildNodes(); - for ( long n = 0; n < children.getLength(); n++ ) + for ( long n = 0; n < children.getLength(); ++n ) { if (!children[n].is()) continue; @@ -925,7 +925,7 @@ BOOL SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) ULONG nParentPos = 0; while ( pEntry && pEntry != pParent ) { - nParentPos++; + ++nParentPos; pEntry = GetNextEntryInView( pEntry ); } |