summaryrefslogtreecommitdiff
path: root/sw/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 /sw/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 'sw/source')
-rw-r--r--sw/source/core/edit/edfcol.cxx5
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
2 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 5333764798e5..ff29c1f10c83 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1789,14 +1789,13 @@ void SwEditShell::SignParagraph()
const OUString signature = OStringToOUString(sigBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8, 0);
- std::vector<css::beans::PropertyValue> vec = comphelper::sequenceToContainer<std::vector<css::beans::PropertyValue>>(aProperties);
- auto it = std::find_if(vec.begin(), vec.end(), [](const beans::PropertyValue& rValue)
+ auto it = std::find_if(std::as_const(aProperties).begin(), std::as_const(aProperties).end(), [](const beans::PropertyValue& rValue)
{
return rValue.Name == "Usage";
});
OUString aUsage;
- if (it != vec.end())
+ if (it != std::as_const(aProperties).end())
it->Value >>= aUsage;
// 4. Add metadata
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 355770e4e1c1..5e323ee6b937 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1286,12 +1286,12 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0");
auto aSeqSeq = it->second.get<drawing::PointSequenceSequence>();
- auto aPoints(comphelper::sequenceToContainer<std::vector<awt::Point>>(aSeqSeq[0]));
- for (auto i = aPoints.begin(); i != aPoints.end(); ++i)
+ const auto& rPoints = aSeqSeq[0];
+ for (auto i = rPoints.begin(); i != rPoints.end(); ++i)
{
- awt::Point& rPoint = *i;
+ const awt::Point& rPoint = *i;
m_pImpl->getSerializer()->singleElementNS(
- XML_wp, (i == aPoints.begin() ? XML_start : XML_lineTo), XML_x,
+ XML_wp, (i == rPoints.begin() ? XML_start : XML_lineTo), XML_x,
OString::number(rPoint.X), XML_y, OString::number(rPoint.Y));
}
m_pImpl->getSerializer()->endElementNS(XML_wp, XML_wrapPolygon);