[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Nov 16 00:27:33 PST 2015
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 57b4c4bcb0cb3c48190670b4c46ab9e92a489729
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Nov 16 09:26:34 2015 +0100
Use comphelper::containerToSequence
Change-Id: I76d25ef32a154d92f7ea9b9d0aa3af09908873d2
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index ff8ce4e..76942d7 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -37,6 +37,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <svx/dialogs.hrc>
+#include <comphelper/sequence.hxx>
#include <iostream>
@@ -554,7 +555,7 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
bool bFound = false;
sal_Int32 counter = 0;
uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
- uno::Sequence<uno::Reference<xml::dom::XDocument> > xCustomXmlDomListTemp(aSeqs.getLength());
+ std::vector< uno::Reference<xml::dom::XDocument> > aCustomXmlDomList;
uno::Sequence<uno::Reference<xml::dom::XDocument> > xCustomXmlDomPropsListTemp(aSeqs.getLength());
for (sal_Int32 j = 0; j < aSeqs.getLength(); j++)
{
@@ -581,7 +582,7 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
// grabbag list.
if(mxCustomXmlProsDom.is() && customXmlTemp.is())
{
- xCustomXmlDomListTemp[counter] = customXmlTemp;
+ aCustomXmlDomList.push_back(customXmlTemp);
xCustomXmlDomPropsListTemp[counter] = mxCustomXmlProsDom;
counter++;
resolveFastSubStream(rStream, OOXMLStream::CUSTOMXML);
@@ -590,9 +591,8 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
}
}
- xCustomXmlDomListTemp.realloc(counter);
xCustomXmlDomPropsListTemp.realloc(counter);
- mxCustomXmlDomList = xCustomXmlDomListTemp;
+ mxCustomXmlDomList = comphelper::containerToSequence(aCustomXmlDomList);
mxCustomXmlDomPropsList = xCustomXmlDomPropsListTemp;
}
}
More information about the Libreoffice-commits
mailing list