summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-28 14:41:53 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-29 14:45:34 +0100
commitdb0f4b28d9f1583d9977f76114d86bac489de161 (patch)
tree50a02c51ba754e7279e62e90305c4f7cd70b7551 /sw
parentc94567e1aa006b284b07564d4995ac238bf24c41 (diff)
jsdialog: migrate left/right margin to generic items dump
Change-Id: Ie687393ae4b9a7f8350eea07c1d417c11fc532bd Reviewed-on: https://gerrit.libreoffice.org/84002 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/txtattr.cxx28
1 files changed, 4 insertions, 24 deletions
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 737a1e094e41..1b11fcca7bad 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -40,8 +40,6 @@
#include <editeng/cmapitem.hxx>
#include <paratr.hxx>
#include <comphelper/lok.hxx>
-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-#include <editeng/itemtype.hxx>
#include <fmtinfmt.hxx>
#include <docsh.hxx>
@@ -755,28 +753,6 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SvxLRSpaceItem aLR = aCoreSet.Get( RES_LR_SPACE );
aLR.SetWhich(nSlot);
rSet.Put(aLR);
-
- if (comphelper::LibreOfficeKit::isActive())
- {
- // TODO: set correct unit
- MapUnit eTargetUnit = MapUnit::MapInch;
-
- OUString sLeft = GetMetricText(aLR.GetLeft(),
- MapUnit::MapTwip, eTargetUnit, nullptr);
-
- OUString sRight = GetMetricText(aLR.GetRight(),
- MapUnit::MapTwip, eTargetUnit, nullptr);
-
- OUString sFirstline = GetMetricText(aLR.GetTextFirstLineOfst(),
- MapUnit::MapTwip, eTargetUnit, nullptr);
-
- OUString sPayload = ".uno:LeftRightParaMargin={\"left\": \"" + sLeft +
- "\", \"right\": \"" + sRight +
- "\", \"firstline\": \"" + sFirstline + "\"}";
-
- GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
- OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr());
- }
}
else
rSet.InvalidateItem(nSlot);
@@ -870,6 +846,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
}
rSet.Put(aCoreSet,false);
+
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if (pViewShell && comphelper::LibreOfficeKit::isActive())
+ pViewShell->sendUnoStatus( &rSet );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */