sw/source/uibase/uiview/viewtab.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
New commits: commit 891cd63392262dd7be27f30b0f31687c005a2703 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Tue Nov 12 16:28:04 2019 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Nov 12 18:24:35 2019 +0100 jsdialogs: send .uno:ULSpacing updates Change-Id: I061868a0cf9163624026dc1ff164af3d98923aa6 Reviewed-on: https://gerrit.libreoffice.org/82529 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index d978d6a7451b..96c322aa5d33 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -56,6 +56,9 @@ #include <cntfrm.hxx> #include <ndtxt.hxx> #include <pam.hxx> +#include <comphelper/lok.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <editeng/itemtype.hxx> #include <IDocumentSettingAccess.hxx> @@ -1578,6 +1581,24 @@ void SwView::StateTabWin(SfxItemSet& rSet) aUL.SetWhich( nWhich ); rSet.Put( aUL ); } + + if (comphelper::LibreOfficeKit::isActive()) + { + // TODO: set correct unit + MapUnit eTargetUnit = MapUnit::MapInch; + + OUString sUpper = GetMetricText(aUL.GetUpper(), + MapUnit::MapTwip, eTargetUnit, nullptr); + + OUString sLower = GetMetricText(aUL.GetLower(), + MapUnit::MapTwip, eTargetUnit, nullptr); + + OUString sPayload = ".uno:ULSpacing={\"upper\": \"" + sUpper + + "\", \"lower\": \"" + sLower + "\"}"; + + GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, + OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); + } } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits