summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/xml/xmlimp.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index be9ad1189feb..38120ed4e321 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -652,6 +652,13 @@ void SwXMLImport::startDocument()
if( !pDoc )
return;
+ if (SvXMLImportFlags::ALL == getImportFlags())
+ {
+ // for flat ODF - this is done in SwReader::Read() for package ODF
+ pDoc->SetInReading(true);
+ pDoc->SetInXMLImport(true);
+ }
+
if( (getImportFlags() & SvXMLImportFlags::CONTENT) && !IsStylesOnlyMode() )
{
pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() );
@@ -876,6 +883,11 @@ void SwXMLImport::endDocument()
pDoc->PrtOLENotify( false );
else if ( pDoc->IsOLEPrtNotifyPending() )
pDoc->PrtOLENotify( true );
+
+ assert(pDoc->IsInReading());
+ assert(pDoc->IsInXMLImport());
+ pDoc->SetInReading(false);
+ pDoc->SetInXMLImport(false);
}
SwDrawModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();