Some cppcheck cleaning

Change-Id: I7217ab7500de5d8220b85e56aceb6e843bd0769f
This commit is contained in:
Julien Nabet
2013-01-27 23:07:58 +01:00
parent c348848775
commit b8d4b8656f
10 changed files with 18 additions and 21 deletions

View File

@@ -625,12 +625,12 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
else if( pEdit == &maNumericEdit ) else if( pEdit == &maNumericEdit )
{ {
double fValue; double fValue;
char pBuf[256];
rtl::OString aContents(rtl::OUStringToOString(maNumericEdit.GetText(), rtl::OString aContents(rtl::OUStringToOString(maNumericEdit.GetText(),
osl_getThreadTextEncoding())); osl_getThreadTextEncoding()));
fValue = atof(aContents.getStr()); fValue = atof(aContents.getStr());
if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) ) if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) )
{ {
char pBuf[256];
if( fValue < mfMin ) if( fValue < mfMin )
fValue = mfMin; fValue = mfMin;
else if( fValue > mfMax ) else if( fValue > mfMax )

View File

@@ -50,6 +50,7 @@ BaseContainer::BaseContainer()
: BaseLock ( ) : BaseLock ( )
, m_rCache ( ) , m_rCache ( )
, m_pFlushCache(NULL ) , m_pFlushCache(NULL )
, m_eType()
, m_lListener (m_aLock) , m_lListener (m_aLock)
{ {
m_rCache->load(FilterCache::E_CONTAINS_STANDARD); m_rCache->load(FilterCache::E_CONTAINS_STANDARD);

View File

@@ -132,15 +132,12 @@ sal_Bool RscMgr::IsDefault( const RSCINST & rInst ){
|* |*
*************************************************************************/ *************************************************************************/
sal_Bool RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){ sal_Bool RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
RscMgrInst * pClassData;
RscMgrInst * pDfltData;
if( !RscClass::IsValueDefault( rInst, pDef ) ) if( !RscClass::IsValueDefault( rInst, pDef ) )
return sal_False; return sal_False;
if( pDef ){ if( pDef ){
pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size()); RscMgrInst * pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
pDfltData = (RscMgrInst *)(pDef + RscClass::Size()); RscMgrInst * pDfltData = (RscMgrInst *)(pDef + RscClass::Size());
if( !pClassData->aRefId.IsId() && !pDfltData->aRefId.IsId() ){ if( !pClassData->aRefId.IsId() && !pDfltData->aRefId.IsId() ){
return sal_True; return sal_True;

View File

@@ -27,7 +27,7 @@
using namespace xmloff::token; using namespace xmloff::token;
ScMyColumnRowGroup::ScMyColumnRowGroup() ScMyColumnRowGroup::ScMyColumnRowGroup() : bDisplay(false)
{ {
} }

View File

@@ -91,6 +91,7 @@ struct SfxInterface_Impl
SfxInterface_Impl() : SfxInterface_Impl() :
aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()), aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()),
aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()) aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager())
, pModule(NULL)
, bRegistered(sal_False) , bRegistered(sal_False)
{ {
pObjectBars = new SfxObjectUIArr_Impl; pObjectBars = new SfxObjectUIArr_Impl;

View File

@@ -925,9 +925,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
long lTopBorder = rBorder.Top() + 5; long lTopBorder = rBorder.Top() + 5;
long lBottomBorder = rBorder.Bottom() - 5; long lBottomBorder = rBorder.Bottom() - 5;
const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ; const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ;
long lSpaceUsed = 0;
long lTranslatePos = 0; long lTranslatePos = 0;
int loop = 0;
bool bScrollbars = false; bool bScrollbars = false;
// do all neccessary resizings // do all neccessary resizings
@@ -956,6 +954,8 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
//start the real layout so nothing overlaps anymore //start the real layout so nothing overlaps anymore
if (aVisiblePostItList.size()>1) if (aVisiblePostItList.size()>1)
{ {
long lSpaceUsed = 0;
int loop = 0;
bool bDone = false; bool bDone = false;
// if no window is moved anymore we are finished // if no window is moved anymore we are finished
while (!bDone) while (!bDone)

View File

@@ -42,14 +42,13 @@
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
void SwPageExample::UpdateExample( const SfxItemSet& rSet ) void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{ {
const SvxPageItem* pPage = 0;
SfxItemPool* pPool = rSet.GetPool(); SfxItemPool* pPool = rSet.GetPool();
sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE );
if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{ {
// alignment // alignment
pPage = (const SvxPageItem*)&rSet.Get( nWhich ); const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich );
if ( pPage ) if ( pPage )
SetUsage( pPage->GetPageUsage() ); SetUsage( pPage->GetPageUsage() );

View File

@@ -53,12 +53,13 @@ namespace uui
*//*-*************************************************************************************************************/ *//*-*************************************************************************************************************/
FilterDialog::FilterDialog( Window* pParentWindow , FilterDialog::FilterDialog( Window* pParentWindow ,
ResMgr* pResMgr ) ResMgr* pResMgr )
: ModalDialog ( pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) ) : ModalDialog (pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) )
, m_ftURL ( this, ResId( FT_URL, *pResMgr ) ) , m_ftURL (this, ResId( FT_URL, *pResMgr))
, m_lbFilters ( this, ResId( LB_FILTERS, *pResMgr ) ) , m_lbFilters (this, ResId( LB_FILTERS, *pResMgr))
, m_btnOK ( this, ResId( BTN_OK, *pResMgr ) ) , m_btnOK (this, ResId( BTN_OK, *pResMgr))
, m_btnCancel ( this, ResId( BTN_CANCEL, *pResMgr ) ) , m_btnCancel (this, ResId( BTN_CANCEL, *pResMgr))
, m_btnHelp ( this, ResId( BTN_HELP, *pResMgr ) ) , m_btnHelp (this, ResId( BTN_HELP, *pResMgr))
, m_pFilterNames(NULL)
{ {
FreeResource(); FreeResource();
} }

View File

@@ -1423,8 +1423,6 @@ sal_Bool Printer::EndJob()
mnCurPage = 0; mnCurPage = 0;
bRet = sal_True;
mbPrinting = sal_False; mbPrinting = sal_False;
mnCurPrintPage = 0; mnCurPrintPage = 0;
maJobName = rtl::OUString(); maJobName = rtl::OUString();

View File

@@ -70,7 +70,7 @@ protected:
public: public:
WW8StructBase(sal_Int32 nLength) WW8StructBase(sal_Int32 nLength)
: mSequence(nLength) : mSequence(nLength), mpParent(NULL), mpDocument(NULL)
{ {
} }