diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-01 14:45:53 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-01 14:45:53 +0100 |
commit | bd5ae54c881418c31261e79c50cb8645411cc2dc (patch) | |
tree | cae8bd770a57e7167571ac6a55a4bdeb99ed95dc /framework | |
parent | be3ac782e544a45fedcbd1c241656890b29a0dbd (diff) | |
parent | e92917d1bc75f095222ec757f0006b8ef6883a9b (diff) |
merge commit for DEV300_m63
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 19 | ||||
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 28 |
2 files changed, 38 insertions, 9 deletions
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index b2139488a0ee..ee59097aa3fc 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -67,6 +67,7 @@ // includes of other projects #include <comphelper/sequenceashashmap.hxx> #include <comphelper/mediadescriptor.hxx> +#include <comphelper/configurationhelper.hxx> #include <vcl/svapp.hxx> #include <vos/mutex.hxx> @@ -361,6 +362,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed() css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY); css::uno::Reference< css::awt::XWindow > xPluggWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR.get(), css::uno::UNO_QUERY); aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -432,8 +434,21 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed() // is visible too. impl_showProgress(); - if (xParentWindow.is()) - xParentWindow->setVisible(sal_True); + ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex()); + Window* pWindow = VCLUnoHelper::GetWindow(xParentWindow); + if ( pWindow ) + { + bool bForceFrontAndFocus(false);
+ ::comphelper::ConfigurationHelper::readDirectKey(
+ xSMGR,
+ ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
+ ::rtl::OUString::createFromAscii("NewDocumentHandling"),
+ ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= bForceFrontAndFocus; + + pWindow->Show(sal_True, bForceFrontAndFocus ? SHOW_FOREGROUNDTASK : 0 ); + } + /* #i75167# dont disturb window manager handling .-) css::uno::Reference< css::awt::XTopWindow > xParentWindowTop(xParentWindow, css::uno::UNO_QUERY); diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 3bf20e9f6590..9fb939e9db0b 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1740,14 +1740,28 @@ void LoadEnv::impl_reactForLoadingState() void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::XWindow >& xWindow , sal_Bool bForceToFront) { - css::uno::Reference< css::awt::XTopWindow > xTopWindow(xWindow, css::uno::UNO_QUERY); - - if (xWindow.is()) - xWindow->setVisible(sal_True); - - if (xTopWindow.is() && bForceToFront) - xTopWindow->toFront(); + // SAFE -> ---------------------------------- + ReadGuard aReadLock(m_aLock); + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xSMGR.get(), css::uno::UNO_QUERY ); + aReadLock.unlock(); + // <- SAFE ---------------------------------- + ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex()); + Window* pWindow = VCLUnoHelper::GetWindow(xWindow); + if ( pWindow ) + { + bool bForceFrontAndFocus(false);
+ css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey(
+ xSMGR,
+ ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
+ ::rtl::OUString::createFromAscii("NewDocumentHandling"),
+ ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
+ ::comphelper::ConfigurationHelper::E_READONLY);
+ a >>= bForceFrontAndFocus; + + pWindow->Show(sal_True, (bForceFrontAndFocus || bForceToFront) ? SHOW_FOREGROUNDTASK : 0 ); + } +
/* #i19976# We tried to prevent a toFront() call in case the user putted the loading document into the background .. |