From 08bbdaa2f9e3a2b7cfee6838ea6d9f0096495812 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Wed, 13 Jan 2016 18:33:13 +1100 Subject: 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 Tested-by: Chris Sherlock --- sc/source/ui/view/output2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui/view') diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f7b9801b850c..39577bbeb92b 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -246,7 +246,7 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, SvtScriptType nScript ) pFmtDevice->SetFont( aFont ); aMetric = pFmtDevice->GetFontMetric(); - if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && aMetric.GetIntLeading() == 0 ) + if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && aMetric.GetInternalLeading() == 0 ) { OutputDevice* pDefaultDev = Application::GetDefaultDevice(); MapMode aOld = pDefaultDev->GetMapMode(); @@ -392,7 +392,7 @@ void ScDrawStringsVars::SetPattern( // if there is the leading 0 on a printer device, we have problems // -> take metric from the screen (as for EditEngine!) - if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && aMetric.GetIntLeading() == 0 ) + if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && aMetric.GetInternalLeading() == 0 ) { OutputDevice* pDefaultDev = Application::GetDefaultDevice(); MapMode aOld = pDefaultDev->GetMapMode(); -- cgit