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

Miklos Vajna vmiklos at collabora.co.uk
Fri Aug 22 07:39:20 PDT 2014


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

New commits:
commit 9767f9becc689be6405dbbfc6cd9921d8cbac4d3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Aug 22 16:32:46 2014 +0200

    Use comphelper::SequenceAsVector
    
    Change-Id: I115b17da8cc246bf1b2502ed53ef00edad70a21d

diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index 7e03c3d..68418b8 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -135,7 +135,7 @@ void BorderHandler::lcl_sprm(Sprm & rSprm)
         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
         if( pProperties.get())
         {
-            std::vector<beans::PropertyValue> aSavedGrabBag;
+            comphelper::SequenceAsVector<beans::PropertyValue> aSavedGrabBag;
             if (!m_aInteropGrabBagName.isEmpty())
             {
                 aSavedGrabBag = m_aInteropGrabBag;
@@ -202,12 +202,7 @@ beans::PropertyValue BorderHandler::getInteropGrabBag(const OUString& aName)
     else
         aRet.Name = aName;
 
-    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/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx
index 0368a93..4f2ce9c 100644
--- a/writerfilter/source/dmapper/BorderHandler.hxx
+++ b/writerfilter/source/dmapper/BorderHandler.hxx
@@ -24,6 +24,7 @@
 #include <boost/shared_ptr.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <comphelper/sequenceasvector.hxx>
 
 namespace writerfilter {
 namespace dmapper
@@ -57,7 +58,7 @@ private:
     bool                                        m_aFilledLines[BORDER_COUNT];
     ::com::sun::star::table::BorderLine2        m_aBorderLines[BORDER_COUNT];
     OUString m_aInteropGrabBagName;
-    std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
+    comphelper::SequenceAsVector<css::beans::PropertyValue> m_aInteropGrabBag;
     void appendGrabBag(const OUString& aKey, const OUString& aValue);
 
     // Properties


More information about the Libreoffice-commits mailing list