diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-01 15:39:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-02 07:57:38 +0200 |
commit | 09b5fe4c898cacd69042d1c585e27daf5d86cae7 (patch) | |
tree | ec6a77f4d3d2c595da0ef1f61721b23006246109 /desktop/source/app | |
parent | loplugin:unuseddefaultparam in forms (diff) | |
download | core-09b5fe4c898cacd69042d1c585e27daf5d86cae7.tar.gz core-09b5fe4c898cacd69042d1c585e27daf5d86cae7.zip |
loplugin:unuseddefaultparam in desktop
Change-Id: I9a7ac03dcbc3849eced0f8431e186b59b31b2418
Diffstat (limited to 'desktop/source/app')
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 26 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.hxx | 8 |
2 files changed, 13 insertions, 21 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index a3505795d3fa..2a726277c4b6 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -400,7 +400,7 @@ void OfficeIPCThread::SetDowning() static bool s_bInEnableRequests = false; -void OfficeIPCThread::EnableRequests( bool i_bEnable ) +void OfficeIPCThread::EnableRequests() { // switch between just queueing the requests and executing them ::osl::MutexGuard aGuard( GetMutex() ); @@ -408,14 +408,11 @@ void OfficeIPCThread::EnableRequests( bool i_bEnable ) if ( pGlobalOfficeIPCThread.is() ) { s_bInEnableRequests = true; - pGlobalOfficeIPCThread->mbRequestsEnabled = i_bEnable; - if( i_bEnable ) - { - // hit the compiler over the head - ProcessDocumentsRequest aEmptyReq = ProcessDocumentsRequest( boost::optional< OUString >() ); - // trigger already queued requests - OfficeIPCThread::ExecuteCmdLineRequests( aEmptyReq ); - } + pGlobalOfficeIPCThread->mbRequestsEnabled = true; + // hit the compiler over the head + ProcessDocumentsRequest aEmptyReq = ProcessDocumentsRequest( boost::optional< OUString >() ); + // trigger already queued requests + OfficeIPCThread::ExecuteCmdLineRequests( aEmptyReq ); s_bInEnableRequests = false; } } @@ -430,14 +427,14 @@ bool OfficeIPCThread::AreRequestsPending() return false; } -void OfficeIPCThread::RequestsCompleted( int nCount ) +void OfficeIPCThread::RequestsCompleted() { // Remove nCount pending requests from our internal counter ::osl::MutexGuard aGuard( GetMutex() ); if ( pGlobalOfficeIPCThread.is() ) { if ( pGlobalOfficeIPCThread->mnPendingRequests > 0 ) - pGlobalOfficeIPCThread->mnPendingRequests -= nCount; + pGlobalOfficeIPCThread->mnPendingRequests --; } } @@ -682,12 +679,9 @@ void OfficeIPCThread::SetReady( } } -void OfficeIPCThread::WaitForReady( - rtl::Reference< OfficeIPCThread > const & pThread) - +void OfficeIPCThread::WaitForReady() { - rtl::Reference< OfficeIPCThread > const & t( - pThread.is() ? pThread : pGlobalOfficeIPCThread); + rtl::Reference< OfficeIPCThread > const & t(pGlobalOfficeIPCThread); if (t.is()) { t->cReady.wait(); diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index 401480353c1d..e00593dee359 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -106,9 +106,9 @@ class OfficeIPCThread : public salhelper::Thread // controlling pipe communication during shutdown static void SetDowning(); - static void EnableRequests( bool i_bEnable = true ); + static void EnableRequests(); static bool AreRequestsPending(); - static void RequestsCompleted( int n = 1 ); + static void RequestsCompleted(); static bool ExecuteCmdLineRequests( ProcessDocumentsRequest& ); // return sal_False if second office @@ -118,9 +118,7 @@ class OfficeIPCThread : public salhelper::Thread static void SetReady( rtl::Reference< OfficeIPCThread > const & pThread = rtl::Reference< OfficeIPCThread >()); - static void WaitForReady( - rtl::Reference< OfficeIPCThread > const & pThread = - rtl::Reference< OfficeIPCThread >()); + static void WaitForReady(); static bool IsEnabled(); bool AreRequestsEnabled() const { return mbRequestsEnabled && ! mbDowning; } |