[Libreoffice-commits] .: 18 commits - basic/source desktop/source drawinglayer/source framework/source sfx2/source svx/source xmloff/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 23 13:12:54 PST 2010
basic/source/app/process.cxx | 4 +-
basic/source/classes/sbunoobj.cxx | 2 -
basic/source/comp/dim.cxx | 2 -
desktop/source/deployment/manager/dp_informationprovider.cxx | 2 -
drawinglayer/source/processor2d/vclprocessor2d.cxx | 4 +-
framework/source/classes/menumanager.cxx | 14 +++++-----
framework/source/services/substitutepathvars.cxx | 6 ++--
sfx2/source/view/printer.cxx | 2 -
svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 2 -
svx/source/dialog/_contdlg.cxx | 6 +---
svx/source/svdraw/svdpagv.cxx | 6 ++--
svx/source/xml/xmleohlp.cxx | 2 -
xmloff/source/draw/shapeexport.cxx | 4 +-
xmloff/source/draw/shapeimport.cxx | 6 ++--
xmloff/source/script/XMLEventExport.cxx | 2 -
xmloff/source/style/xmlaustp.cxx | 2 -
xmloff/source/style/xmlnumfe.cxx | 8 ++---
xmloff/source/style/xmlprmap.cxx | 6 ++--
18 files changed, 39 insertions(+), 41 deletions(-)
New commits:
commit 058b120a8690bae63ad2ab46dfdab870e41e7c36
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:07:33 2010 +0000
cppcheck: prefer prefix variant
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 0823d85..5efa94e 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1114,7 +1114,7 @@ namespace drawinglayer
mpOutputDevice->EnableMapMode(false);
- for(std::vector< basegfx::B2DPoint >::const_iterator aIter(rPositions.begin()); aIter != rPositions.end(); aIter++)
+ for(std::vector< basegfx::B2DPoint >::const_iterator aIter(rPositions.begin()); aIter != rPositions.end(); ++aIter)
{
const basegfx::B2DPoint aDiscreteTopLeft((maCurrentTransformation * (*aIter)) - aDiscreteHalfSize);
const Point aDiscretePoint(basegfx::fround(aDiscreteTopLeft.getX()), basegfx::fround(aDiscreteTopLeft.getY()));
@@ -1134,7 +1134,7 @@ namespace drawinglayer
const basegfx::BColor aRGBColor(maBColorModifierStack.getModifiedColor(rPointArrayCandidate.getRGBColor()));
const Color aVCLColor(aRGBColor);
- for(std::vector< basegfx::B2DPoint >::const_iterator aIter(rPositions.begin()); aIter != rPositions.end(); aIter++)
+ for(std::vector< basegfx::B2DPoint >::const_iterator aIter(rPositions.begin()); aIter != rPositions.end(); ++aIter)
{
const basegfx::B2DPoint aViewPosition(maCurrentTransformation * (*aIter));
const Point aPos(basegfx::fround(aViewPosition.getX()), basegfx::fround(aViewPosition.getY()));
commit 003b8df8a589324cfceb8cd0676d4af414a92bab
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:07:04 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index a23fa67..8687c56 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -107,7 +107,7 @@ void XMLPropertySetMapper::AddMapperEntry(
for( vector < UniReference < XMLPropertyHandlerFactory > >::iterator
aFIter = rMapper->aHdlFactories.begin();
aFIter != rMapper->aHdlFactories.end();
- aFIter++ )
+ ++aFIter )
{
aHdlFactories.push_back( *aFIter );
}
@@ -115,7 +115,7 @@ void XMLPropertySetMapper::AddMapperEntry(
for( vector < XMLPropertySetMapperEntry_Impl >::iterator
aEIter = rMapper->aMapEntries.begin();
aEIter != rMapper->aMapEntries.end();
- aEIter++ )
+ ++aEIter )
{
aMapEntries.push_back( *aEIter );
}
@@ -248,7 +248,7 @@ void XMLPropertySetMapper::RemoveEntry( sal_Int32 nIndex )
return;
vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = aMapEntries.begin();
for( sal_Int32 nN=0; nN<nIndex; nN++ )
- aEIter++;
+ ++aEIter;
aMapEntries.erase( aEIter );
}
commit fb09495c2f5850298138a9ad7e2768396485ae5a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:05:59 2010 +0000
cppcheck: prefer prefix variant
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 0190aba..9eb4112 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -639,7 +639,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService
// Sort user variables to path length
SubstituteVariables::const_iterator pIter;
- for ( pIter = m_aSubstVarMap.begin(); pIter != m_aSubstVarMap.end(); pIter++ )
+ for ( pIter = m_aSubstVarMap.begin(); pIter != m_aSubstVarMap.end(); ++pIter )
{
ReSubstUserVarOrder aUserOrderVar;
rtl::OUStringBuffer aStrBuffer( pIter->second.aSubstVariable.getLength() );
@@ -1041,7 +1041,7 @@ throw ( RuntimeException )
while ( !bResubstitutionCompleted )
{
ReSubstFixedVarOrderVector::const_iterator pIterFixed;
- for ( pIterFixed = m_aReSubstFixedVarOrder.begin(); pIterFixed != m_aReSubstFixedVarOrder.end(); pIterFixed++ )
+ for ( pIterFixed = m_aReSubstFixedVarOrder.begin(); pIterFixed != m_aReSubstFixedVarOrder.end(); ++pIterFixed )
{
rtl::OUString aValue = m_aPreDefVars.m_FixedVar[ (sal_Int32)pIterFixed->eVariable ];
sal_Int32 nPos = aURL.indexOf( aValue );
@@ -1081,7 +1081,7 @@ throw ( RuntimeException )
// This part can be iteratered more than one time as variables can contain variables again!
ReSubstUserVarOrderVector::const_iterator pIterUser;
- for ( pIterUser = m_aReSubstUserVarOrder.begin(); pIterUser != m_aReSubstUserVarOrder.end(); pIterUser++ )
+ for ( pIterUser = m_aReSubstUserVarOrder.begin(); pIterUser != m_aReSubstUserVarOrder.end(); ++pIterUser )
{
rtl::OUString aVarValue = pIterUser->aVarName;
sal_Int32 nPos = aURL.indexOf( aVarValue );
commit adaaf8b77a764512eb084b13d202b935948d7d82
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:04:30 2010 +0000
cppcheck: prefer prefix variant
diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx
index b910577..8789cdb 100644
--- a/basic/source/app/process.cxx
+++ b/basic/source/app/process.cxx
@@ -157,8 +157,8 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
aTemp += ::rtl::OUString( (*aIter).second );
m_pEnvList[m_nEnvCount] = NULL;
rtl_uString_assign( &(m_pEnvList[m_nEnvCount]), aTemp.pData );
- m_nEnvCount++;
- aIter++;
+ ++m_nEnvCount;
+ ++aIter;
}
}
commit 2b3aa607cabe738254931e31c8c629cdefffecfc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:03:09 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 3086ff7..dee986e 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -70,7 +70,7 @@ XMLEventExport::~XMLEventExport()
for( HandlerMap::iterator aIter =
aHandlerMap.begin();
aIter != aEnd;
- aIter++ )
+ ++aIter )
{
delete aIter->second;
}
commit ed5c55ba2fa7413fc389c0e99d2ec6209eff28c4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 21:01:33 2010 +0000
cppcheck: prefer prefix variant
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index b6afb23..6f5c424 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -77,7 +77,7 @@ DBG_NAME(SdrPageView);
SdrPageWindow* SdrPageView::FindPageWindow(SdrPaintWindow& rPaintWindow) const
{
- for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++)
+ for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a)
{
if(&((*a)->GetPaintWindow()) == &rPaintWindow)
{
@@ -108,7 +108,7 @@ const SdrPageWindow* SdrPageView::FindPatchedPageWindow( const OutputDevice& _rO
SdrPageWindow* SdrPageView::FindPageWindow(const OutputDevice& rOutDev) const
{
- for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++)
+ for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a)
{
if(&((*a)->GetPaintWindow().GetOutputDevice()) == &rOutDev)
{
@@ -133,7 +133,7 @@ SdrPageWindow* SdrPageView::GetPageWindow(sal_uInt32 nIndex) const
void SdrPageView::ClearPageWindows()
{
// #126416#
- for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++)
+ for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a)
{
delete *a;
}
commit a70dd3dc7531bc8439b8d1b47d54c9a6c11ef4b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 20:58:07 2010 +0000
cppcheck: prefer prefix variant
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 6aaf373..323e3e4 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -241,7 +241,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
}
int nCount = 0;
- for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); i++)
+ for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); ++i)
{
dp_misc::UpdateInfo const & info = i->second;
commit a06d6ac55247d6d93821e786c8aaac36f78cf2b7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 16:35:49 2010 +0000
cppcheck: prefer prefix variant
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 2f269a6..d3c56d5 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -441,7 +441,7 @@ void SfxPrinter::UpdateFonts_Impl()
// Try to add all non-regular fonts. It could be that there was no regular font
// with the same name added.
std::vector< Font >::const_iterator pIter;
- for ( pIter = aNonRegularFonts.begin(); pIter != aNonRegularFonts.end(); pIter++ )
+ for ( pIter = aNonRegularFonts.begin(); pIter != aNonRegularFonts.end(); ++pIter )
{
if ( SfxFindFont_Impl( *FONTS(), pIter->GetName() ) == 0 )
{
commit a4b1ba8d870ac76aac3cb0183c10693780632698
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 16:34:45 2010 +0000
cppcheck: prefer prefix variant
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 182f231..b23e252 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -190,7 +190,7 @@ SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper()
{
SvXMLEmbeddedObjectHelper_Impl::iterator aIter = mpStreamMap->begin();
SvXMLEmbeddedObjectHelper_Impl::iterator aEnd = mpStreamMap->end();
- for( ; aIter != aEnd; aIter++ )
+ for( ; aIter != aEnd; ++aIter )
{
if( aIter->second )
{
commit 6f907f872fec59fa3ae9e603ab4c8a6c5eadcda5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:11:29 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 1c960bd..68cd2a5 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -1134,7 +1134,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
DBG_ASSERT( (*aIter).nIs >= nDestPos, "Shape sorting failed" );
(*aIter).nIs++;
}
- aIter++;
+ ++aIter;
}
aIter = maUnsortedList.begin();
@@ -1147,7 +1147,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
DBG_ASSERT( (*aIter).nIs >= nDestPos, "shape sorting failed" );
(*aIter).nIs++;
}
- aIter++;
+ ++aIter;
}
}
}
@@ -1379,7 +1379,7 @@ void XMLShapeImportHelper::moveGluePointMapping( const com::sun::star::uno::Refe
{
if ( (*aShapeIdIter).second != -1 )
(*aShapeIdIter).second += n;
- aShapeIdIter++;
+ ++aShapeIdIter;
}
}
}
commit 40ad62d8caef4e287e521882a4d82efc6fe1f442
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:08:22 2010 +0000
cppcheck: prefer prefix variant
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index cc5eb53..49a4efa 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -329,7 +329,7 @@ void MenuManager::SetHdl()
MenuManager::~MenuManager()
{
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pItemHandler = *p;
pItemHandler->xMenuItemDispatch.clear();
@@ -348,7 +348,7 @@ MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( USHORT nItemId )
ResetableGuard aGuard( m_aLock );
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pItemHandler = *p;
if ( pItemHandler->nItemId == nItemId )
@@ -369,7 +369,7 @@ throw ( RuntimeException )
ResetableGuard aGuard( m_aLock );
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pMenuItemHandler = *p;
if ( pMenuItemHandler->aMenuItemURL == aFeatureURL )
@@ -436,7 +436,7 @@ void MenuManager::ClearMenuDispatch(const EVENTOBJECT& Source,bool _bRemoveOnly)
// #110897#
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pItemHandler = *p;
if ( pItemHandler->xMenuItemDispatch.is() )
@@ -477,7 +477,7 @@ void SAL_CALL MenuManager::disposing( const EVENTOBJECT& Source ) throw ( RUNTIM
ResetableGuard aGuard( m_aLock );
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pMenuItemHandler = *p;
if ( pMenuItemHandler->xMenuItemDispatch == Source.Source )
@@ -552,7 +552,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
static const ::rtl::OUString s_sDefault(RTL_CONSTASCII_USTRINGPARAM("_default"));
// query for dispatcher
std::vector< MenuItemHandler* >::iterator p;
- for ( p = aNewPickVector.begin(); p != aNewPickVector.end(); p++ )
+ for ( p = aNewPickVector.begin(); p != aNewPickVector.end(); ++p )
{
MenuItemHandler* pMenuItemHandler = *p;
@@ -843,7 +843,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
if ( xDispatchProvider.is() )
{
std::vector< MenuItemHandler* >::iterator p;
- for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); p++ )
+ for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p )
{
MenuItemHandler* pMenuItemHandler = *p;
if ( pMenuItemHandler &&
commit fdf57757249c69b70e7f7d7d3b07cb8ca6eeaffd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:07:33 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index a9b16d2..40541c9 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -160,7 +160,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER )
{
- for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); pProp++ )
+ for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); ++pProp )
{
if (pProp->mnIndex > -1)
{
commit 47c67c6f0769dbdbcf06a59b24239c2dc7099ab2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:05:01 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 6aeb51a..cf61486 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -360,7 +360,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
{
if( aIter->mnIndex != -1 )
nCount++;
- aIter++;
+ ++aIter;
}
}
@@ -429,7 +429,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
{
if( aIter->mnIndex != -1 )
nCount++;
- aIter++;
+ ++aIter;
}
if( nCount )
commit 829a8f749d641377894e8291867296b5364c44fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:02:10 2010 +0000
cppcheck: can reduce the scope of this variable
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 8739e38..c557e1a 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -78,9 +78,9 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
{
SbxDataType eType = rDef.GetType();
- short nSize = 0;
if( bAsNewAlreadyParsed || Peek() == AS )
{
+ short nSize = 0;
if( !bAsNewAlreadyParsed )
Next();
rDef.SetDefinedAs();
commit 56ec1133d6d3cdb5561044200812296344239d50
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:01:25 2010 +0000
cppcheck: uninit variable
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 3f079e3..1996f6b 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -61,7 +61,7 @@ void EnhancedCustomShape::FillEquationParameter( const EnhancedCustomShapeParame
sal_Int32 nValue = 0;
if ( rSource.Value.getValueTypeClass() == uno::TypeClass_DOUBLE )
{
- double fValue;
+ double fValue(0.0);
if ( rSource.Value >>= fValue )
nValue = (sal_Int32)fValue;
}
commit c8f271d457be33050a94b0ea4b7fd10b6c55f3a7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 15:00:11 2010 +0000
cppcheck: prefer prefix variant
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 40b635a..898b919 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -179,7 +179,7 @@ void SvXMLNumUsedList_Impl::Export()
std::pair<SvXMLuInt32Set::iterator, bool> aPair = aWasUsed.insert( *aItr );
if (aPair.second)
nWasUsedCount++;
- aItr++;
+ ++aItr;
}
aUsed.clear();
nUsedCount = 0;
@@ -203,7 +203,7 @@ sal_Bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey)
sal_Bool bRet(sal_False);
if (aCurrentUsedPos != aUsed.end())
{
- aCurrentUsedPos++;
+ ++aCurrentUsedPos;
if (aCurrentUsedPos != aUsed.end())
{
nKey = *aCurrentUsedPos;
@@ -223,8 +223,8 @@ void SvXMLNumUsedList_Impl::GetWasUsed(uno::Sequence<sal_Int32>& rWasUsed)
while (aItr != aWasUsed.end())
{
*pWasUsed = *aItr;
- aItr++;
- pWasUsed++;
+ ++aItr;
+ ++pWasUsed;
}
}
}
commit 8d53e8c8df4ac7ad26086269833f94dbf3bf2b58
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 14:59:32 2010 +0000
cppcheck: prefer prefix variant
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index c979455..4cc8b0d 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3309,7 +3309,7 @@ VBAConstantHelper::isVBAConstantType( const String& rName )
::rtl::OUString sKey( rName );
VBAConstantsVector::const_iterator it = aConstCache.begin();
- for( ; it != aConstCache.end(); it++ )
+ for( ; it != aConstCache.end(); ++it )
{
if( sKey.equalsIgnoreAsciiCase( *it ) )
{
commit af1a5f5263d98b81cc55acbd5d6525f9dd7ffd15
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 23 14:58:57 2010 +0000
cppcheck: can reduce the scope of this variable
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1c40f82..dbf9eeb 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -286,8 +286,6 @@ void SvxContourDlg::ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic
const MapMode aDispMap( eUnit );
const MapMode aGrfMap( rGraphic.GetPrefMapMode() );
const Size aGrfSize( rGraphic.GetPrefSize() );
- double fScaleX;
- double fScaleY;
Size aOrgSize;
Point aNewPoint;
BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
@@ -299,8 +297,8 @@ void SvxContourDlg::ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic
if ( aOrgSize.Width() && aOrgSize.Height() )
{
- fScaleX = (double) rDisplaySize.Width() / aOrgSize.Width();
- fScaleY = (double) rDisplaySize.Height() / aOrgSize.Height();
+ double fScaleX = (double) rDisplaySize.Width() / aOrgSize.Width();
+ double fScaleY = (double) rDisplaySize.Height() / aOrgSize.Height();
for ( USHORT j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
{
More information about the Libreoffice-commits
mailing list