summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/textlayout.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-16 09:29:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-17 08:41:31 +0200
commit2e3f5a1e2aad2ff9866d7a782a04bec7c29c0e43 (patch)
tree2929b89c09f7cbe9915d798c819a47e41f1b1d1d /vcl/source/gdi/textlayout.cxx
parentac13f4db592f91783e644535968a8d3202c94640 (diff)
loplugin:unusedfields in vcl
Change-Id: Id0913b209b089e3c66a7e449e31f8d5d5b1b4f83 Reviewed-on: https://gerrit.libreoffice.org/54413 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/textlayout.cxx')
-rw-r--r--vcl/source/gdi/textlayout.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index f533e84c0ba1..eaecdd275d63 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -93,7 +93,6 @@ namespace vcl
OutputDevice& m_rTargetDevice;
OutputDevice& m_rReferenceDevice;
Font m_aUnzoomedPointFont;
- const Fraction m_aZoom;
const bool m_bRTLEnabled;
tools::Rectangle m_aCompleteTextRect;
@@ -104,9 +103,9 @@ namespace vcl
:m_rTargetDevice( _rTargetDevice )
,m_rReferenceDevice( _rReferenceDevice )
,m_aUnzoomedPointFont( _rControl.GetUnzoomedControlPointFont() )
- ,m_aZoom( _rControl.GetZoom() )
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
{
+ const Fraction aZoom( _rControl.GetZoom() );
m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
@@ -116,8 +115,8 @@ namespace vcl
// between text in Writer and text in controls in Writer, though both have the same font.
// So, if we have a zoom set at the control, then we do not scale the font, but instead modify the map mode
// to accommodate for the zoom.
- aTargetMapMode.SetScaleX( m_aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
- aTargetMapMode.SetScaleY( m_aZoom );
+ aTargetMapMode.SetScaleX( aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
+ aTargetMapMode.SetScaleY( aZoom );
// also, use a higher-resolution map unit than "pixels", which should save us some rounding errors when
// translating coordinates between the reference device and the target device.