[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 29 12:32:31 UTC 2019
cui/source/tabpages/chardlg.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 184e614038893d94f45dbcd6334ee8d682c2d7f3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 28 17:21:32 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 29 13:32:10 2019 +0100
Resolves: tdf#122992 allow pre-selected fonts not in the font list
Change-Id: I75c1b6d3933a5773d9e1dce40744c2342ab63ee8
Reviewed-on: https://gerrit.libreoffice.org/67025
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index c1a46b88663a..a12cc64ba4f6 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -673,7 +673,12 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
if ( eState >= SfxItemState::DEFAULT )
{
pFontItem = static_cast<const SvxFontItem*>(&( rSet.Get( nWhich ) ));
- pNameBox->set_active_text( pFontItem->GetFamilyName() );
+ const OUString &rName = pFontItem->GetFamilyName();
+ int nIndex = pNameBox->find_text(rName);
+ pNameBox->set_active(nIndex);
+ // tdf#122992 if it didn't exist in the list, set the entry text to it anyway
+ if (nIndex == -1)
+ pNameBox->set_entry_text(rName);
}
else
{
More information about the Libreoffice-commits
mailing list