SfxObjectShell may not have a medium
This commit is contained in:
parent
545921f914
commit
b0df6d86e4
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user