diff options
Diffstat (limited to 'starmath/inc/utility.hxx')
-rw-r--r-- | starmath/inc/utility.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index c0b473264532..a05578a53647 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -21,10 +21,13 @@ #include <sal/config.h> +#include <comphelper/lok.hxx> +#include <o3tl/unit_conversion.hxx> #include <sal/log.hxx> #include <vcl/font.hxx> #include <vcl/weld.hxx> #include <tools/fract.hxx> +#include <tools/mapunit.hxx> #include <deque> @@ -113,4 +116,14 @@ public: virtual void Insert(const vcl::Font &rFont) override; }; +// Math uses 100ths of MM by default, but lok needs twips everywhere +inline MapUnit SmMapUnit() +{ + return comphelper::LibreOfficeKit::isActive() ? MapUnit::MapTwip : MapUnit::Map100thMM; +} +inline o3tl::Length SmO3tlLengthUnit() +{ + return comphelper::LibreOfficeKit::isActive() ? o3tl::Length::twip : o3tl::Length::mm100; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |