diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-12 17:17:36 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-13 09:50:51 +0100 |
commit | ac8ad3057033a190b1eff729c7196e8aa5fc43fc (patch) | |
tree | cb08a8d2870e66d528f19d54a4e80e5567eb97c3 /sw | |
parent | 891cd63392262dd7be27f30b0f31687c005a2703 (diff) |
jsdialogs: send table row/column size updates
Change-Id: I1b41fe50e93dc14db60c7548a1ae0c54113da329
Reviewed-on: https://gerrit.libreoffice.org/82540
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
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; } } |