summaryrefslogtreecommitdiff
path: root/cui/source/factory/dlgfact.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-14 21:56:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-21 21:33:30 +0200
commit5261417cbb3051b812164838d19c0f748573df45 (patch)
treed159cce1d6903854fc13437c5cca5ce15e48281f /cui/source/factory/dlgfact.cxx
parentfda464112540011dd6e2bd267720d2800af3a5f2 (diff)
weld SpellDialog
a) use EditEngine instead of TextEngine as the former can be hosted in a foreign widget b) use a SfxGrabBagItem to hold the custom spellchecking info inside the EditEngine c) in longer paragraphs the current word is now auto-scrolled into view d) rename Invalidate to InvalidateDialog Change-Id: Ic6db019c32cdfd5f354c58ee7394fdaa040b86e1 Reviewed-on: https://gerrit.libreoffice.org/74119 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/factory/dlgfact.cxx')
-rw-r--r--cui/source/factory/dlgfact.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index af99be370a81..4ad9e49084fe 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -271,7 +271,15 @@ short AbstractLinksDialog_Impl::Execute()
return m_xDlg->run();
}
-IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl);
+short AbstractSpellDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
+bool AbstractSpellDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+ return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
short AbstractSvxPostItDialog_Impl::Execute()
{
@@ -524,19 +532,19 @@ const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-void AbstractSpellDialog_Impl::Invalidate()
+void AbstractSpellDialog_Impl::InvalidateDialog()
{
- pDlg->InvalidateDialog();
+ m_xDlg->InvalidateDialog();
}
-vcl::Window* AbstractSpellDialog_Impl::GetWindow()
+std::shared_ptr<SfxDialogController> AbstractSpellDialog_Impl::GetController()
{
- return pDlg;
+ return m_xDlg;
}
SfxBindings& AbstractSpellDialog_Impl::GetBindings()
{
- return pDlg->GetBindings();
+ return m_xDlg->GetBindings();
}
OUString AbstractTitleDialog_Impl::GetTitle() const
@@ -1050,12 +1058,11 @@ VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(we
}
VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog(
- vcl::Window* pParent,
+ weld::Window* pParent,
SfxBindings* pBindings,
- svx::SpellDialogChildWindow* pSpellChildWindow )
+ svx::SpellDialogChildWindow* pSpellChildWindow)
{
- VclPtrInstance<svx::SpellDialog> pDlg(pSpellChildWindow, pParent, pBindings);
- return VclPtr<AbstractSpellDialog_Impl>::Create(pDlg);
+ return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_unique<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings));
}
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog(weld::Window* pParent,