[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/source sfx2/source

Henry Castro hcastro at collabora.com
Mon Feb 8 17:52:44 UTC 2016


 desktop/source/lib/init.cxx      |    7 ++++++-
 sfx2/source/control/unoctitm.cxx |   11 +++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 6d5bbadfb69c1c6b2d3e82e79c97350af2135487
Author: Henry Castro <hcastro at collabora.com>
Date:   Sun Feb 7 18:29:03 2016 -0400

    lok: notify the states of undo and redo toolbar items
    
    Also included .uno:InsertPage, .uno:DeletePage and
    .uno:DuplicatePage
    
    Change-Id: I91dd2609d6a48be75005a44490614bcf8bcf62e9
    Reviewed-on: https://gerrit.libreoffice.org/22195
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ccde8f6..2072fb3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -720,7 +720,12 @@ static void doc_iniUnoCommands ()
         OUString(".uno:Strikeout"),
         OUString(".uno:StyleApply"),
         OUString(".uno:Underline"),
-        OUString(".uno:ModifiedStatus")
+        OUString(".uno:ModifiedStatus"),
+        OUString(".uno:Undo"),
+        OUString(".uno:Redo"),
+        OUString(".uno:InsertPage"),
+        OUString(".uno:DeletePage"),
+        OUString(".uno:DuplicatePage")
     };
 
     util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 8a2a866..895e105 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1115,6 +1115,17 @@ void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
         aEvent.State >>= nColor;
         aBuffer.append(nColor);
     }
+    else if (aEvent.FeatureURL.Path == "Undo" ||
+             aEvent.FeatureURL.Path == "Redo")
+    {
+        aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : OUString("disabled"));
+    }
+    else if (aEvent.FeatureURL.Path == "InsertPage" ||
+             aEvent.FeatureURL.Path == "DeletePage" ||
+             aEvent.FeatureURL.Path == "DuplicatePage")
+    {
+        aBuffer.append(OUString::boolean(aEvent.IsEnabled));
+    }
     else
     {
         return;


More information about the Libreoffice-commits mailing list