summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-12-05 00:28:41 +0200
committerTor Lillqvist <tml@collabora.com>2019-12-05 07:52:13 +0100
commita69f5b1386fc7e3f7f9838c078e4078eeeec555d (patch)
treedec364e63326632817a521685eaed0e8eb51ee61
parent8a840463fc8abbbc445fed91463a1e2eb42dc1aa (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--sw/source/uibase/misc/swruler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index c58123a1367b..28909ccab95e 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -277,14 +277,17 @@ const 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));
}