summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-01-27 23:07:58 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-01-27 23:11:41 +0100
commitb8d4b8656f1f4e4782ba7460070e99babc8a499e (patch)
treead2931235c0db8cba968df4e30ed11c47f268f90
parentc3488487752d2083b9e8a45266fdc40df84be686 (diff)
Some cppcheck cleaning
Change-Id: I7217ab7500de5d8220b85e56aceb6e843bd0769f
-rw-r--r--extensions/source/scanner/sanedlg.cxx4
-rw-r--r--filter/source/config/cache/basecontainer.cxx1
-rw-r--r--rsc/source/res/rscmgr.cxx7
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.cxx2
-rw-r--r--sfx2/source/control/objface.cxx1
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/ui/frmdlg/colex.cxx3
-rw-r--r--uui/source/fltdlg.cxx13
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--writerfilter/source/doctok/WW8StructBase.hxx2
10 files changed, 18 insertions, 21 deletions
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 144daca233d9..a69a45241575 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -625,16 +625,16 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
else if( pEdit == &maNumericEdit )
{
double fValue;
- char pBuf[256];
rtl::OString aContents(rtl::OUStringToOString(maNumericEdit.GetText(),
osl_getThreadTextEncoding()));
fValue = atof(aContents.getStr());
if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) )
{
+ char pBuf[256];
if( fValue < mfMin )
fValue = mfMin;
else if( fValue > mfMax )
- fValue = mfMax;
+ fValue = mfMax;
sprintf( pBuf, "%g", fValue );
maNumericEdit.SetText( String( pBuf, osl_getThreadTextEncoding() ) );
}
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 8e65caa3a15f..e829d572a60a 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -50,6 +50,7 @@ BaseContainer::BaseContainer()
: BaseLock ( )
, m_rCache ( )
, m_pFlushCache(NULL )
+ , m_eType()
, m_lListener (m_aLock)
{
m_rCache->load(FilterCache::E_CONTAINS_STANDARD);
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 7d28932d43bd..be2301b18f3b 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -132,15 +132,12 @@ sal_Bool RscMgr::IsDefault( const RSCINST & rInst ){
|*
*************************************************************************/
sal_Bool RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
- RscMgrInst * pClassData;
- RscMgrInst * pDfltData;
-
if( !RscClass::IsValueDefault( rInst, pDef ) )
return sal_False;
if( pDef ){
- pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
- pDfltData = (RscMgrInst *)(pDef + RscClass::Size());
+ RscMgrInst * pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
+ RscMgrInst * pDfltData = (RscMgrInst *)(pDef + RscClass::Size());
if( !pClassData->aRefId.IsId() && !pDfltData->aRefId.IsId() ){
return sal_True;
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index 458f94188e6b..51dcb9f4fb0d 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -27,7 +27,7 @@
using namespace xmloff::token;
-ScMyColumnRowGroup::ScMyColumnRowGroup()
+ScMyColumnRowGroup::ScMyColumnRowGroup() : bDisplay(false)
{
}
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index dc0417bc389a..9e253f0fa3cf 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -91,6 +91,7 @@ struct SfxInterface_Impl
SfxInterface_Impl() :
aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()),
aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager())
+ , pModule(NULL)
, bRegistered(sal_False)
{
pObjectBars = new SfxObjectUIArr_Impl;
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 90c369cb0830..768827d14b38 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -925,9 +925,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
long lTopBorder = rBorder.Top() + 5;
long lBottomBorder = rBorder.Bottom() - 5;
const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ;
- long lSpaceUsed = 0;
long lTranslatePos = 0;
- int loop = 0;
bool bScrollbars = false;
// do all neccessary resizings
@@ -956,6 +954,8 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
//start the real layout so nothing overlaps anymore
if (aVisiblePostItList.size()>1)
{
+ long lSpaceUsed = 0;
+ int loop = 0;
bool bDone = false;
// if no window is moved anymore we are finished
while (!bDone)
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 3fa7f2983cdf..a8cac2661fae 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -42,14 +42,13 @@
-----------------------------------------------------------------------*/
void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
- const SvxPageItem* pPage = 0;
SfxItemPool* pPool = rSet.GetPool();
sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE );
if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// alignment
- pPage = (const SvxPageItem*)&rSet.Get( nWhich );
+ const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich );
if ( pPage )
SetUsage( pPage->GetPageUsage() );
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 2e333026fc19..27c644b23f39 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -53,12 +53,13 @@ namespace uui
*//*-*************************************************************************************************************/
FilterDialog::FilterDialog( Window* pParentWindow ,
ResMgr* pResMgr )
- : ModalDialog ( pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) )
- , m_ftURL ( this, ResId( FT_URL, *pResMgr ) )
- , m_lbFilters ( this, ResId( LB_FILTERS, *pResMgr ) )
- , m_btnOK ( this, ResId( BTN_OK, *pResMgr ) )
- , m_btnCancel ( this, ResId( BTN_CANCEL, *pResMgr ) )
- , m_btnHelp ( this, ResId( BTN_HELP, *pResMgr ) )
+ : ModalDialog (pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) )
+ , m_ftURL (this, ResId( FT_URL, *pResMgr))
+ , m_lbFilters (this, ResId( LB_FILTERS, *pResMgr))
+ , m_btnOK (this, ResId( BTN_OK, *pResMgr))
+ , m_btnCancel (this, ResId( BTN_CANCEL, *pResMgr))
+ , m_btnHelp (this, ResId( BTN_HELP, *pResMgr))
+ , m_pFilterNames(NULL)
{
FreeResource();
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index d5ff3de8ecfc..920d8277ad46 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1423,8 +1423,6 @@ sal_Bool Printer::EndJob()
mnCurPage = 0;
- bRet = sal_True;
-
mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName = rtl::OUString();
diff --git a/writerfilter/source/doctok/WW8StructBase.hxx b/writerfilter/source/doctok/WW8StructBase.hxx
index 7039299f6b43..4b3d7c49ec57 100644
--- a/writerfilter/source/doctok/WW8StructBase.hxx
+++ b/writerfilter/source/doctok/WW8StructBase.hxx
@@ -70,7 +70,7 @@ protected:
public:
WW8StructBase(sal_Int32 nLength)
- : mSequence(nLength)
+ : mSequence(nLength), mpParent(NULL), mpDocument(NULL)
{
}