[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source

Jan Holesovsky kendy at collabora.com
Wed Jan 14 02:14:20 PST 2015


 cui/source/dialogs/SpellDialog.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 5752f97d6dee7ffe7ac6a311802ab9fa3212dcb5
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Dec 18 21:42:13 2014 +0100

    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/13836
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 68124b5..398dd26 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -738,9 +738,13 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl)
 
 bool SpellDialog::Close()
 {
-    GetBindings().GetDispatcher()->
-        Execute(rParent.GetType(),
-        SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_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;
 }
 


More information about the Libreoffice-commits mailing list