diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-09-03 18:03:46 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-09-06 17:35:43 +0200 |
commit | c1c8adca05b561afbbf3346b73225d80f2b82ee4 (patch) | |
tree | f4aa70475686eac2d40325e1177f849609d6446a | |
parent | 743e22ec8b5e5f22696a69a2c305f7a8173a77aa (diff) |
temporarily set a substream as the document stream
If this is not done, then mpStream still refers to the main stream,
and so e.g. resolving references uses the main document instead
of the substream (specifically, in a followup commit, w:embedRegular
will use _rels/document.xml.rels instead of _rels/fontTable.xml.rels).
Change-Id: Ibf250b82f38be0b24a6c2b6198b6c96ab7f0423c
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index fa77978e19de..29c64ade8028 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -56,6 +56,8 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler, { OOXMLStream::Pointer_t pStream (OOXMLDocumentFactory::createStream(mpStream, nType)); + OOXMLStream::Pointer_t savedStream = mpStream; + mpStream = pStream; uno::Reference< xml::sax::XFastParser > xParser (mpStream->getFastParser()); @@ -89,6 +91,8 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler, xInputStream->closeInput(); } } + + mpStream = savedStream; } void OOXMLDocumentImpl::resolveFastSubStreamWithId(Stream & rStream, |