summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/form/fmcontrollayout.cxx2
-rw-r--r--svx/source/form/fmmodel.cxx1
2 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 74bb7f41ba40..9748426c0b26 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -315,6 +315,8 @@ namespace svxform
//--------------------------------------------------------------------
bool ControlLayouter::useDocumentReferenceDevice( DocumentType _eDocType )
{
+ if ( _eDocType == eUnknownDocumentType )
+ return false;
OConfigurationNode aConfig = getLayoutSettings( _eDocType );
Any aUseRefDevice = aConfig.getNodeValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentTextMetrics" ) ) );
bool bUseRefDevice = false;
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 15932d4d93cc..a09d0f78173a 100644
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -318,7 +318,6 @@ sal_Bool FmFormModel::ControlsUseRefDevice() const
{
if ( !m_pImpl->aControlsUseRefDevice )
{
- OSL_PRECOND( m_pObjShell, "FmFormModel::ControlsUseRefDevice: no object shell -> no document -> no document type -> no way!" );
DocumentType eDocType = eUnknownDocumentType;
if ( m_pObjShell )
eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() );