[Libreoffice-commits] core.git: Branch 'libreoffice-5-4-0' - writerfilter/source

Bartosz Kosiorek gang65 at poczta.onet.pl
Fri Jul 21 10:04:21 UTC 2017


 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |    7 +++----
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx |    1 +
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d266660d5aad44118187feee51d4b0f38e4586f3
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date:   Sat Jun 3 12:31:32 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
    Reviewed-on: https://gerrit.libreoffice.org/39787
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

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?


More information about the Libreoffice-commits mailing list