sw/source/uibase/dialog/watermarkdialog.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 903070a573b87714458c3cb3d18635f5eda6aa15 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Apr 14 15:51:07 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Apr 15 11:27:10 2020 +0200 explicitly set the correct index if the font is in the list Change-Id: I212a97007b5e69e6a2a6e10c76afe50c45ec283e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92229 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx index 26589813ec18..d558d0c6de8f 100644 --- a/sw/source/uibase/dialog/watermarkdialog.cxx +++ b/sw/source/uibase/dialog/watermarkdialog.cxx @@ -74,7 +74,12 @@ void SwWatermarkDialog::InitFields() const SfxWatermarkItem* pWatermark = static_cast<const SfxWatermarkItem*>( pItem ); const OUString& sText = pWatermark->GetText(); m_xTextInput->set_text(sText); - m_xFont->set_entry_text(pWatermark->GetFont()); + OUString sFontName = pWatermark->GetFont(); + int nFontIndex = m_xFont->find_text(sFontName); + if (nFontIndex != -1) + m_xFont->set_active(nFontIndex); + else + m_xFont->set_entry_text(sFontName); m_xAngle->set_value(pWatermark->GetAngle(), FieldUnit::DEGREE); m_xColor->SelectEntry( pWatermark->GetColor() ); m_xTransparency->set_value(pWatermark->GetTransparency(), FieldUnit::PERCENT); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits