summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/doc/objserv.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c063546da1c7..e06773f7f178 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1337,8 +1337,13 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent )
void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
{
// Check if it is stored in OASIS format...
- if ( GetMedium() && GetMedium()->GetFilter()
- && ( !GetMedium()->GetFilter()->IsOwnFormat() || !GetMedium()->HasStorage_Impl() ) )
+ if ( GetMedium()
+ && GetMedium()->GetFilter()
+ && GetMedium()->GetName().Len()
+ && ( !GetMedium()->GetFilter()->IsOwnFormat()
+ || !GetMedium()->HasStorage_Impl()
+ )
+ )
{
// Only OASIS and OOo6.x formats will be handled further
InfoBox( NULL, SfxResId( RID_XMLSEC_INFO_WRONGDOCFORMAT ) ).Execute();