[Libreoffice-commits] core.git: cui/source

Caolán McNamara caolanm at redhat.com
Tue Jun 26 20:43:53 UTC 2018


 cui/source/dialogs/cuicharmap.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a2937b4af3b1d148fbead50f06e7a196bf5850cb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 26 16:11:53 2018 +0100

    tdf#118309 freeze/thaw adding large amounts to ComboBoxText
    
    Change-Id: I3072630c769224be730e6ec16b1a02fa4f1b10e6
    Reviewed-on: https://gerrit.libreoffice.org/56485
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index e5b68de80117..6e9299545e34 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -435,7 +435,8 @@ void SvxCharacterMap::init()
     OUString aDefStr( aFont.GetFamilyName() );
     OUString aLastName;
     int nCount = m_xVirDev->GetDevFontCount();
-    for ( int i = 0; i < nCount; i++ )
+    m_xFontLB->freeze();
+    for (int i = 0; i < nCount; ++i)
     {
         OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
         if (aFontName != aLastName)
@@ -444,6 +445,7 @@ void SvxCharacterMap::init()
             m_xFontLB->append(OUString::number(i), aFontName);
         }
     }
+    m_xFontLB->thaw();
     // the font may not be in the list =>
     // try to find a font name token in list and select found font,
     // else select topmost entry
@@ -599,8 +601,10 @@ void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox)
 {
     SubsetMap aAll(nullptr);
     rListBox.clear();
+    rListBox.freeze();
     for (auto & subset : aAll.GetSubsetMap())
         rListBox.append_text(subset.GetName());
+    rListBox.thaw();
 }
 
 


More information about the Libreoffice-commits mailing list