summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-06-08 21:06:11 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-06-16 18:31:58 +0200
commitc55f310515e36a60cd493d580131bd2d28fd34ad (patch)
treed8260d89296cc85d18c6a802dee103e6efe691f1 /include
parentca424a3fa0a5bfd90276319158198b9ec493a101 (diff)
VML: EMU to Points conversion
Change-Id: Icd2dbd6e894975615268dc4aa52d1d53bf9c0bca Reviewed-on: https://gerrit.libreoffice.org/38581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 15957e14408e7b525c71914739faa63bd827117d) Reviewed-on: https://gerrit.libreoffice.org/38879 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/drawingmltypes.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index 6a4a99f426fe..0b1ea4be7c72 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -153,6 +153,7 @@ IndexRange GetIndexRange( const css::uno::Reference< css::xml::sax::XFastAttribu
const sal_Int32 EMU_PER_HMM = 360; /// 360 EMUs per 1/100 mm.
+const sal_Int32 EMU_PER_PT = 12700;
/** Converts the passed 32-bit integer value from 1/100 mm to EMUs. */
inline sal_Int64 convertHmmToEmu( sal_Int32 nValue )
@@ -167,6 +168,11 @@ inline sal_Int32 convertEmuToHmm( sal_Int64 nValue )
return getLimitedValue< sal_Int32, sal_Int64 >( (nValue + nCorrection) / EMU_PER_HMM, SAL_MIN_INT32, SAL_MAX_INT32 );
}
+/** Converts the passed 64-bit integer value from EMUs to Points. */
+inline float convertEmuToPoints( sal_Int64 nValue )
+{
+ return (float) nValue / EMU_PER_PT;
+}
/** A structure for a point with 64-bit integer components. */
struct EmuPoint