diff options
Diffstat (limited to 'sfx2/source/dialog/dinfdlg.cxx')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 537206b3f98c..d752920ac490 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1294,10 +1294,13 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) { try { - uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW ); - - xProps->getPropertyValue(u"ImagePreferredDPI"_ustr) >>= nImagePreferredDPI; + uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY ); + if (xFac) + { + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY ); + if (xProps) + xProps->getPropertyValue(u"ImagePreferredDPI"_ustr) >>= nImagePreferredDPI; + } } catch( uno::Exception& ) { |