summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-11 11:13:49 +0000
committerXisco Faulí <xiscofauli@libreoffice.org>2019-02-11 17:40:28 +0100
commit66f633086e2cf0c814df04627bff810d08e73329 (patch)
tree35b14f0420316528fc4ac27f36b391861ac17dc0
parent04a6277f40727bf814c67a75e55ce3a6dcbc6bec (diff)
Resolves: tdf#123320 non-existing drop caps char style
Change-Id: I416e3fcffe7da549ffd3b82cb912d78d1ca02339 Reviewed-on: https://gerrit.libreoffice.org/67683 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index d60a0c23e913..da1602750a79 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -550,9 +550,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);