summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/core/xmlimp.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index fc0b407da3f2..87400560aa37 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1710,9 +1710,8 @@ bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
// check the consistency only for the ODF1.2 and later ( according to content.xml )
// manifest.xml might have no version, it should be checked here and the correct version should be set
try
- {
- uno::Reference< document::XStorageBasedDocument > xDoc( mxModel, uno::UNO_QUERY_THROW );
- uno::Reference< embed::XStorage > xStor = xDoc->getDocumentStorage();
+ { // don't use getDocumentStorage(), it's temporary and latest version
+ uno::Reference<embed::XStorage> const xStor(GetSourceStorage());
uno::Reference< beans::XPropertySet > xStorProps( xStor, uno::UNO_QUERY_THROW );
// the check should be done only for OASIS format