diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-03 08:58:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-03 08:59:23 +0100 |
commit | ad90e22f1970d019e1f2a1e8ba8020c0f0cb36c4 (patch) | |
tree | 470bda92748b2edf92107856d1cbe6dfd689fcb5 | |
parent | 73ed1178034fb391882d348f99699579cdff643a (diff) |
Use comphelper::containerToSequence()
Change-Id: I774864241bc15fcfd08cd2becbf34aae0349a9d8
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 13 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.hxx | 1 |
2 files changed, 4 insertions, 10 deletions
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 12ad4915b249..74b8f838766a 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -707,6 +707,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream) { uno::Reference<embed::XRelationshipAccess> xRelationshipAccess; xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); + std::vector<css::beans::PropertyValue> aEmbeddings; if (xRelationshipAccess.is()) { OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"); @@ -772,7 +773,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream) { embeddingsTemp.Name = embeddingsTarget; embeddingsTemp.Value = uno::makeAny(mxEmbeddings); - mxEmbeddingsListTemp.push_back(embeddingsTemp); + aEmbeddings.push_back(embeddingsTemp); mxEmbeddings.clear(); } } @@ -781,14 +782,8 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream) } } } - if(0 != mxEmbeddingsListTemp.size()) - { - mxEmbeddingsList.realloc(mxEmbeddingsListTemp.size()); - for (size_t i = 0; i < mxEmbeddingsListTemp.size(); i++) - { - mxEmbeddingsList[i] = mxEmbeddingsListTemp[i]; - } - } + if (!aEmbeddings.empty()) + mxEmbeddingsList = comphelper::containerToSequence(aEmbeddings); } void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream) diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index 06ac16622ef5..c0c8d335edb4 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -53,7 +53,6 @@ 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> mxEmbeddingsListTemp; bool mbIsSubstream; bool mbSkipImages; /// How many paragraphs equal to 1 percent? |