writerfilter/source/dmapper/GraphicImport.cxx |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

New commits:
commit cfbae3c1807cc61394c9206ba5c77f401126dd79
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Mon Sep 22 09:57:18 2014 +0200

    Use comphelper::SequenceAsVector
    
    Change-Id: Id163680534a5f4786531954b855f30dc10b9717d

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index e3178c2..624fc84 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -473,14 +473,9 @@ void GraphicImport::putPropertyToFrameGrabBag( const 
OUString& sPropertyName, co
 
     if (xSetInfo->hasPropertyByName(aGrabBagPropName))
     {
-        uno::Sequence< beans::PropertyValue > aGrabBag;
-        xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
-
-        sal_Int32 nLength = aGrabBag.getLength();
-        aGrabBag.realloc(nLength + 1);
-        aGrabBag[nLength] = pProperty;
-
-        xSet->setPropertyValue(aGrabBagPropName, uno::makeAny(aGrabBag));
+        comphelper::SequenceAsVector<beans::PropertyValue> 
aGrabBag(xSet->getPropertyValue(aGrabBagPropName));
+        aGrabBag.push_back(pProperty);
+        xSet->setPropertyValue(aGrabBagPropName, 
uno::makeAny(aGrabBag.getAsConstList()));
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to