Kaydet (Commit) a2937b4a authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#118309 freeze/thaw adding large amounts to ComboBoxText

Change-Id: I3072630c769224be730e6ec16b1a02fa4f1b10e6
Reviewed-on: https://gerrit.libreoffice.org/56485Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2c0a33f5
...@@ -435,7 +435,8 @@ void SvxCharacterMap::init() ...@@ -435,7 +435,8 @@ void SvxCharacterMap::init()
OUString aDefStr( aFont.GetFamilyName() ); OUString aDefStr( aFont.GetFamilyName() );
OUString aLastName; OUString aLastName;
int nCount = m_xVirDev->GetDevFontCount(); 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() ); OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
if (aFontName != aLastName) if (aFontName != aLastName)
...@@ -444,6 +445,7 @@ void SvxCharacterMap::init() ...@@ -444,6 +445,7 @@ void SvxCharacterMap::init()
m_xFontLB->append(OUString::number(i), aFontName); m_xFontLB->append(OUString::number(i), aFontName);
} }
} }
m_xFontLB->thaw();
// the font may not be in the list => // the font may not be in the list =>
// try to find a font name token in list and select found font, // try to find a font name token in list and select found font,
// else select topmost entry // else select topmost entry
...@@ -599,8 +601,10 @@ void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox) ...@@ -599,8 +601,10 @@ void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox)
{ {
SubsetMap aAll(nullptr); SubsetMap aAll(nullptr);
rListBox.clear(); rListBox.clear();
rListBox.freeze();
for (auto & subset : aAll.GetSubsetMap()) for (auto & subset : aAll.GetSubsetMap())
rListBox.append_text(subset.GetName()); rListBox.append_text(subset.GetName());
rListBox.thaw();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment