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 /sw/source | |
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 'sw/source')
-rw-r--r-- | sw/source/core/doc/textboxhelper.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 46811d5855d2..94f0d5abac78 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -862,15 +862,15 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u if (aValue >>= nValue) { if (bAdjustX) - nValue += TWIPS_TO_MM(aRect.getX()); + nValue += TwipsToHMM(aRect.getX()); else if (bAdjustY) - nValue += TWIPS_TO_MM(aRect.getY()); + nValue += TwipsToHMM(aRect.getY()); aValue <<= nValue; } } else if (bAdjustSize) { - awt::Size aSize(TWIPS_TO_MM(aRect.getWidth()), TWIPS_TO_MM(aRect.getHeight())); + awt::Size aSize(TwipsToHMM(aRect.getWidth()), TwipsToHMM(aRect.getHeight())); aValue <<= aSize; } } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index fa1c5ea5c48f..e6d75e7ceeba 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -3041,8 +3041,8 @@ void SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo tools::Rectangle aRect = rFormObj.GetLogicRect(); aRect.SetPos(Point(0,0)); awt::Size aSize; - aSize.Width = TWIPS_TO_MM(aRect.Right()); - aSize.Height = TWIPS_TO_MM(aRect.Bottom()); + aSize.Width = TwipsToHMM(aRect.Right()); + aSize.Height = TwipsToHMM(aRect.Bottom()); //Open the ObjectPool tools::SvRef<SotStorage> xObjPool = rWW8Wrt.GetWriter().GetStorage().OpenSotStorage(SL::aObjectPool); |