summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2017-06-03 12:31:32 +0200
committerMichael Meeks <michael.meeks@collabora.com>2017-07-21 12:03:45 +0200
commitd266660d5aad44118187feee51d4b0f38e4586f3 (patch)
treef88940a9710da005454a85d2fe88e5b8f5e87389
parent53cb76a7f66c594f210f539ec3a80c45a2ca4fd7 (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/39787 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx7
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.hxx1
2 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 089c0e2a8f26..8a2feecc0e33 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -720,7 +720,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");
@@ -795,7 +794,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();
}
}
@@ -804,8 +803,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 43bdeb651d78..32ed9f04d218 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
@@ -53,6 +53,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?