[Libreoffice-commits] core.git: desktop/source sfx2/source

Pranav Kant pranavk at collabora.co.uk
Fri Dec 16 15:08:16 UTC 2016


 desktop/source/lib/init.cxx      |    1 -
 sfx2/source/control/unoctitm.cxx |   15 +++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit c5ceb0134dddb79207d3b8ddb7a36ee1ca294329
Author: Pranav Kant <pranavk at 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 which automatically
    means "enabled"
    
    Change-Id: I3314da77fb2b84d97f64b9832d65791b84fcd7df
    Reviewed-on: https://gerrit.libreoffice.org/32086
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ea947b8..26c18df 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1316,7 +1316,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 26252a36..ad66f45 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;


More information about the Libreoffice-commits mailing list