[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source sfx2/source

2016-12-16 Thread Pranav Kant
 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 
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 
Tested-by: Andras Timar 

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


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source sfx2/source

2016-07-14 Thread Henry Castro
 desktop/source/lib/init.cxx  |4 +++-
 sfx2/source/control/unoctitm.cxx |   10 ++
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit cc49daa85de86e7dec71f7289533d9c977c0bdd2
Author: Henry Castro 
Date:   Thu Jul 14 10:59:47 2016 -0400

sc lok: add more toolbar items

.uno:SortAscending
.uno:SortDescending

Change-Id: I3d307b43fb18ffce75b00a0b919b63320bf6db05
Reviewed-on: https://gerrit.libreoffice.org/27223
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c278d4b..4cd1649 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1018,7 +1018,9 @@ static void doc_iniUnoCommands ()
 OUString(".uno:ToggleMergeCells"),
 OUString(".uno:NumberFormatCurrency"),
 OUString(".uno:NumberFormatPercent"),
-OUString(".uno:NumberFormatDate")
+OUString(".uno:NumberFormatDate"),
+OUString(".uno:SortAscending"),
+OUString(".uno:SortDescending")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 2508688..7c7dafa 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1176,14 +1176,17 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 }
 else if (aEvent.FeatureURL.Path == "InsertPage" ||
  aEvent.FeatureURL.Path == "DeletePage" ||
- aEvent.FeatureURL.Path == "DuplicatePage")
+ aEvent.FeatureURL.Path == "DuplicatePage" ||
+ aEvent.FeatureURL.Path == "SortAscending" ||
+ aEvent.FeatureURL.Path == "SortDescending")
 {
 aBuffer.append(OUString::boolean(aEvent.IsEnabled));
 }
 else if (aEvent.FeatureURL.Path == "AssignLayout" ||
  aEvent.FeatureURL.Path == "StatusSelectionMode" ||
  aEvent.FeatureURL.Path == "Signature" ||
- aEvent.FeatureURL.Path == "SelectionMode")
+ aEvent.FeatureURL.Path == "SelectionMode" ||
+ aEvent.FeatureURL.Path == "StatusBarFunc")
 {
 sal_Int32 aInt32;
 
@@ -1233,8 +1236,7 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aBuffer.append(OUString::number(aPoint.X) + OUString(" / ") + 
OUString::number(aPoint.Y));
 }
 }
