summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-12-06 12:25:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-10 08:16:31 +0100
commitbd0764d4d24f3a9f5fd279db888d12b55bd6b241 (patch)
treec6a53bc871d7ff54c5ac4bc244715f4ceab2177b /basic
parent327ffd94ef79d29233aac38d8965bc6e8557e8f4 (diff)
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.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit ffd319a7589e0e9fcb83681f7f1e7c26a383ae5d) Reviewed-on: https://gerrit.libreoffice.org/84666 Tested-by: Jenkins (cherry picked from commit 87b421d25ef79e197d344e6bd515f1eadd06bfc9) Reviewed-on: https://gerrit.libreoffice.org/84743 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxbase.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 22dbb951c145..ae653c651ce6 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -115,9 +115,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 )