summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-06 19:57:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-06 21:52:00 +0200
commit18715f6a63af55045b108b98abeffeae8e51518b (patch)
tree7cfcc6fc8a27c6f0c023d74fac5e43b88ac70907 /writerfilter/source
parentb83a8483a1426ba400480d33f7df321fcc02e64d (diff)
remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I65677007d105f4783603df74113ebed6db0b551b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 9537c5a65786..9f3ac5f2c096 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2173,8 +2173,8 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
{
uno::Sequence<beans::PropertyValue> aPrevPropertiesSeq;
m_xPreviousParagraph->getPropertyValue("ParaInteropGrabBag") >>= aPrevPropertiesSeq;
- auto aPrevProperties = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(aPrevPropertiesSeq);
- bool bParaAutoBefore = m_bParaAutoBefore || std::any_of(aPrevProperties.begin(), aPrevProperties.end(), [](const beans::PropertyValue& rValue)
+ const auto & rPrevProperties = aPrevPropertiesSeq;
+ bool bParaAutoBefore = m_bParaAutoBefore || std::any_of(rPrevProperties.begin(), rPrevProperties.end(), [](const beans::PropertyValue& rValue)
{
return rValue.Name == "ParaTopMarginBeforeAutoSpacing";
});
@@ -2202,7 +2202,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
aProperties.push_back(comphelper::makePropertyValue("ParaTopMargin", static_cast<sal_Int32>(0)));
}
- bool bPrevParaAutoAfter = std::any_of(aPrevProperties.begin(), aPrevProperties.end(), [](const beans::PropertyValue& rValue)
+ bool bPrevParaAutoAfter = std::any_of(rPrevProperties.begin(), rPrevProperties.end(), [](const beans::PropertyValue& rValue)
{
return rValue.Name == "ParaBottomMarginAfterAutoSpacing";
});