-else if (aEvent.FeatureURL.Path == "StatusBarFunc" ||
- aEvent.FeatureURL.Path == "Size")
+else if (aEvent.FeatureURL.Path == "Size")
 {
 css::awt::Size aSize;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source sfx2/source

2016-07-03 Thread Henry Castro
 desktop/source/lib/init.cxx  |5 -
 sfx2/source/control/unoctitm.cxx |5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 92c00125f7ea1dc203ffd03d6047eaccb8c8846e
Author: Henry Castro 
Date:   Sun Jul 3 09:40:50 2016 -0400

sd: add status bar UNO commands

Change-Id: I7da065edf76ccdbf9e410756c4d1fe81462975ed
Reviewed-on: https://gerrit.libreoffice.org/26881
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 32800b0..9eb9899 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -812,7 +812,10 @@ static void doc_iniUnoCommands ()
 OUString(".uno:StatePageNumber"),
 OUString(".uno:StateWordCount"),
 OUString(".uno:PageStyleName"),
-OUString(".uno:SelectionMode")
+OUString(".uno:SelectionMode"),
+OUString(".uno:PageStatus"),
+OUString(".uno:LayoutStatus"),
+OUString(".uno:Context")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index d4a1cba..76b6c93 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1159,7 +1159,10 @@ void 
SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
  aEvent.FeatureURL.Path == "StateTableCell" ||
  aEvent.FeatureURL.Path == "StatePageNumber" ||
  aEvent.FeatureURL.Path == "StateWordCount" ||
- aEvent.FeatureURL.Path == "PageStyleName")
+ aEvent.FeatureURL.Path == "PageStyleName" ||
+ aEvent.FeatureURL.Path == "PageStatus" ||
+ aEvent.FeatureURL.Path == "LayoutStatus" ||
+ aEvent.FeatureURL.Path == "Context")
 {
 OUString aString;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source sfx2/source

2016-07-02 Thread Henry Castro
 desktop/source/lib/init.cxx  |6 +-
 sfx2/source/control/unoctitm.cxx |8 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 6e90945e3e878e670ebdafc71ab82f7ec5757698
Author: Henry Castro 
Date:   Sat Jul 2 23:25:28 2016 -0400

sw lok: add status bar UNO commands

Change-Id: I4ffa3a3e07d00cfac48e67a0c32e85de0eda803d
Reviewed-on: https://gerrit.libreoffice.org/26876
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5a808a7..32800b0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -808,7 +808,11 @@ static void doc_iniUnoCommands ()
 OUString(".uno:Position"),
 OUString(".uno:StateTableCell"),
 OUString(".uno:StatusBarFunc"),
-OUString(".uno:Size")
+OUString(".uno:Size"),
+OUString(".uno:StatePageNumber"),
+OUString(".uno:StateWordCount"),
+OUString(".uno:PageStyleName"),
+OUString(".uno:SelectionMode")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 8321bbe..d4a1cba 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1143,7 +1143,8 @@ void 
SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
 }
 else if (aEvent.FeatureURL.Path == "AssignLayout" ||
  aEvent.FeatureURL.Path == "StatusSelectionMode" ||
- aEvent.FeatureURL.Path == "Signature")
+ aEvent.FeatureURL.Path == "Signature" ||
+ aEvent.FeatureURL.Path == "SelectionMode")
 {
 sal_Int32 aInt32;
 
@@ -1155,7 +1156,10 @@ void 
SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
 else if (aEvent.FeatureURL.Path == "StatusDocPos" ||
  aEvent.FeatureURL.Path == "RowColSelCount" ||
  aEvent.FeatureURL.Path == "StatusPageStyle" ||
- aEvent.FeatureURL.Path == "StateTableCell")
+ aEvent.FeatureURL.Path == "StateTableCell" ||
+ aEvent.FeatureURL.Path == "StatePageNumber" ||
+ aEvent.FeatureURL.Path == "StateWordCount" ||
+ aEvent.FeatureURL.Path == "PageStyleName")
 {
 OUString aString;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source sfx2/source

2016-07-02 Thread Henry Castro
 desktop/source/lib/init.cxx  |   12 +++-
 sfx2/source/control/unoctitm.cxx |   56 +++
 2 files changed, 62 insertions(+), 6 deletions(-)

New commits:
commit 7498be54ba0e288ed8f2572b79a21bbaca1c0a8b
Author: Henry Castro 
Date:   Thu Jun 30 10:33:20 2016 -0400

sc lok: add status bar UNO commands

Change-Id: I2dbed808a23609773baf9154820a7121c7919c70
Reviewed-on: https://gerrit.libreoffice.org/26809
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 74bcc6f..5a808a7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -798,7 +798,17 @@ static void doc_iniUnoCommands ()
 OUString(".uno:EntireColumn"),
 OUString(".uno:EntireCell"),
 OUString(".uno:MergeCells"),
-OUString(".uno:AssignLayout")
+OUString(".uno:AssignLayout"),
+OUString(".uno:StatusDocPos"),
+OUString(".uno:RowColSelCount"),
+OUString(".uno:StatusPageStyle"),
+OUString(".uno:InsertMode"),
+OUString(".uno:StatusSelectionMode"),
+OUString(".uno:Signature"),
+OUString(".uno:Position"),
+OUString(".uno:StateTableCell"),
+OUString(".uno:StatusBarFunc"),
+OUString(".uno:Size")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index af314f5..e14f7ad 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1061,7 +1061,7 @@ void 
SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
 
 OUStringBuffer aBuffer;
 aBuffer.append(aEvent.FeatureURL.Complete);
-aBuffer.append("=");
+aBuffer.append(static_cast('='));
 
 if (aEvent.FeatureURL.Path == "Bold" ||
 aEvent.FeatureURL.Path == "CenterPara" ||
@@ -1140,16 +1140,62 @@ void 
SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
 {
 aBuffer.append(OUString::boolean(aEvent.IsEnabled));
 }
-else if (aEvent.FeatureURL.Path == "AssignLayout")
+else if (aEvent.FeatureURL.Path == "AssignLayout" ||
+ aEvent.FeatureURL.Path == "StatusSelectionMode" ||
+ aEvent.FeatureURL.Path == "Signature")
 {
-sal_Int32 nLayout = 0;
-aEvent.State >>= nLayout;
-aBuffer.append(nLayout);
+sal_Int32 aInt32;
+
+if (aEvent.IsEnabled && (aEvent.State >>= aInt32))
+{
+aBuffer.append(OUString::number(aInt32));
+}
+}
+else if (aEvent.FeatureURL.Path == "StatusDocPos" ||
+ aEvent.FeatureURL.Path == "RowColSelCount" ||
+ aEvent.FeatureURL.Path == "StatusPageStyle" ||
+ aEvent.FeatureURL.Path == "StateTableCell")
+{
+OUString aString;
+
+if (aEvent.IsEnabled && (aEvent.State >>= aString))
+{
+aBuffer.append(aString);
+}
+}
+else if (aEvent.FeatureURL.Path == "InsertMode")
+{
+sal_Bool aBool;
+
+if (aEvent.IsEnabled && (aEvent.State >>= aBool))
+{
+aBuffer.append(OUString::boolean(aBool));
+}
+}
+else if (aEvent.FeatureURL.Path == "Position")
+{
+css::awt::Point aPoint;
+
+if (aEvent.IsEnabled && (aEvent.State >>= aPoint))
+{
+aBuffer.append(OUString::number(aPoint.X) + OUString(" / ") + 
OUString::number(aPoint.Y));
+}
+}
+else if (aEvent.FeatureURL.Path == "StatusBarFunc" ||
+ aEvent.FeatureURL.Path == "Size")
+{
+css::awt::Size aSize;
+
+if (aEvent.IsEnabled && (aEvent.State >>= aSize))
+{
+aBuffer.append(OUString::number(aSize.Width) + OUString(" x ") + 
OUString::number(aSize.Height));
+}
 }
 else
 {
 return;
 }
+
 OUString payload = aBuffer.makeStringAndClear();
 objSh->libreOfficeKitCallback(LOK_CALLBACK_STATE_CHANGED, 
payload.toUtf8().getStr());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits