diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-06 07:58:08 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-02-06 07:58:08 +0100 |
commit | b3e64c3708fa19a87a0df31f6dbc4ea4753b23d6 (patch) | |
tree | 4c5042d7f6bc8e125ac45220bd185d7650aefba3 | |
parent | 444ae4d04adf6c9cdcd1222ef3b8b2e5bf45db0a (diff) |
Some cppcheck cleaning
Change-Id: I1b80271473166755e8f0afaa7af8ffc7bea394b3
-rw-r--r-- | cui/source/customize/cfg.cxx | 3 | ||||
-rw-r--r-- | drawinglayer/source/tools/converters.cxx | 3 | ||||
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 14 |
3 files changed, 6 insertions, 14 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5ecfba5cbc63..20956aee716c 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1793,7 +1793,6 @@ void SvxConfigPage::Reset( const SfxItemSet& ) for ( sal_Int32 i = 0; i < aFrameList.getLength(); ++i ) { - SaveInData* pData = NULL; uno::Reference < frame::XFrame > xf = aFrameList[i]; if ( xf.is() && xf != m_xFrame ) @@ -1833,7 +1832,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) if ( xDocCfgMgr.is() ) { - pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); + SaveInData* pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); if ( pData && !pData->IsReadOnly() ) { diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx index 6e3493447c86..c4d5bc90fe8b 100644 --- a/drawinglayer/source/tools/converters.cxx +++ b/drawinglayer/source/tools/converters.cxx @@ -53,9 +53,8 @@ namespace drawinglayer if(nViewVisibleArea > nMaxQuadratPixels) { - double fReduceFactor(1.0); // reduce render size - fReduceFactor = sqrt((double)nMaxQuadratPixels / (double)nViewVisibleArea); + double fReduceFactor = sqrt((double)nMaxQuadratPixels / (double)nViewVisibleArea); nDiscreteWidth = basegfx::fround((double)nDiscreteWidth * fReduceFactor); nDiscreteHeight = basegfx::fround((double)nDiscreteHeight * fReduceFactor); diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index 6f120221f194..d9e1afdda29a 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -844,13 +844,10 @@ void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){ *************************************************************************/ sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName ) { - sal_uLong lKey; - RscFile * pFName; - - lKey = Find( rName ); + sal_uLong lKey = Find( rName ); if( UNIQUEINDEX_ENTRY_NOTFOUND == lKey ) { - pFName = new RscFile(); + RscFile * pFName = new RscFile(); pFName->aFileName = rName; pFName->aPathName = rName; lKey = Insert( pFName ); @@ -867,13 +864,10 @@ sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName ) sal_uLong RscFileTab :: NewIncFile(const rtl::OString& rName, const rtl::OString& rPath) { - sal_uLong lKey; - RscFile * pFName; - - lKey = Find( rName ); + sal_uLong lKey = Find( rName ); if( UNIQUEINDEX_ENTRY_NOTFOUND == lKey ) { - pFName = new RscFile(); + RscFile * pFName = new RscFile(); pFName->aFileName = rName; pFName->aPathName = rPath; pFName->SetIncFlag(); |