[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Dec 2 23:59:49 PST 2015
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 13 ++++---------
writerfilter/source/ooxml/OOXMLDocumentImpl.hxx | 1 -
2 files changed, 4 insertions(+), 10 deletions(-)
New commits:
commit ad90e22f1970d019e1f2a1e8ba8020c0f0cb36c4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Dec 3 08:58:11 2015 +0100
Use comphelper::containerToSequence()
Change-Id: I774864241bc15fcfd08cd2becbf34aae0349a9d8
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 12ad491..74b8f83 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 06ac1662..c0c8d33 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?
More information about the Libreoffice-commits
mailing list