sw/source/uibase/shells/tabsh.cxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
New commits: commit ac8ad3057033a190b1eff729c7196e8aa5fc43fc Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Tue Nov 12 17:17:36 2019 +0100 Commit: Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits