diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-12-18 21:42:13 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-12-19 09:48:50 +0000 |
commit | 40054ae87171ee4315ccc87761e198f0a2f64a34 (patch) | |
tree | 83e078e3b7e0e95d8113604c75ac57bc069565cf /cui | |
parent | 1c05c0b6ef8a96c144efd8d7d66bff39cf4619fe (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
Reviewed-on: https://gerrit.libreoffice.org/13531
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'cui')
-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 96b59dc53fc2..745fbd0d57ad 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; } |