sw/source/uibase/misc/swruler.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 28606ab36152ce0c0b929e6eb23262eac4881a4e
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Thu Dec 5 00:28:41 2019 +0200
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Mon May 18 08:41:28 2020 +0200

    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 <[email protected]>
    Reviewed-by: Tor Lillqvist <[email protected]>
    Tested-by: Tor Lillqvist <[email protected]>
    (cherry picked from commit a69f5b1386fc7e3f7f9838c078e4078eeeec555d)
    Reviewed-on: https://gerrit.libreoffice.org/84761
    (cherry picked from commit a3dcf498040111cf6f3fb96822c175d80f26d822)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94208

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));
     }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to