diff options
Diffstat (limited to 'sw/source/ui/misc/insfnote.cxx')
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index f468ae51c662..49a9e7070640 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -101,29 +101,36 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, weld::Button&, void) aAllSet.Put( rFont ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_xDialog.get(), aAllSet, nullptr)); - if (RET_OK != pDlg->Execute()) - return; - - const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false); - const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); - if ( !pItem ) - return; - - m_xNumberCharEdit->set_text(pItem->GetValue()); - - if ( pFontItem ) - { - m_aFontName = pFontItem->GetFamilyName(); - m_eCharSet = pFontItem->GetCharSet(); - vcl::Font aFont(m_aFontName, pFontItem->GetStyleName(), m_xNumberCharEdit->get_font().GetFontSize()); - aFont.SetCharSet( pFontItem->GetCharSet() ); - aFont.SetPitch( pFontItem->GetPitch() ); - m_xNumberCharEdit->set_font(aFont); - } + VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_xDialog.get(), aAllSet, nullptr)); + pDlg->StartExecuteAsync( + [this, pDlg] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + { + const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false); + const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); + if ( pItem ) + { + m_xNumberCharEdit->set_text(pItem->GetValue()); + + if ( pFontItem ) + { + m_aFontName = pFontItem->GetFamilyName(); + m_eCharSet = pFontItem->GetCharSet(); + vcl::Font aFont(m_aFontName, pFontItem->GetStyleName(), m_xNumberCharEdit->get_font().GetFontSize()); + aFont.SetCharSet( pFontItem->GetCharSet() ); + aFont.SetPitch( pFontItem->GetPitch() ); + m_xNumberCharEdit->set_font(aFont); + } + + m_bExtCharAvailable = true; + m_xOkBtn->set_sensitive(!m_xNumberCharEdit->get_text().isEmpty()); + } + } + pDlg->disposeOnce(); + } + ); - m_bExtCharAvailable = true; - m_xOkBtn->set_sensitive(!m_xNumberCharEdit->get_text().isEmpty()); } IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, weld::Button&, rBtn, void ) |