framework/source/services/taskcreatorsrv.cxx |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit e41162d786895863fdd3f37d24bd126a77058481
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Oct 27 13:26:31 2014 +0200

    Ignore exceptions when getting the background color configuration
    
    We are experimenting with a pruned configuration database in the desktop 
case,
    and letting the exception propagate here killed the document loading.
    
    Change-Id: I59e5d016617c17c2bc36de2fd69c6691bfa6b135

diff --git a/framework/source/services/taskcreatorsrv.cxx 
b/framework/source/services/taskcreatorsrv.cxx
index 0e30ef5..2b04c81 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -272,10 +272,21 @@ css::uno::Reference< css::awt::XWindow > 
TaskCreatorService::implts_createContai
     if ( ! xWindow.is())
         throw css::uno::Exception("TaskCreator service was not able to create 
suitable frame window.",
                                   static_cast< ::cppu::OWeakObject* >(this));
+
+    sal_Int32 nBackground = 0xffffffff;
+
     if (bTopWindow)
-        
xPeer->setBackground(::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
-    else
-        xPeer->setBackground(0xffffffff);
+    {
+        try
+        {
+            nBackground = 
::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor;
+        }
+        catch (const css::uno::Exception &)
+        {
+            // Ignore
+        }
+    }
+    xPeer->setBackground(nBackground);
 
     return xWindow;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to