[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 11 09:56:25 PDT 2014
writerfilter/source/dmapper/TblStylePrHandler.cxx | 9 ++-------
writerfilter/source/dmapper/TblStylePrHandler.hxx | 3 ++-
2 files changed, 4 insertions(+), 8 deletions(-)
New commits:
commit daf354fa7f2cf800a0661813ddf8d7c49c5c5f59
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jul 11 18:54:00 2014 +0200
Use comphelper::SequenceAsVector
Change-Id: I0d1e22344a2aa1474d022364b12cd34d7d56c2d8
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index ffd8dd6..24fee7d 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -103,7 +103,7 @@ void TblStylePrHandler::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_TrPrBase:
case NS_ooxml::LN_CT_TcPrBase:
{
- std::vector<beans::PropertyValue> aSavedGrabBag;
+ comphelper::SequenceAsVector<beans::PropertyValue> aSavedGrabBag;
bool bGrabBag = rSprm.getId() == NS_ooxml::LN_CT_PPrBase ||
rSprm.getId() == NS_ooxml::LN_EG_RPrBase ||
rSprm.getId() == NS_ooxml::LN_CT_TblPrBase ||
@@ -173,12 +173,7 @@ beans::PropertyValue TblStylePrHandler::getInteropGrabBag(const OUString& aName)
beans::PropertyValue aRet;
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/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx
index cb13b26..3191efa 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.hxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx
@@ -25,6 +25,7 @@
#include <dmapper/DomainMapper.hxx>
#include <resourcemodel/LoggedResources.hxx>
#include <boost/shared_ptr.hpp>
+#include <comphelper/sequenceasvector.hxx>
namespace writerfilter {
namespace dmapper {
@@ -57,7 +58,7 @@ private:
TblStyleType m_nType;
PropertyMapPtr m_pProperties;
- 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