From 75f4ad0f6f81d340d22100d87173185818505547 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 27 Oct 2014 13:26:31 +0200 Subject: 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 --- framework/source/services/taskcreatorsrv.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx index 0e30ef563722..2b04c81d2d92 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; } -- cgit