include/svx/svdetc.hxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit e82c9633e4f9bc4590bd6cd8d2a82a974ddaf00f
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Sun Apr 28 09:31:46 2024 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Apr 30 04:55:09 2024 +0200

    svx: use o3tl::convert instead of 847 (mm100) when we want 24pt
    
    Change-Id: I1d1c4a0e12c0443e7021c8aedcd386814a1647be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166823
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index f0c28ae2f8fc..5f80ead04e4a 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -27,6 +27,7 @@
 #include <svl/whichranges.hxx>
 #include <unotools/syslocale.hxx>
 #include <memory>
+#include <o3tl/unit_conversion.hxx>
 
 
 /**
@@ -67,11 +68,8 @@ namespace SdrEngineDefaults
     // Default FontColor is COL_AUTO
     inline Color GetFontColor() { return COL_AUTO; }
 
-    // Default FontHeight is 847. The font height uses logical units 
(MapUnit/MapFraction
-    // see below for further details). The default setting 847/100mm 
corresponds to about
-    // 24 Point. If e.g. one would use Twips (SetMapUnit(MapUnit::MapTwip)) 
(20 Twip = 1 Point)
-    // instead, one would need to set the font height to 480, in order to get 
a 24 Point height.
-    inline size_t GetFontHeight() { return 847; }
+    // Default font height
+    inline size_t GetFontHeight() { return o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100); }
 
     // The MapMode is needed for the global Outliner.
     // Incidentally, every newly instantiated SdrModel is assigned this 
MapMode by default.

Reply via email to