[Libreoffice-commits] .: 12 commits - l10ntools/source sax/source sot/source svl/source svtools/bmpmaker svtools/source toolkit/source toolkit/workben unotools/source vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 23 13:13:01 PST 2010
l10ntools/source/gsicheck.cxx | 2 +-
sax/source/tools/fastserializer.cxx | 4 ++--
sot/source/sdstor/storage.cxx | 2 +-
svl/source/items/itempool.cxx | 2 +-
svtools/bmpmaker/bmpsum.cxx | 2 +-
svtools/source/contnr/fileview.cxx | 12 ++++++------
svtools/source/uno/statusbarcontroller.cxx | 2 +-
toolkit/source/awt/vclxtabcontrol.cxx | 10 +++++-----
toolkit/source/controls/grid/defaultgriddatamodel.cxx | 4 ++--
toolkit/workben/layout/test.cxx | 2 +-
unotools/source/config/xmlaccelcfg.cxx | 2 +-
vcl/source/window/toolbox.cxx | 14 +++++++-------
12 files changed, 29 insertions(+), 29 deletions(-)
New commits:
commit 2b4e1fd86bdaca0e62b8e2a43fe2d512db6e2f7e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:07:51 2010 +0000
cppcheck: prefer prefix variant
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index c23be17..0a47c29 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -300,7 +300,7 @@ throw ( RuntimeException )
Reference< XInterface > xIfac( pIter->second, UNO_QUERY );
if ( xSource == xIfac )
pIter->second.clear();
- pIter++;
+ ++pIter;
}
Reference< XInterface > xIfac( m_xFrame, UNO_QUERY );
commit 190884b67a6edab50a4f483176a8bacea54b4769
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:04:56 2010 +0000
cppcheck: prefer prefix variant
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 47e865c..55a9811 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -515,10 +515,10 @@ namespace sax_fastparser {
while ( iter != maData.end( ) )
{
fprintf( stderr, "pair: %d, ", iter->first );
- for ( sal_Int32 i=0, len=iter->second.getLength(); i < len; i++ )
+ for ( sal_Int32 i=0, len=iter->second.getLength(); i < len; ++i )
fprintf( stderr, "%c", iter->second[i] );
fprintf( stderr, "\n" );
- iter++;
+ ++iter;
}
sort( );
commit 5dbb85e37ac83ed29b9fc51a4e94516d7eab0ff6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:04:14 2010 +0000
cppcheck: prefer prefix variant
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 256e847..5234e70 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -5393,8 +5393,8 @@ USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
while ( it != ((ToolBox*)pThis)->mpData->m_aItems.end() )
{
if( it->meType == TOOLBOXITEM_BREAK )
- nLines++;
- it++;
+ ++nLines;
+ ++it;
}
return nLines;
}
@@ -5405,7 +5405,7 @@ Size ToolBox::CalcPopupWindowSizePixel() const
USHORT nLines = ImplCountLineBreaks( this );
if( nLines )
- nLines++; // add the first line
+ ++nLines; // add the first line
else
{
// no breaks found: use quadratic layout
@@ -5425,7 +5425,7 @@ Size ToolBox::CalcPopupWindowSizePixel() const
Size ToolBox::CalcFloatingWindowSizePixel() const
{
USHORT nLines = ImplCountLineBreaks( this );
- nLines++; // add the first line
+ ++nLines; // add the first line
return CalcFloatingWindowSizePixel( nLines );
}
@@ -5466,7 +5466,7 @@ Size ToolBox::CalcMinimumWindowSizePixel() const
pToolBox->CopyItem( *this, it->mnId );
if( (it->meType != TOOLBOXITEM_BUTTON) ||
!it->mbVisible || ImplIsFixedControl( &(*it) ) )
- it++;
+ ++it;
else
break;
}
@@ -5909,7 +5909,7 @@ USHORT ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
while( it != mpData->m_aItems.end() )
{
if ( it->mbBreak )
- nLine++;
+ ++nLine;
if( &(*it) == pCurrentItem)
break;
++it;
@@ -5989,7 +5989,7 @@ USHORT ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< I
if( pItem )
{
USHORT nPos;
- for( nPos = 0; nPos < rList.size(); nPos++ )
+ for( nPos = 0; nPos < rList.size(); ++nPos )
if( &rList[ nPos ] == pItem )
return nPos;
}
commit 938e7d35a11f445afffa5a276bdc840ce3e74551
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 16:36:29 2010 +0000
cppcheck: prefer prefix variant
diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx
index 13b10b1..7facab9 100644
--- a/toolkit/source/awt/vclxtabcontrol.cxx
+++ b/toolkit/source/awt/vclxtabcontrol.cxx
@@ -155,7 +155,7 @@ void SAL_CALL VCLXTabControl::addTabListener( const uno::Reference< awt::XTabLis
{
for ( std::list< uno::Reference
< awt::XTabListener > >::const_iterator it
- = mxTabListeners.begin(); it != mxTabListeners.end(); it++ )
+ = mxTabListeners.begin(); it != mxTabListeners.end(); ++it )
{
if ( *it == xListener )
// already added
@@ -168,7 +168,7 @@ void SAL_CALL VCLXTabControl::removeTabListener( const uno::Reference< awt::XTab
{
for ( std::list< uno::Reference
< awt::XTabListener > >::iterator it
- = mxTabListeners.begin(); it != mxTabListeners.end(); it++ )
+ = mxTabListeners.begin(); it != mxTabListeners.end(); ++it )
{
if ( *it == xListener )
{
@@ -373,7 +373,7 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area)
// it here does makes it easier when changing tabs (just needs a recalc())
unsigned i = 0;
for ( std::list<Box_Base::ChildData *>::const_iterator it
- = maChildren.begin(); it != maChildren.end(); it++, i++ )
+ = maChildren.begin(); it != maChildren.end(); it++, ++i )
{
ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it );
uno::Reference
@@ -417,7 +417,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize()
// calculate size to accomodate all children
unsigned i = 0;
for ( std::list<Box_Base::ChildData *>::const_iterator it
- = maChildren.begin(); it != maChildren.end(); it++, i++ )
+ = maChildren.begin(); it != maChildren.end(); it++, ++i )
{
ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it );
if ( child->mxChild.is() )
@@ -466,7 +466,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent
ULONG page = (ULONG) _rVclWindowEvent.GetData();
for ( std::list< uno::Reference
< awt::XTabListener > >::iterator it
- = mxTabListeners.begin(); it != mxTabListeners.end(); it++)
+ = mxTabListeners.begin(); it != mxTabListeners.end(); ++it )
{
uno::Reference
< awt::XTabListener > listener = *it;
commit caab8203908c2334f885e7cd31b8d949854ff742
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 16:33:02 2010 +0000
cppcheck: prefer prefix variant
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 8e1f7b0..27a62da 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -767,7 +767,7 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String&
return xResult;
for ( UNOStorageHolderList::iterator aIter = pUNOStorageHolderList->begin();
- aIter != pUNOStorageHolderList->end(); aIter++ )
+ aIter != pUNOStorageHolderList->end(); ++aIter )
if ( (*aIter) && (*aIter)->GetStorageName().Equals( rEleName ) )
{
// the storage is already in use
commit 6a6f86536d401f984cc03cc8ce66d809a9d22935
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:10:44 2010 +0000
cppcheck: prefer prefix variant
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 0dccc01..3aacbf9 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -407,7 +407,7 @@ void SfxItemPool::Free(SfxItemPool* pPool)
{
// tell all the registered SfxItemPoolUsers that the pool is in destruction
SfxItemPoolUserVector aListCopy(pPool->maSfxItemPoolUsers.begin(), pPool->maSfxItemPoolUsers.end());
- for(SfxItemPoolUserVector::iterator aIterator = aListCopy.begin(); aIterator != aListCopy.end(); aIterator++)
+ for(SfxItemPoolUserVector::iterator aIterator = aListCopy.begin(); aIterator != aListCopy.end(); ++aIterator)
{
SfxItemPoolUser* pSfxItemPoolUser = *aIterator;
DBG_ASSERT(pSfxItemPoolUser, "corrupt SfxItemPoolUser list (!)");
commit 9610a250a3aa0d1460156ae18e4572c13509024f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:09:11 2010 +0000
cppcheck: prefer prefix variant
diff --git a/unotools/source/config/xmlaccelcfg.cxx b/unotools/source/config/xmlaccelcfg.cxx
index af902c0..f1af3e4 100644
--- a/unotools/source/config/xmlaccelcfg.cxx
+++ b/unotools/source/config/xmlaccelcfg.cxx
@@ -377,7 +377,7 @@ void OWriteAccelatorDocumentHandler::WriteAcceleratorDocument()
m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
std::list< SvtAcceleratorConfigItem>::const_iterator p;
- for ( p = m_aWriteAcceleratorList.begin(); p != m_aWriteAcceleratorList.end(); p++ )
+ for ( p = m_aWriteAcceleratorList.begin(); p != m_aWriteAcceleratorList.end(); ++p )
WriteAcceleratorItem( *p );
m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_ACCELERATORLIST )) );
commit 35207b1186c8dcfd3ebb9f7d7373c7a852447942
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:06:30 2010 +0000
cppcheck: prefer prefix variant
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index b30fff0..f5a6de0 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1909,7 +1909,7 @@ void SvtFileView_Impl::Clear()
std::vector< SortingData_Impl* >::iterator aIt;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
delete (*aIt);
maContent.clear();
@@ -2170,7 +2170,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
std::vector< SortingData_Impl* >::iterator aIt;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
if ( mbOnlyFolder && ! (*aIt)->mbIsFolder )
continue;
@@ -2304,7 +2304,7 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
std::vector< SortingData_Impl* >::iterator aIt;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
// title, type, size, date
aValue = (*aIt)->GetTitle();
@@ -2576,7 +2576,7 @@ void SvtFileView_Impl::EntryRemoved( const OUString& rURL )
std::vector< SortingData_Impl* >::iterator aIt;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
if ( (*aIt)->maTargetURL == rURL )
{
@@ -2594,7 +2594,7 @@ void SvtFileView_Impl::EntryRenamed( OUString& rURL,
std::vector< SortingData_Impl* >::iterator aIt;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
if ( (*aIt)->maTargetURL == rURL )
{
@@ -2668,7 +2668,7 @@ ULONG SvtFileView_Impl::GetEntryPos( const OUString& rURL )
std::vector< SortingData_Impl* >::iterator aIt;
ULONG nPos = 0;
- for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
+ for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
if ( (*aIt)->maTargetURL == rURL )
return nPos;
commit cd5e582be59a9a77dca63c8124495a9f62a2a8ae
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:04:18 2010 +0000
cppcheck: prefer prefix variant
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index 4571407..4c9953f 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -158,7 +158,7 @@ void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::S
int i = 0;
int sequenceSize = value.getLength();
- for(iterator = rowHeaders.begin(); iterator != rowHeaders.end(); iterator++)
+ for(iterator = rowHeaders.begin(); iterator != rowHeaders.end(); ++iterator)
{
if ( sequenceSize > i )
*iterator = value[i];
@@ -214,7 +214,7 @@ void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::s
std::vector< Sequence< Any > > dummyContainer(0);
- for(iterator = data.begin(); iterator != data.end(); iterator++)
+ for(iterator = data.begin(); iterator != data.end(); ++iterator)
{
Sequence< Any > cols(comphelper::containerToSequence(*iterator));
dummyContainer.push_back( cols );
commit 1ce3984acfc51059a3314df807d3cdbb8b0b18e6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:03:19 2010 +0000
cppcheck: can reduce the scope of this variable
diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx
index 96ba889..b0c0815 100644
--- a/svtools/bmpmaker/bmpsum.cxx
+++ b/svtools/bmpmaker/bmpsum.cxx
@@ -191,7 +191,6 @@ sal_uInt64 BmpSum::GetCRC( const BitmapEx& rBmpEx )
AlphaMask aAlpha;
BitmapReadAccess* pAAcc = NULL;
sal_uInt64 nRet = 0;
- sal_uInt32 nCrc = 0;
if( rBmpEx.IsTransparent() )
{
@@ -202,6 +201,7 @@ sal_uInt64 BmpSum::GetCRC( const BitmapEx& rBmpEx )
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
SVBT32 aBT32;
+ sal_uInt32 nCrc = 0;
for( long nY = 0; nY < pRAcc->Height(); ++nY )
{
commit 58d5520b7abf5f81d2e175bc2a08ce5a8de94ba2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:00:58 2010 +0000
cppcheck: prefer prefix variant
diff --git a/toolkit/workben/layout/test.cxx b/toolkit/workben/layout/test.cxx
index cb68d7e..b52b363 100644
--- a/toolkit/workben/layout/test.cxx
+++ b/toolkit/workben/layout/test.cxx
@@ -310,7 +310,7 @@ void TestDialog( OUString const& name )
void LayoutTest::RunFiles()
{
fprintf( stderr, "TEST: loading files\n" );
- for ( std::list< OUString >::iterator i = mFiles.begin(); i != mFiles.end(); i++ )
+ for ( std::list< OUString >::iterator i = mFiles.begin(); i != mFiles.end(); ++i )
LoadFile( *i );
fprintf( stderr, "TEST: executing\n" );
Execute();
commit aefa0ebc0341dd13570a36d672ba8e6e8fa6fbee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 14:58:12 2010 +0000
cppcheck: can reduce the scope of this variable
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 8807c30..8ce8e1b 100644
--- a/l10ntools/source/gsicheck.cxx
+++ b/l10ntools/source/gsicheck.cxx
@@ -329,10 +329,10 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
return;
}
}
- ULONG nPos = 0;
if ( aSourceLang.Len() ) // only check blockstructure if source lang is given
{
+ ULONG nPos = 0;
while ( nPos < Count() )
{
if ( GetObject( nPos )->GetLanguageId().Equals( pLine->GetLanguageId() ) )
More information about the Libreoffice-commits
mailing list