[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - basic/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 9 09:47:35 UTC 2019
basic/source/sbx/sbxbase.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 87b421d25ef79e197d344e6bd515f1eadd06bfc9
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Dec 6 12:25:15 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Dec 9 10:46:53 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.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit ffd319a7589e0e9fcb83681f7f1e7c26a383ae5d)
Reviewed-on: https://gerrit.libreoffice.org/84666
Tested-by: Jenkins
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 )
More information about the Libreoffice-commits
mailing list