diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-03 09:33:28 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-03 03:29:55 +0000 |
commit | 694ec8930ab7d7a54805ec598be84845b502772c (patch) | |
tree | 9e44148884d0f01e21b853512fccc7b971f2f1f3 /vcl/source/outdev/text.cxx | |
parent | 91f41c3ec23eb063873db8a03c3f6806e2e68af8 (diff) |
vcl: convert ImplFontMetricData to accessor functions
Changed private variables to use accessor functions in ImplFontMetric.
It turns out there are some variables that are redundant as they are
already in ImplFontAttributes. These are:
- meFamilyType
- mbDevice
I also needed to change ImplFontMetric::GetSlant() to GetSlantType()
as the names conflicted.
Change-Id: Ic06a374fb929e3b2ffb18a6c66577c526c3b31a7
Reviewed-on: https://gerrit.libreoffice.org/21050
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source/outdev/text.cxx')
-rw-r--r-- | vcl/source/outdev/text.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 37edc64ae6e0..1686dbf5a926 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -174,7 +174,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout ) mpGraphics->SetFillColor( ImplColorToSal( GetTextFillColor() ) ); mbInitFillColor = true; - ImplDrawTextRect( nX, nY, 0, -(mpFontEntry->maMetric.mnAscent + mnEmphasisAscent), + ImplDrawTextRect( nX, nY, 0, -(mpFontEntry->maMetric.GetAscent() + mnEmphasisAscent), nWidth, mpFontEntry->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent ); } @@ -188,7 +188,7 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) long nWidth = rSalLayout.GetTextWidth(); long nHeight = mpFontEntry->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent; - nY -= mpFontEntry->maMetric.mnAscent + mnEmphasisAscent; + nY -= mpFontEntry->maMetric.GetAscent() + mnEmphasisAscent; if ( mpFontEntry->mnOrientation ) { @@ -229,7 +229,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) { // guess vertical text extents if GetBoundRect failed int nRight = rSalLayout.GetTextWidth(); - int nTop = mpFontEntry->maMetric.mnAscent + mnEmphasisAscent; + int nTop = mpFontEntry->maMetric.GetAscent() + mnEmphasisAscent; long nHeight = mpFontEntry->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent; aBoundRect = Rectangle( 0, -nTop, nRight, nHeight - nTop ); } @@ -2618,7 +2618,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect, Point aTopLeft( nLeft, nTop ); aTopLeft -= aOffset; // adjust to text alignment - aTopLeft.Y()+= mnTextOffY - (mpFontEntry->maMetric.mnAscent + mnEmphasisAscent); + aTopLeft.Y()+= mnTextOffY - (mpFontEntry->maMetric.GetAscent() + mnEmphasisAscent); // convert to logical coordinates aSize = PixelToLogic( aSize ); aTopLeft.X() = ImplDevicePixelToLogicWidth( aTopLeft.X() ); |