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:33 +0100
commitc5c40523eaabb7d07fb49983ebcf9b0636d34389 (patch)
treeadb6bc563a1050a5eca55fd3186e701bd48be344 /sw
parentcf7d723194d7a20e9c014dcf94dff7edfc6b7c04 (diff)
jsdialog: migrate left/right margin to generic items dump
Change-Id: Ie687393ae4b9a7f8350eea07c1d417c11fc532bd Reviewed-on: https://gerrit.libreoffice.org/84000 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/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 70ef0ba431f7..5af84af21eff 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -39,8 +39,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>
@@ -725,28 +723,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);
@@ -840,6 +816,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: */