summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2016-12-16 19:35:02 +0530
committerpranavk <pranavk@collabora.co.uk>2016-12-16 15:07:31 +0000
commitc5ceb0134dddb79207d3b8ddb7a36ee1ca294329 (patch)
treeab6271d90f09421ab2175372bdc7a3f5cc954c2a /sfx2/source
parent3ab307e568156b0fdafe1ee592870ef8c0e44750 (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>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/unoctitm.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 26252a36514e..ad66f45f84f3 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;