summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-13 18:33:13 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-13 19:50:18 +0000
commit08bbdaa2f9e3a2b7cfee6838ea6d9f0096495812 (patch)
tree01b38be11e15249e76ff2b5c54cdfdce6c7224d0 /cppcanvas
parentfb45376fea3e3d0ff0fc2af56d67efad1e7751cf (diff)
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 <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/mtftools.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx
index 43913529778e..b148e763e765 100644
--- a/cppcanvas/source/mtfrenderer/mtftools.cxx
+++ b/cppcanvas/source/mtfrenderer/mtftools.cxx
@@ -66,7 +66,7 @@ namespace cppcanvas
{
case ALIGN_TOP:
return ::Size( 0,
- aMetric.GetIntLeading() + aMetric.GetAscent() );
+ aMetric.GetInternalLeading() + aMetric.GetAscent() );
default:
ENSURE_OR_THROW( false,
@@ -243,10 +243,10 @@ namespace cppcanvas
TextLineInfo aTextInfo(
(aMetric.GetDescent() + 2) / 4.0,
- ((aMetric.GetIntLeading() + 1.5) / 3.0),
- (aMetric.GetIntLeading() / 2.0) - aMetric.GetAscent(),
+ ((aMetric.GetInternalLeading() + 1.5) / 3.0),
+ (aMetric.GetInternalLeading() / 2.0) - aMetric.GetAscent(),
aMetric.GetDescent() / 2.0,
- (aMetric.GetIntLeading() - aMetric.GetAscent()) / 3.0,
+ (aMetric.GetInternalLeading() - aMetric.GetAscent()) / 3.0,
rState.textOverlineStyle,
rState.textUnderlineStyle,
rState.textStrikeoutStyle );