diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2017-06-03 12:31:32 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-07-21 11:51:33 +0200 |
commit | 4a169551433a0897ca9b1baccbfce134059aef05 (patch) | |
tree | dd8bae6b7b2e78fba774b77760fd164f223ded12 | |
parent | 6622ea7365fbf1b425e5f90667dd7e6466fd0293 (diff) |
tdf#73873 Fix missing embeddings in word/embeddings directory
In commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ad90e22f1970d019e1f2a1e8ba8020c0f0cb36c4
the refactor was made. Unorfunately due to mistake
the embedding was always resetting.
As a result only one embedding document was added,
and the OOXML files were pernamentely corrupted.
This simple fix is resolving mentioned issue.
Change-Id: Ie268b1bf8906ac7b8e061526a9186b3b4b46bef6
Reviewed-on: https://gerrit.libreoffice.org/38369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Reviewed-on: https://gerrit.libreoffice.org/40127
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.hxx | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index abb7c522e586..c104d6d43438 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -721,7 +721,6 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS { uno::Reference<embed::XRelationshipAccess> xRelationshipAccess; xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY); - std::vector<css::beans::PropertyValue> aEmbeddings; if (xRelationshipAccess.is()) { OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"); @@ -796,7 +795,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS { embeddingsTemp.Name = embeddingsTarget; embeddingsTemp.Value <<= mxEmbeddings; - aEmbeddings.push_back(embeddingsTemp); + maEmbedding.push_back(embeddingsTemp); mxEmbeddings.clear(); } } @@ -805,8 +804,8 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS } } } - if (!aEmbeddings.empty()) - mxEmbeddingsList = comphelper::containerToSequence(aEmbeddings); + if (!maEmbedding.empty()) + mxEmbeddingsList = comphelper::containerToSequence(maEmbedding); } void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream) diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index 17fde7c89079..b32882aa3ca5 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -55,6 +55,7 @@ class OOXMLDocumentImpl : public OOXMLDocument css::uno::Reference<css::io::XInputStream> mxActiveXBin; css::uno::Reference<css::io::XInputStream> mxEmbeddings; css::uno::Sequence < css::beans::PropertyValue > mxEmbeddingsList; + std::vector<css::beans::PropertyValue> maEmbedding; bool mbIsSubstream; bool mbSkipImages; /// How many paragraphs equal to 1 percent? |