diff options
Diffstat (limited to 'framework/source/helper/vclstatusindicator.cxx')
-rw-r--r-- | framework/source/helper/vclstatusindicator.cxx | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index d9861169d5cc..1578b3d45454 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -91,24 +91,24 @@ void SAL_CALL VCLStatusIndicator::start(const ::rtl::OUString& sText , // <- SAFE ---------------------------------- // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex()); - - Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); - if (!m_pStatusBar) - m_pStatusBar = new StatusBar(pParentWindow, WB_3DLOOK|WB_BORDER); + { + SolarMutexGuard aSolarGuard; - VCLStatusIndicator::impl_recalcLayout(m_pStatusBar, pParentWindow); + Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); + if (!m_pStatusBar) + m_pStatusBar = new StatusBar(pParentWindow, WB_3DLOOK|WB_BORDER); - m_pStatusBar->Show(); - m_pStatusBar->StartProgressMode(sText); - m_pStatusBar->SetProgressValue(0); + VCLStatusIndicator::impl_recalcLayout(m_pStatusBar, pParentWindow); - // force repaint! - pParentWindow->Show(); - pParentWindow->Invalidate(INVALIDATE_CHILDREN); - pParentWindow->Flush(); + m_pStatusBar->Show(); + m_pStatusBar->StartProgressMode(sText); + m_pStatusBar->SetProgressValue(0); - aSolarLock.clear(); + // force repaint! + pParentWindow->Show(); + pParentWindow->Invalidate(INVALIDATE_CHILDREN); + pParentWindow->Flush(); + } // <- SOLAR SAFE ---------------------------- // SAFE -> ---------------------------------- @@ -125,13 +125,12 @@ void SAL_CALL VCLStatusIndicator::reset() throw(css::uno::RuntimeException) { // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if (m_pStatusBar) { m_pStatusBar->SetProgressValue(0); m_pStatusBar->SetText(String()); } - aSolarLock.clear(); // <- SOLAR SAFE ---------------------------- } @@ -148,16 +147,17 @@ void SAL_CALL VCLStatusIndicator::end() // <- SAFE ---------------------------------- // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex()); - if (m_pStatusBar) { - m_pStatusBar->EndProgressMode(); - m_pStatusBar->Show(sal_False); - - delete m_pStatusBar; - m_pStatusBar = 0; + SolarMutexGuard aSolarGuard; + if (m_pStatusBar) + { + m_pStatusBar->EndProgressMode(); + m_pStatusBar->Show(sal_False); + + delete m_pStatusBar; + m_pStatusBar = 0; + } } - aSolarLock.clear(); // <- SOLAR SAFE ---------------------------- } @@ -172,10 +172,11 @@ void SAL_CALL VCLStatusIndicator::setText(const ::rtl::OUString& sText) // <- SAFE ---------------------------------- // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex()); - if (m_pStatusBar) - m_pStatusBar->SetText(sText); - aSolarLock.clear(); + { + SolarMutexGuard aSolarGuard; + if (m_pStatusBar) + m_pStatusBar->SetText(sText); + } // <- SOLAR SAFE ---------------------------- } @@ -203,10 +204,11 @@ void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue) ((nValue*100) / ::std::max(nRange,(sal_Int32)1)), (sal_Int32)100)); // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex()); - if (m_pStatusBar) - m_pStatusBar->SetProgressValue(nPercent); - aSolarLock.clear(); + { + SolarMutexGuard aSolarGuard; + if (m_pStatusBar) + m_pStatusBar->SetProgressValue(nPercent); + } // <- SOLAR SAFE ---------------------------- } |