diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 22:33:50 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-19 09:48:48 +0100 |
commit | 0d84174d8c205a58fa1a64d44ae5629c40a9cf85 (patch) | |
tree | 91ccffe50e7468920b097b30adb12b40168b2183 /sd/source/ui | |
parent | 7618c791a39e74b0f8291ff28f65df78cfa20301 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 9)
Change-Id: I61e53faf68e7e0fab2052122993197c7994441ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159640
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/framework/configuration/ResourceFactoryManager.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 10 |
2 files changed, 7 insertions, 12 deletions
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx index 122d5619893f..fd07caeda493 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx @@ -134,12 +134,9 @@ void ResourceFactoryManager::RemoveFactoryForReference( // Remove the pattern entries whose factories are identical to the given // factory. - maFactoryPatternList.erase( - std::remove_if( - maFactoryPatternList.begin(), - maFactoryPatternList.end(), - [&] (FactoryPatternList::value_type const& it) { return it.second == rxFactory; }), - maFactoryPatternList.end()); + std::erase_if( + maFactoryPatternList, + [&] (FactoryPatternList::value_type const& it) { return it.second == rxFactory; }); } Reference<XResourceFactory> ResourceFactoryManager::GetFactory ( diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 2f68a6f8d9d2..d424f0117c27 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -760,9 +760,8 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner, void ) // list of selected title paragraphs mpOutlinerViews[0]->CreateSelectionList(maSelectedParas); - maSelectedParas.erase(std::remove_if(maSelectedParas.begin(), maSelectedParas.end(), - [](const Paragraph* pPara) { return !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE); }), - maSelectedParas.end()); + std::erase_if(maSelectedParas, + [](const Paragraph* pPara) { return !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE); }); // select the pages belonging to the paragraphs on level 0 to select sal_uInt16 nPos = 0; @@ -1229,9 +1228,8 @@ void OutlineView::SetSelectedPages() std::vector<Paragraph*> aSelParas; mpOutlinerViews[0]->CreateSelectionList(aSelParas); - aSelParas.erase(std::remove_if(aSelParas.begin(), aSelParas.end(), - [](const Paragraph* pPara) { return !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE); }), - aSelParas.end()); + std::erase_if(aSelParas, + [](const Paragraph* pPara) { return !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE); }); // select the pages belonging to the paragraphs on level 0 to select sal_uInt16 nPos = 0; |