diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-12-16 19:35:02 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 16:47:07 +0100 |
commit | 5153304bc7b508a900853c89af913be97ddfdebb (patch) | |
tree | ee962a87b200a56e30c29c4f5c194dd5caef98e1 | |
parent | e98c398e8aac44952c49f44aea391bebdd806a75 (diff) |
lok: Fix state feedback for ToggleMergeCells
Now it broadcasts "disabled" to disable the command and
true/false to tell the status of the command which automatically
means "enabled"
Change-Id: I3314da77fb2b84d97f64b9832d65791b84fcd7df
Reviewed-on: https://gerrit.libreoffice.org/32086
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
(cherry picked from commit c5ceb0134dddb79207d3b8ddb7a36ee1ca294329)
-rw-r--r-- | desktop/source/lib/init.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 92e3485b57fb..29cfe607bbad 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1386,7 +1386,6 @@ static void doc_iniUnoCommands () OUString(".uno:EntireRow"), OUString(".uno:EntireColumn"), OUString(".uno:EntireCell"), - OUString(".uno:MergeCells"), OUString(".uno:AssignLayout"), OUString(".uno:StatusDocPos"), OUString(".uno:RowColSelCount"), diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 678d5fad4423..5b00be5c3b84 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1050,7 +1050,6 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c aEvent.FeatureURL.Path == "EntireRow" || aEvent.FeatureURL.Path == "EntireColumn" || aEvent.FeatureURL.Path == "EntireCell" || - aEvent.FeatureURL.Path == "MergeCells" || aEvent.FeatureURL.Path == "SortAscending" || aEvent.FeatureURL.Path == "SortDescending") { @@ -1095,7 +1094,6 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c } else if (aEvent.FeatureURL.Path == "InsertMode" || aEvent.FeatureURL.Path == "WrapText" || - aEvent.FeatureURL.Path == "ToggleMergeCells" || aEvent.FeatureURL.Path == "NumberFormatCurrency" || aEvent.FeatureURL.Path == "NumberFormatPercent" || aEvent.FeatureURL.Path == "NumberFormatDate") @@ -1107,6 +1105,19 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c aBuffer.append(OUString::boolean(aBool)); } } + else if (aEvent.FeatureURL.Path == "ToggleMergeCells") + { + if (aEvent.IsEnabled) + { + sal_Bool aBool; + aEvent.State >>= aBool; + aBuffer.append(OUString::boolean(aBool)); + } + else + { + aBuffer.append(OUString("disabled")); + } + } else if (aEvent.FeatureURL.Path == "Position") { css::awt::Point aPoint; |