diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-12-16 19:35:02 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-12-16 22:01:52 +0000 |
commit | 6bd899f3fa44f2d78092333a399e141889b43dca (patch) | |
tree | b904cb18dbc6356ce07e1fc3818e42aa634ab6c1 | |
parent | 1308498296d0d3dec32de92bdbd275ee75a70d54 (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.
Change-Id: I3314da77fb2b84d97f64b9832d65791b84fcd7df
(cherry picked from commit c34ac4cbcc1e8273f68125990c27e5b25297358d)
Reviewed-on: https://gerrit.libreoffice.org/32092
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
-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 61a85aeeb5df..62d8d34ab412 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1288,7 +1288,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 c8b0c27624a5..063f808bf12f 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1172,7 +1172,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") { @@ -1217,7 +1216,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") @@ -1229,6 +1227,19 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c aBuffer.append(OUString::boolean(aBool)); } } + else if (aEvent.FeatureURL.Path == "ToggleMergeCells") + { + sal_Bool aBool; + + if (aEvent.IsEnabled && (aEvent.State >>= aBool)) + { + aBuffer.append(OUString::boolean(aBool)); + } + else + { + aBuffer.append(OUString("disabled")); + } + } else if (aEvent.FeatureURL.Path == "Position") { css::awt::Point aPoint; |