summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objstor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r--sfx2/source/doc/objstor.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 50ec51f7e546..d8d0104ac315 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -438,7 +438,7 @@ bool SfxObjectShell::InitNew( const uno::Reference< embed::XStorage >& xStorage
bool SfxObjectShell::Load( SfxMedium& rMedium )
{
- return GeneralInit_Impl( rMedium.GetStorage(), true );
+ return GeneralInit_Impl(rMedium.GetStorage(), !tools::isEmptyFileUrl(rMedium.GetName()));
}
void SfxObjectShell::DoInitUnitTest()
@@ -674,7 +674,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bWarnMediaTypeFallback = false;
}
- if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() )
+ if (bWarnMediaTypeFallback
+ || (!tools::isEmptyFileUrl(pMedium->GetName())
+ && !xStorage->getElementNames().getLength()))
SetError(ERRCODE_IO_BROKENPACKAGE);
}
catch( uno::Exception& )