[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Nov 4 00:58:50 PST 2014


 writerfilter/source/dmapper/CellColorHandler.cxx |    8 +-------
 writerfilter/source/dmapper/CellColorHandler.hxx |    3 ++-
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 768d22a83e7e6aae430b2e5e4ed28f2574aad12d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Nov 4 09:50:31 2014 +0100

    Use comphelper::SequenceAsVector
    
    Change-Id: Iaf5fb72b065cc0d2a412b027d41d7618654d30b1

diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx
index 9434b2e..4b6657c 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -298,13 +298,7 @@ beans::PropertyValue CellColorHandler::getInteropGrabBag()
 {
     beans::PropertyValue aRet;
     aRet.Name = m_aInteropGrabBagName;
-
-    uno::Sequence<beans::PropertyValue> aSeq(m_aInteropGrabBag.size());
-    beans::PropertyValue* pSeq = aSeq.getArray();
-    for (std::vector<beans::PropertyValue>::iterator i = m_aInteropGrabBag.begin(); i != m_aInteropGrabBag.end(); ++i)
-        *pSeq++ = *i;
-
-    aRet.Value = uno::makeAny(aSeq);
+    aRet.Value = uno::makeAny(m_aInteropGrabBag.getAsConstList());
     return aRet;
 }
 
diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx
index d909d85..041272d 100644
--- a/writerfilter/source/dmapper/CellColorHandler.hxx
+++ b/writerfilter/source/dmapper/CellColorHandler.hxx
@@ -24,6 +24,7 @@
 #include <vector>
 
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <comphelper/sequenceasvector.hxx>
 
 namespace writerfilter {
 namespace dmapper
@@ -40,7 +41,7 @@ private:
     OutputFormat m_OutputFormat;
 
     OUString m_aInteropGrabBagName;
-    std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
+    comphelper::SequenceAsVector<css::beans::PropertyValue> m_aInteropGrabBag;
 
     // Properties
     virtual void lcl_attribute(Id Name, Value & val) SAL_OVERRIDE;


More information about the Libreoffice-commits mailing list