summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
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 /vcl/source/outdev
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 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/font.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 39ff77457415..0fbf52e4880a 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -218,8 +218,9 @@ FontMetric OutputDevice::GetFontMetric() const
aMetric.mpImplMetric->mnBulletOffset = pFontAttributes->GetBulletOffset();
aMetric.mpImplMetric->mnAscent = ImplDevicePixelToLogicHeight( pFontAttributes->GetAscent() + mnEmphasisAscent );
aMetric.mpImplMetric->mnDescent = ImplDevicePixelToLogicHeight( pFontAttributes->GetDescent() + mnEmphasisDescent );
- aMetric.mpImplMetric->mnIntLeading = ImplDevicePixelToLogicHeight( pFontAttributes->GetInternalLeading() + mnEmphasisAscent );
- aMetric.mpImplMetric->mnExtLeading = ImplDevicePixelToLogicHeight( GetFontExtLeading() );
+ aMetric.SetInternalLeading( ImplDevicePixelToLogicHeight( pFontAttributes->GetInternalLeading() + mnEmphasisAscent ) );
+ // OutputDevice has its own external leading function due to #i60945#
+ aMetric.SetExternalLeading( ImplDevicePixelToLogicHeight( GetFontExtLeading() ) );
aMetric.mpImplMetric->mnLineHeight = ImplDevicePixelToLogicHeight( pFontAttributes->GetAscent() + pFontAttributes->GetDescent() + mnEmphasisAscent + mnEmphasisDescent );
aMetric.mpImplMetric->mnSlant = ImplDevicePixelToLogicHeight( pFontAttributes->GetSlant() );