diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-25 10:44:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-27 09:56:49 +0200 |
commit | f5176ad2defbd6d77533976abb0045368c541e99 (patch) | |
tree | 8c354782db0bdf5eea0ec685e0bf770ccf42df26 /sw/source/ui/dbui/mmgreetingspage.cxx | |
parent | 0bbefaebc45a18dfe460de1b3e7bce61fd2bc9c7 (diff) |
weld SwCustomizeAddressBlockDialog
a) use EditEngine instead of TextEngine as the former can be hosted in a
foreign widget
b) use a SfxGrabBagItem to hold the custom pseudo-field info inside the
EditEngine
c) use a proxy XDropTargetListener/XDropTarget to massage the treelist entry
drag source into the textengine drop target destination
Change-Id: I6bf1613ed91341c24b77564405f38b5dab0aacd7
Reviewed-on: https://gerrit.libreoffice.org/74699
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/dbui/mmgreetingspage.cxx')
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index b017e509893a..2280df3b3711 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -82,15 +82,14 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl, weld::ToggleButton&, voi IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, weld::Button&, rButton, void) { - ScopedVclPtr<SwCustomizeAddressBlockDialog> pDlg( - VclPtr<SwCustomizeAddressBlockDialog>::Create(nullptr /*TODO*/, m_rConfigItem, + std::unique_ptr<SwCustomizeAddressBlockDialog> xDlg(new SwCustomizeAddressBlockDialog(&rButton, m_rConfigItem, &rButton == m_xMalePB.get() ? SwCustomizeAddressBlockDialog::GREETING_MALE : SwCustomizeAddressBlockDialog::GREETING_FEMALE )); - if (RET_OK == pDlg->Execute()) + if (RET_OK == xDlg->run()) { weld::ComboBox* pToInsert = &rButton == m_xMalePB.get() ? m_xMaleLB.get() : m_xFemaleLB.get(); - pToInsert->append_text(pDlg->GetAddress()); + pToInsert->append_text(xDlg->GetAddress()); pToInsert->set_active(pToInsert->get_count() - 1); if(m_bIsTabPage) { |