summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-11-14 20:35:32 +0100
committerMichael Stahl <mstahl@redhat.com>2011-11-14 20:41:01 +0100
commit718f032a3c9dc5071f86a6d69321dc23d6b56188 (patch)
tree2bdfc143c19f0778f3bd58cb9942d7b51798c5b3 /framework/source
parent51494ab7291ad97eca5acfe2d9a4943ddfb4800d (diff)
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)
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/loadenv/loadenv.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 61c520d4d67b..e82823b470ee 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")),