summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-12-04 16:19:24 +0200
committerTor Lillqvist <tml@collabora.com>2019-12-05 13:50:44 +0100
commitf77fd91dc24b197086df1845735da77fec64ec30 (patch)
tree82e5d7001d4fff39f9e0400ed3783866449d8f4c
parent891b0c54ead076f0458197233a47d227b1b36f64 (diff)
tdf#128468: Add tab stop information to LOK_CALLBACK_RULER_UPDATE
Change-Id: I7872cdc3aabf66bb6d1df09f503274c698b64a4e Reviewed-on: https://gerrit.libreoffice.org/84420 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 8a840463fc8abbbc445fed91463a1e2eb42dc1aa) Reviewed-on: https://gerrit.libreoffice.org/84521 Tested-by: Jenkins
-rw-r--r--sw/source/uibase/misc/swruler.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 021013890631..989ef20f9057 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -281,6 +281,18 @@ std::string SwCommentRuler::CreateJsonNotification()
// GetPageWidth() on the other hand does return a value in twips.
jsonNotif.put("pageWidth", convertTwipToMm100(GetPageWidth()));
+ boost::property_tree::ptree tabs;
+
+ for (auto const& tab : GetTabs())
+ {
+ boost::property_tree::ptree element;
+ element.put("position", tab.nPos);
+ element.put("style", tab.nStyle);
+ tabs.push_back(std::make_pair("", element));
+ }
+
+ jsonNotif.add_child("tabs", tabs);
+
RulerUnitData aUnitData = GetCurrentRulerUnit();
jsonNotif.put("unit", aUnitData.aUnitStr);