basic/source/sbx/sbxbase.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit ffd319a7589e0e9fcb83681f7f1e7c26a383ae5d Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Dec 6 12:25:15 2019 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Dec 6 13:00:37 2019 +0100 tdf#129227: this was always appending, not prepending Regression after 0761f97525b3f3ce2cd73f8db28bf389a3c44f57 The change replaced // From 1996-03-06: take the HandleLast-Flag into account sal_uInt16 nPos = r.m_Factories.size(); // Insert position if( !pFac->IsHandleLast() ) // Only if not self HandleLast { // Rank new factory in front of factories with HandleLast while (nPos > 0 && r.m_Factories[ nPos-1 ]->IsHandleLast()) nPos--; } r.m_Factories.insert(r.m_Factories.begin() + nPos, std::unique_ptr<SbxFactory>(pFac)); with r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac)); Before that commit condition in while was always false, so decrementing nPos had never happened, and insertion to the end was always performed. This change restores that. Change-Id: I778d6fdc93e9078a541a9b98c9432b5cf88d9791 Reviewed-on: https://gerrit.libreoffice.org/84609 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 7f147e81e27f..d1b17d4fa288 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -114,9 +114,7 @@ void SbxBase::ResetError() void SbxBase::AddFactory( SbxFactory* pFac ) { - SbxAppData& r = GetSbxData_Impl(); - - r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac)); + GetSbxData_Impl().m_Factories.emplace_back(pFac); } void SbxBase::RemoveFactory( SbxFactory const * pFac ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits