[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 08:51:36 UTC 2019
sw/source/uibase/shells/tabsh.cxx | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
New commits:
commit ac8ad3057033a190b1eff729c7196e8aa5fc43fc
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Nov 12 17:17:36 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Nov 13 09:50:51 2019 +0100
jsdialogs: send table row/column size updates
Change-Id: I1b41fe50e93dc14db60c7548a1ae0c54113da329
Reviewed-on: https://gerrit.libreoffice.org/82540
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 29c2e320d1d8..35f6a84d80fa 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -46,6 +46,9 @@
#include <sfx2/objface.hxx>
#include <vcl/EnumContext.hxx>
#include <o3tl/enumrange.hxx>
+#include <comphelper/lok.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <editeng/itemtype.hxx>
#include <fmtornt.hxx>
#include <fmtclds.hxx>
@@ -1418,6 +1421,19 @@ void SwTableShell::GetState(SfxItemSet &rSet)
long nHeight = pHeight->GetHeight();
aRowHeight.SetValue(nHeight);
rSet.Put(aRowHeight);
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // TODO: set correct unit
+ MapUnit eTargetUnit = MapUnit::MapInch;
+ OUString sHeight = GetMetricText(nHeight,
+ MapUnit::MapTwip, eTargetUnit, nullptr);
+
+ OUString sPayload = ".uno:TableRowHeight=" + sHeight;
+
+ GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+ OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr());
+ }
}
break;
}
@@ -1429,6 +1445,20 @@ void SwTableShell::GetState(SfxItemSet &rSet)
SwTwips nWidth = aFunc.GetColWidth(aFunc.GetCurColNum());
aColumnWidth.SetValue(nWidth);
rSet.Put(aColumnWidth);
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // TODO: set correct unit
+ MapUnit eTargetUnit = MapUnit::MapInch;
+ OUString sWidth = GetMetricText(nWidth,
+ MapUnit::MapTwip, eTargetUnit, nullptr);
+
+ OUString sPayload = ".uno:TableColumWidth=" + sWidth;
+
+ GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+ OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr());
+ }
+
break;
}
}
More information about the Libreoffice-commits
mailing list