diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-13 18:33:13 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-13 19:50:18 +0000 |
commit | 08bbdaa2f9e3a2b7cfee6838ea6d9f0096495812 (patch) | |
tree | 01b38be11e15249e76ff2b5c54cdfdce6c7224d0 /canvas | |
parent | fb45376fea3e3d0ff0fc2af56d67efad1e7751cf (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 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_textlayout_drawhelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/canvasfont.cxx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 6c25dd8697de..735ebdf24b33 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -168,7 +168,7 @@ namespace cairocanvas setupLayoutMode( *pVDev.get(), mnTextDirection ); - const sal_Int32 nAboveBaseline( -aMetric.GetIntLeading() - aMetric.GetAscent() ); + const sal_Int32 nAboveBaseline( -aMetric.GetInternalLeading() - aMetric.GetAscent() ); const sal_Int32 nBelowBaseline( aMetric.GetDescent() ); if( maLogicalAdvancements.getLength() ) diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index 0d63181a175d..f96066787c6c 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -278,7 +278,7 @@ namespace dxcanvas // relative to baseline const ::FontMetric& aMetric( xVirtualDevice->GetFontMetric() ); - const sal_Int32 nAboveBaseline( -aMetric.GetIntLeading() - aMetric.GetAscent() ); + const sal_Int32 nAboveBaseline( -aMetric.GetInternalLeading() - aMetric.GetAscent() ); const sal_Int32 nBelowBaseline( aMetric.GetDescent() ); if( rLogicalAdvancements.getLength() ) diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index efb880945014..7a196b751468 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -126,8 +126,8 @@ namespace vclcanvas return rendering::FontMetrics( aMetric.GetAscent(), aMetric.GetDescent(), - aMetric.GetIntLeading(), - aMetric.GetExtLeading(), + aMetric.GetInternalLeading(), + aMetric.GetExternalLeading(), 0, aMetric.GetDescent() / 2.0, aMetric.GetAscent() / 2.0); |