diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-14 21:56:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-21 21:33:30 +0200 |
commit | 5261417cbb3051b812164838d19c0f748573df45 (patch) | |
tree | d159cce1d6903854fc13437c5cca5ce15e48281f /sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | |
parent | fda464112540011dd6e2bd267720d2800af3a5f2 (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 'sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx')
-rw-r--r-- | sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index d8c927cba9eb..918d48436145 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -383,7 +383,7 @@ The code below would only be part of the solution. if(m_pSpellState->m_xStartRange.is()) { LockFocusNotification( true ); - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetWindow()->GetFrameWeld(), + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetController()->getDialog(), VclMessageType::Question, VclButtonsType::YesNo, SwResId(STR_QUERY_SPELL_CONTINUE))); sal_uInt16 nRet = xBox->run(); if (RET_YES == nRet) @@ -411,10 +411,10 @@ The code below would only be part of the solution. { LockFocusNotification( true ); OUString sInfo( SwResId( bNoDictionaryAvailable ? STR_DICTIONARY_UNAVAILABLE : STR_SPELLING_COMPLETED ) ); - vcl::Window* pThisWindow = GetWindow(); + auto xSpellController = GetController(); // #i84610# std::unique_ptr<weld::MessageDialog> xBox( - Application::CreateMessageDialog( pThisWindow->GetFrameWeld(), + Application::CreateMessageDialog( xSpellController->getDialog(), VclMessageType::Info, VclButtonsType::Ok, sInfo ) ); @@ -422,8 +422,7 @@ The code below would only be part of the solution. LockFocusNotification( false ); // take care that the now valid selection is stored LoseFocus(); - if( pThisWindow ) - pThisWindow->GrabFocus(); + xSpellController->getDialog()->grab_focus(); } } return aRet; |