From cac7541e1b2a1bbd0fca08853fd8323bb0078247 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 Feb 2019 11:13:49 +0000 Subject: Resolves: tdf#123320 non-existing drop caps char style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I416e3fcffe7da549ffd3b82cb912d78d1ca02339 Reviewed-on: https://gerrit.libreoffice.org/67682 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/chrdlg/drpcps.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 04d88c166db6..da6500ddd642 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -554,9 +554,14 @@ void SwDropCapsPage::Reset(const SfxItemSet *rSet) m_xTemplateBox->insert_text(0, SwResId(SW_STR_NONE)); // Reset format - m_xTemplateBox->set_active(0); + int nSelect = 0; if (aFormatDrop.GetCharFormat()) - m_xTemplateBox->set_active_text(aFormatDrop.GetCharFormat()->GetName()); + { + int nPos = m_xTemplateBox->find_text(aFormatDrop.GetCharFormat()->GetName()); + if (nPos != -1) + nSelect = nPos; + } + m_xTemplateBox->set_active(nSelect); // Enable controls m_xDropCapsBox->set_active(aFormatDrop.GetLines() > 1); -- cgit