From 08bbdaa2f9e3a2b7cfee6838ea6d9f0096495812 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Wed, 13 Jan 2016 18:33:13 +1100 Subject: vcl: Create accessor and mutator for int and ext leading in FontMetric Accessor and mutator created for external and internal leading space in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set external and leading space - check equality operator on FontMetric after setting both external and internal leading space - enhanced tests to also check the inequality operator Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63 Reviewed-on: https://gerrit.libreoffice.org/21454 Reviewed-by: Chris Sherlock Tested-by: Chris Sherlock --- drawinglayer/source/primitive2d/textlayoutdevice.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 5356785fc4dd..ee7df1f3c161 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -183,7 +183,7 @@ namespace drawinglayer double TextLayouterDevice::getOverlineOffset() const { const ::FontMetric& rMetric = mrDevice.GetFontMetric(); - double fRet = (rMetric.GetIntLeading() / 2.0) - rMetric.GetAscent(); + double fRet = (rMetric.GetInternalLeading() / 2.0) - rMetric.GetAscent(); return fRet; } @@ -197,14 +197,14 @@ namespace drawinglayer double TextLayouterDevice::getStrikeoutOffset() const { const ::FontMetric& rMetric = mrDevice.GetFontMetric(); - double fRet = (rMetric.GetAscent() - rMetric.GetIntLeading()) / 3.0; + double fRet = (rMetric.GetAscent() - rMetric.GetInternalLeading()) / 3.0; return fRet; } double TextLayouterDevice::getOverlineHeight() const { const ::FontMetric& rMetric = mrDevice.GetFontMetric(); - double fRet = rMetric.GetIntLeading() / 2.5; + double fRet = rMetric.GetInternalLeading() / 2.5; return fRet; } -- cgit