[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - basic/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 10 07:17:09 UTC 2019


 basic/source/sbx/sbxbase.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit bd0764d4d24f3a9f5fd279db888d12b55bd6b241
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Dec 6 12:25:15 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Dec 10 08:16:31 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
    (cherry picked from commit 87b421d25ef79e197d344e6bd515f1eadd06bfc9)
    Reviewed-on: https://gerrit.libreoffice.org/84743
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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 )


More information about the Libreoffice-commits mailing list