Some cppcheck cleaning in framework
Change-Id: If0bb2734bb2c71f69c85496fd59ca860aa14fd75
This commit is contained in:
parent
254b11a2c6
commit
d605a49f84
5 changed files with 5 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue