summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-22 16:46:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-22 16:46:14 +0100
commite19ffa13594640655841f26d797fcd8f49733932 (patch)
tree9cbfb003f3cac6efcc9977949efaf5ce4d4be1d7
parent34d7602954d4483b3bc9db700e7df2c15348947a (diff)
Revert "Timer::Start must be called with SolarMutex locked"
This reverts commit 1c3e88a4ffd927d4dda8bb9e0d05cddc6cd685c0; the static AutoRecovery instance is only destroyed during exit, but wants to use SolarMutex; that causes crashes at least in CppunitTest_services. Apparently needs more thought.
-rw-r--r--framework/source/services/autorecovery.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 6d0e06494810..dec1ee8392ba 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2249,7 +2249,6 @@ void AutoRecovery::implts_updateTimer()
{
implts_stopTimer();
- sal_Int32 nMilliSeconds = 0;
/* SAFE */ {
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
@@ -2259,6 +2258,7 @@ void AutoRecovery::implts_updateTimer()
)
return;
+ sal_Int32 nMilliSeconds = 0;
if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL)
{
nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms
@@ -2270,16 +2270,15 @@ void AutoRecovery::implts_updateTimer()
else if (m_eTimerType == AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED)
nMilliSeconds = 300; // there is a minimum time frame, where the user can lose some key input data!
- } /* SAFE */
-
- SolarMutexGuard g;
m_aTimer.SetTimeout(nMilliSeconds);
m_aTimer.Start();
+
+ } /* SAFE */
}
void AutoRecovery::implts_stopTimer()
{
- SolarMutexGuard g;
+ osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
if (!m_aTimer.IsActive())
return;