diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-04 13:01:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-04 17:36:48 +0100 |
commit | 10943505162d515f16acfb4d195d171421ff834f (patch) | |
tree | f5a67a7ae6e94227fa83b7b37611bf3d0d0ebca6 /oox | |
parent | 4887f113d3bb3ffaf7bd93e2e0dba13fdb11afee (diff) |
have one set of twips<->mm conversions
Change-Id: I510f4a0524a7c72eb124cba103cbf398024976d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110407
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textparagraphpropertiescontext.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index e81101f85ec2..6aa8fef0cd04 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -40,6 +40,7 @@ #include <oox/token/namespaces.hxx> #include <oox/token/properties.hxx> #include <oox/token/tokens.hxx> +#include <tools/helpers.hxx> using namespace ::oox::core; using namespace ::com::sun::star::uno; @@ -304,7 +305,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl { TextSpacing& rSpacing = mrTextParagraphProperties.getParaTopMargin(); rSpacing.nUnit = TextSpacing::Unit::Points; - rSpacing.nValue = TWIPS_TO_MM(oBefore.get()); + rSpacing.nValue = TwipsToHMM(oBefore.get()); rSpacing.bHasValue = true; } else @@ -328,7 +329,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl { TextSpacing& rSpacing = mrTextParagraphProperties.getParaBottomMargin(); rSpacing.nUnit = TextSpacing::Unit::Points; - rSpacing.nValue = TWIPS_TO_MM(oAfter.get()); + rSpacing.nValue = TwipsToHMM(oAfter.get()); rSpacing.bHasValue = true; } else @@ -358,7 +359,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl else { rLineSpacing.nUnit = TextSpacing::Unit::Points; - rLineSpacing.nValue = TWIPS_TO_MM(oLineSpacing.get()); + rLineSpacing.nValue = TwipsToHMM(oLineSpacing.get()); } rLineSpacing.bHasValue = true; } |