diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-13 15:26:41 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-13 15:47:17 +0100 |
commit | 88285f84bdf54147ee5238e97d0d805fa1c127c1 (patch) | |
tree | 2155945520140e9451af9f059365130b1e730f33 /framework | |
parent | 3f170f223296e2d0d336ff69088e5ba57b3a37c9 (diff) |
fdo#35091 do not honour ForceFocusAndToFront preference for preview
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 409ef40f2f2d..2e100c15ae97 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; eval:(c-set-style "bsd"); tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1688,14 +1688,21 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X Window* pWindow = VCLUnoHelper::GetWindow(xWindow); if ( pWindow ) { + bool preview(false); + css::uno::Any a = m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_PREVIEW()]; + a >>= preview; + bool bForceFrontAndFocus(false); - css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/View")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewDocumentHandling")), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ForceFocusAndToFront")), - ::comphelper::ConfigurationHelper::E_READONLY); - a >>= bForceFrontAndFocus; + if ( !preview ) + { + a = ::comphelper::ConfigurationHelper::readDirectKey( + xSMGR, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/View")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewDocumentHandling")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ForceFocusAndToFront")), + ::comphelper::ConfigurationHelper::E_READONLY); + a >>= bForceFrontAndFocus; + } if( pWindow->IsVisible() && (bForceFrontAndFocus || bForceToFront) ) pWindow->ToTop(); |