diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-30 17:52:41 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-09-15 09:18:38 +0200 |
commit | 75544ab41dd65b5e5e88dcc0cdfc74f6baf2f11e (patch) | |
tree | c8438663a39475d680c2de85d69ad880531125ed | |
parent | 722ab93773879faf8b810ac610466bb0b57ced46 (diff) |
Resolves: tdf#97055 hyphenation claims its already active after closing
cancel button works, hyphen all works, but closing it via wm close
skips the cancel callback.
simplest thing seems to be to call SpellEnd when necessary, flagging
that its not necessary by disabling the close button on the RET_OK
case
Change-Id: Ib0a67c4395e9d20941e735ebb14f6bd7f7ddb66c
(cherry picked from commit c7fd6532682a12d8981e6b19b4fbb75d6d3c412c)
Reviewed-on: https://gerrit.libreoffice.org/28503
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit b9375c082822e4a1030c9dfca8cb0c959b78633d)
-rw-r--r-- | cui/source/dialogs/hyphen.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 06ed08c61b83..4798a1319ea7 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -268,7 +268,10 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos ) } } else - EndDialog( RET_OK ); + { + m_pCloseBtn->Disable(); + EndDialog(RET_OK); + } } @@ -399,7 +402,6 @@ IMPL_LINK_NOARG_TYPED(SvxHyphenWordDialog, CancelHdl_Impl, Button*, void) if( !m_bBusy ) { m_bBusy = true; - m_pHyphWrapper->SpellEnd(); EndDialog(); m_bBusy = false; } @@ -501,6 +503,8 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog() void SvxHyphenWordDialog::dispose() { + if (m_pCloseBtn->IsEnabled()) + m_pHyphWrapper->SpellEnd(); m_pWordEdit.clear(); m_pLeftBtn.clear(); m_pRightBtn.clear(); @@ -512,7 +516,6 @@ void SvxHyphenWordDialog::dispose() SfxModalDialog::dispose(); } - void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) { SetText( m_aLabel + " (" + SvtLanguageTable::GetLanguageString( nLang ) + ")" ); |