diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-12-24 16:30:51 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-12-24 16:40:57 +0100 |
commit | d605a49f84e0b8ae25ff7dd42399d3a31747b057 (patch) | |
tree | 579556a2c562830347c861b77cd814b331045810 /framework | |
parent | 254b11a2c6de6210864f60de491e1917abfbcb14 (diff) |
Some cppcheck cleaning in framework
Change-Id: If0bb2734bb2c71f69c85496fd59ca860aa14fd75
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/jobs/jobresult.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/substitutepathvars.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/recentfilesmenucontroller.cxx | 2 |
5 files changed, 5 insertions, 9 deletions
diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx index f79fcbdb5d57..0af4d78bf77b 100644 --- a/framework/source/jobs/jobresult.cxx +++ b/framework/source/jobs/jobresult.cxx @@ -105,9 +105,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult ) if ( aProtocol.empty() ) return; - ::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.end(); - - pIt = aProtocol.find(JobConst::ANSWER_DEACTIVATE_JOB()); + ::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.find(JobConst::ANSWER_DEACTIVATE_JOB()); if (pIt != aProtocol.end()) { pIt->second >>= m_bDeactivate; diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index ee4fd2f67b6f..67012ed2b76b 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -958,9 +958,7 @@ sal_Bool PathSettings::impl_isValidPath(const ::rtl::OUString& sPath) const //----------------------------------------------------------------------------- ::rtl::OUString impl_extractBaseFromPropName(const ::rtl::OUString& sPropName) { - sal_Int32 i = -1; - - i = sPropName.indexOf(POSTFIX_INTERNAL_PATHS); + sal_Int32 i = sPropName.indexOf(POSTFIX_INTERNAL_PATHS); if (i > -1) return sPropName.copy(0, i); i = sPropName.indexOf(POSTFIX_USER_PATHS); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 08dd17f29554..5db956ddcd22 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -747,13 +747,13 @@ rtl::OUString SubstitutePathVariables::GetHomeVariableValue() const rtl::OUString SubstitutePathVariables::GetPathVariableValue() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetPathVariableValue" ); - const int PATH_EXTEND_FACTOR = 120; rtl::OUString aRetStr; const char* pEnv = getenv( "PATH" ); if ( pEnv ) { + const int PATH_EXTEND_FACTOR = 120; rtl::OUString aTmp; rtl::OUString aPathList( pEnv, strlen( pEnv ), osl_getThreadTextEncoding() ); rtl::OUStringBuffer aPathStrBuffer( aPathList.getLength() * PATH_EXTEND_FACTOR / 100 ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 4303f4e58bc1..0f2c6ca4cb27 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -81,7 +81,7 @@ // Be careful removing this "bad" construct. There are serious problems // with #define STRICT and including windows.h. Changing this needs some // redesign on other projects, too. Especially sal/main.h which defines -// HINSTANCE depending on STRCIT!!!!!!!!!!!!!!! +// HINSTANCE depending on STRICT!!!!!!!!!!!!!!! struct SystemMenuData { unsigned long nSize; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 2603b2f86c83..c43ba7783f27 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -146,7 +146,6 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const sal_uInt32 nCount = m_aRecentFilesItems.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - char menuShortCut[5] = "~n: "; ::rtl::OUString aMenuShortCut; if ( i <= 9 ) @@ -155,6 +154,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > aMenuShortCut = rtl::OUString( "1~0: " ); else { + char menuShortCut[5] = "~n: "; menuShortCut[1] = (char)( '1' + i ); aMenuShortCut = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(menuShortCut) ); } |