[Libreoffice-commits] .: framework/source

Michael Stahl mst at kemper.freedesktop.org
Mon Nov 14 11:45:07 PST 2011


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

New commits:
commit 718f032a3c9dc5071f86a6d69321dc23d6b56188
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Nov 14 20:35:32 2011 +0100

    LoadEnv::impl_makeFrameWindowVisible: fix crash:
    
    do not insert "Preview" property if it does not exist already
    (dbaccess crashes after throwing uncaught exception because of this
    when creating new database;
    regression in 88285f84bdf54147ee5238e97d0d805fa1c127c1)

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 61c520d..e82823b 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1688,14 +1688,14 @@ 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 const preview( m_lMediaDescriptor.getUnpackedValueOrDefault(
+                ::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False) );
 
         bool bForceFrontAndFocus(false);
         if ( !preview )
         {
-            a = ::comphelper::ConfigurationHelper::readDirectKey(
+            css::uno::Any const a =
+                ::comphelper::ConfigurationHelper::readDirectKey(
                   xSMGR,
                   ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/View")),
                   ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewDocumentHandling")),


More information about the Libreoffice-commits mailing list