[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - cui/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 19 18:29:23 UTC 2020


 cui/source/customize/cfg.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 595fcef52915f0ac54ea704b0f9dee85b43efa56
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 15 10:52:48 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue May 19 20:28:52 2020 +0200

    tdf#133036 notebookbar customize uses a special combobox id
    
    in all other cases the m_xSaveInListBox id contains a SaveInData pointer
    
    but not the notebookbar case for some reason, we're already checking
    for this special id in one case, extend to check in the other too
    
    Change-Id: I460afa165ee2f6baa6deb1a15b0257df274a4c94
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94269
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 7b5e51b9d521..f317811968f9 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1303,17 +1303,21 @@ bool SvxConfigPage::FillItemSet( SfxItemSet* )
 
     for (int i = 0, nCount = m_xSaveInListBox->get_count(); i < nCount; ++i)
     {
-        SaveInData* pData =
-            reinterpret_cast<SaveInData*>(m_xSaveInListBox->get_id(i).toInt64());
-        if(m_xSaveInListBox->get_id(i) != notebookbarTabScope)
+        OUString sId = m_xSaveInListBox->get_id(i);
+        if (sId != notebookbarTabScope)
+        {
+            SaveInData* pData = reinterpret_cast<SaveInData*>(sId.toInt64());
             result = pData->Apply();
+        }
     }
     return result;
 }
 
 IMPL_LINK_NOARG(SvxConfigPage, SelectSaveInLocation, weld::ComboBox&, void)
 {
-    pCurrentSaveInData = reinterpret_cast<SaveInData*>(m_xSaveInListBox->get_active_id().toInt64());
+    OUString sId = m_xSaveInListBox->get_active_id();
+    if (sId != notebookbarTabScope)
+        pCurrentSaveInData = reinterpret_cast<SaveInData*>(sId.toInt64());
     Init();
 }
 


More information about the Libreoffice-commits mailing list