sw/source/uibase/misc/swruler.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 55eddbecb34f811d5292fe4dc5c568cf5fff2ad4 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Thu Dec 5 00:28:41 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Dec 5 13:51:06 2019 +0100 tdf#128468: The RulerTab::nPos is in twips Do pass that as actual mm100 then. Change-Id: Ifc9608aeee838172a18cc07aa1dbe0d7f3f5fb6a Reviewed-on: https://gerrit.libreoffice.org/84473 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> (cherry picked from commit a69f5b1386fc7e3f7f9838c078e4078eeeec555d) Reviewed-on: https://gerrit.libreoffice.org/84522 Tested-by: Jenkins diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 989ef20f9057..d500ce3006d2 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -279,14 +279,17 @@ std::string SwCommentRuler::CreateJsonNotification() jsonNotif.put("pageOffset", convertTwipToMm100(GetPageOffset())); // GetPageWidth() on the other hand does return a value in twips. + // So here convertTwipToMm100() really does produce actual mm100. Fun. jsonNotif.put("pageWidth", convertTwipToMm100(GetPageWidth())); boost::property_tree::ptree tabs; + // The RulerTab array elements that GetTabs() returns have their nPos field in twips. So these + // too are actual mm100. for (auto const& tab : GetTabs()) { boost::property_tree::ptree element; - element.put("position", tab.nPos); + element.put("position", convertTwipToMm100(tab.nPos)); element.put("style", tab.nStyle); tabs.push_back(std::make_pair("", element)); } commit f77fd91dc24b197086df1845735da77fec64ec30 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Wed Dec 4 16:19:24 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Dec 5 13:50:44 2019 +0100 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> (cherry picked from commit 8a840463fc8abbbc445fed91463a1e2eb42dc1aa) Reviewed-on: https://gerrit.libreoffice.org/84521 Tested-by: Jenkins 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits