summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2009-09-25 11:43:51 +0000
committerFrank Schönheit <fs@openoffice.org>2009-09-25 11:43:51 +0000
commitb5fb85c6253501f340a669ff02f64553a6e09ae7 (patch)
tree516c5f5132096d167adfee87f4f1898f44656a8b /svx
parentf2eeb84bfca2f47336dd05164c76d35638d8f9d4 (diff)
do not assert when we do not have an ObjectShell, this is valid in clipboard scenarios
Diffstat (limited to 'svx')
-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() );