summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-10-27 13:26:31 +0200
committerToma┼ż Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 23:04:24 +0100
commit75f4ad0f6f81d340d22100d87173185818505547 (patch)
treebac5771b986776bfe0fe21f402504c7e58eae163
parent7c77a44ced27975499132b80322fdaeefa7f2287 (diff)
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
-rw-r--r--framework/source/services/taskcreatorsrv.cxx17
1 files 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;
}