[Libreoffice-commits] .: framework/source

Lionel Elie Mamane lmamane at kemper.freedesktop.org
Sun Nov 13 06:48:37 PST 2011


 framework/source/loadenv/loadenv.cxx |   23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 88285f84bdf54147ee5238e97d0d805fa1c127c1
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Nov 13 15:26:41 2011 +0100

    fdo#35091 do not honour ForceFocusAndToFront preference for preview

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 409ef40..2e100c1 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();


More information about the Libreoffice-commits mailing list