[Libreoffice-commits] core.git: 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 546d26cccea7ede60fd13eb30a5e46f0c23477b4
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:58 2019 +0100

    jsdialogs: send table row/column size updates
    
    Change-Id: I1b41fe50e93dc14db60c7548a1ae0c54113da329
    Reviewed-on: https://gerrit.libreoffice.org/82542
    Tested-by: Jenkins
    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 df63915ce961..073fe280c924 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -48,6 +48,9 @@
 #include <sfx2/viewfrm.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>
@@ -1427,6 +1430,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;
             }
@@ -1438,6 +1454,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