diff options
author | Henry Castro <hcastro@collabora.com> | 2016-02-07 18:29:03 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2016-02-08 15:01:05 +0000 |
commit | 255ac8fc28ef9717be69363927bd071c9a90d75d (patch) | |
tree | 07d2a5c685a7368fc67246698bbbf819898c3c6d | |
parent | 570d5af407d55c39621575e56c77817dbd429783 (diff) |
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@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | desktop/source/lib/init.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 92caf5c51e8e..eaac9927d06f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -704,7 +704,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 e1671b8a31f2..97ed49b0890f 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1142,6 +1142,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; |