Kaydet (Commit) b0df6d86 authored tarafından Caolán McNamara's avatar Caolán McNamara

SfxObjectShell may not have a medium

üst 545921f9
...@@ -63,7 +63,8 @@ namespace ooo ...@@ -63,7 +63,8 @@ namespace ooo
VBAHELPER_DLLPRIVATE inline bool isAlienDoc( SfxObjectShell& rDocShell, const char* pMimeType ) VBAHELPER_DLLPRIVATE inline bool isAlienDoc( SfxObjectShell& rDocShell, const char* pMimeType )
{ {
bool bRes( false ); bool bRes( false );
const SfxFilter *pFilt = rDocShell.GetMedium()->GetFilter(); const SfxMedium *pMedium = rDocShell.GetMedium();
const SfxFilter *pFilt = pMedium ? pMedium->GetFilter() : NULL;
if ( pFilt && pFilt->IsAlienFormat() ) if ( pFilt && pFilt->IsAlienFormat() )
bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 ); bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 );
return bRes; return bRes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment