From d116894b26f538793a0d5dc5847efd2fb53e7acb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jun 2017 16:03:04 +0200 Subject: loplugin:oncevar in formula..framework Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350 Reviewed-on: https://gerrit.libreoffice.org/39186 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/source/services/autorecovery.cxx | 7 +++---- framework/source/services/substitutepathvars.cxx | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'framework/source/services') diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 2a6ceb707af1..3a9fdfdb546a 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -2344,8 +2344,7 @@ IMPL_LINK_NOARG(AutoRecovery, implts_timerExpired, Timer *, void) // force save of all currently open documents // The called method returns an info, if and how this // timer must be restarted. - bool bAllowUserIdleLoop = true; - AutoRecovery::ETimerType eSuggestedTimer = implts_saveDocs(bAllowUserIdleLoop, false); + AutoRecovery::ETimerType eSuggestedTimer = implts_saveDocs(true/*bAllowUserIdleLoop*/, false); // If timer is not used for "short callbacks" (means polling // for special states) ... reset the handle state of all @@ -3700,7 +3699,7 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams) // Of course this method returns the right state - // because it knows, that we are running in EMERGENCY SAVE mode .-) - bool bAllowUserIdleLoop = false; // not allowed to change that .-) + bool const bAllowUserIdleLoop = false; // not allowed to change that .-) AutoRecovery::ETimerType eSuggestedTimer = AutoRecovery::E_DONT_START_TIMER; do { @@ -3768,7 +3767,7 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) // Of course this method returns the right state - // because it knows, that we are running in SESSION SAVE mode .-) - bool bAllowUserIdleLoop = false; // not allowed to change that .-) + bool const bAllowUserIdleLoop = false; // not allowed to change that .-) AutoRecovery::ETimerType eSuggestedTimer = AutoRecovery::E_DONT_START_TIMER; do { diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 7b1504ae69f4..a266af912c8f 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -488,8 +488,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText // variable in text but unknown! if ( bSubstRequired ) { - OUString aMsg( "Unknown variable found!" ); - throw NoSuchElementException( aMsg, static_cast(this) ); + throw NoSuchElementException( "Unknown variable found!", static_cast(this) ); } else aResult = aWorkText; @@ -600,8 +599,7 @@ OUString const & SubstitutePathVariables::impl_getSubstituteVariableValue( const } else { - OUString aExceptionText("Unknown variable!"); - throw NoSuchElementException(aExceptionText, static_cast(this)); + throw NoSuchElementException("Unknown variable!", static_cast(this)); } } -- cgit