summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-10-21 14:48:59 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-10-21 14:48:59 +0000
commit23740dc4a7e81c8c5129e26fe579cf81363d6388 (patch)
treeb2da36348631013019f0e6d4f62726ceee4c2fcf /framework
parent8fce23bcdfed5be456443d25a0b229f82db8b975 (diff)
CWS-TOOLING: integrate CWS fwk123
2009-10-14 10:18:49 +0200 cd r276885 : #i99971# Use AttachThreadInput to force SetForegroundWindow 2009-10-14 08:56:20 +0200 mav r276881 : #i105476# let the allocated memory live long anough 2009-10-14 08:53:51 +0200 mav r276880 : #i105476# let ZipFile use mutex while creating the requested stream 2009-10-14 08:51:52 +0200 mav r276879 : #i105476# let buffered IO use mutex ( patch from MHU ) 2009-10-09 12:20:22 +0200 cd r276803 : #i99971# Use configuration to control window to front/focus handling 2009-10-09 12:19:22 +0200 cd r276802 : #i99971# New configuration item to force set focus and window to front for new document windows 2009-10-09 12:18:23 +0200 cd r276801 : #i99971# Introduction of a new show flag to force window to front 2009-10-06 11:04:16 +0200 ab r276695 : #i105386# Call xmlInitParser() before registering input callbacks
Diffstat (limited to 'framework')
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx19
-rw-r--r--framework/source/loadenv/loadenv.cxx28
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 0af8ea0e6587..ee39e583e5e7 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 ..