diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-12-18 21:42:13 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-18 21:49:54 +0100 |
commit | 08e0a79aeba6fd41cbb51de3be48659619f27206 (patch) | |
tree | fc6fd02669f6d549e5ca23dcf8d2b98f1b488f55 /cui/source/dialogs/SpellDialog.cxx | |
parent | 7ac1522d9edf6ac58856cdb5f8ff548dedd27a63 (diff) |
spell dialog: Make [Close] work in protected documents with editable fields.
We have to call ToggleChildWindow directly; calling SfxDispatcher's Execute()
does not work here when we are in a document with protected section - in that
case, the cursor can move from the editable field to the protected area, and
the slots get disabled because of SW_DISABLE_ON_PROTECTED_CURSOR (see
FN_SPELL_GRAMMAR_DIALOG in .sdi).
Change-Id: I1c310c028aaaf774431d0b1e6bba10e901a8166d
Diffstat (limited to 'cui/source/dialogs/SpellDialog.cxx')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a589bab71f27..2aba722656d6 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -736,9 +736,13 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl) bool SpellDialog::Close() { - GetBindings().GetDispatcher()-> - Execute(rParent.GetType(), - SfxCallMode::ASYNCHRON|SfxCallMode::RECORD); + // We have to call ToggleChildWindow directly; calling SfxDispatcher's + // Execute() does not work here when we are in a document with protected + // section - in that case, the cursor can move from the editable field to + // the protected area, and the slots get disabled because of + // SW_DISABLE_ON_PROTECTED_CURSOR (see FN_SPELL_GRAMMAR_DIALOG in .sdi). + SfxViewFrame::Current()->ToggleChildWindow(rParent.GetType()); + return true; } |