desktop/source/lib/init.cxx | 1 - sfx2/source/control/unoctitm.cxx | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-)
New commits: commit 6bd899f3fa44f2d78092333a399e141889b43dca Author: Pranav Kant <pran...@collabora.co.uk> Date: Fri Dec 16 19:35:02 2016 +0530 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.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 61a85ae..62d8d34 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 c8b0c27..063f808 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits