Commits

Anonymous committed c852a05

do not assert when we do not have an ObjectShell, this is valid in clipboard scenarios

  • Participants
  • Parent commits db70221

Comments (0)

Files changed (2)

svx/source/form/fmcontrollayout.cxx

 	//--------------------------------------------------------------------
     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;

svx/source/form/fmmodel.cxx

 {
     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() );