summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-24 14:29:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-25 08:12:17 +0200
commit4a340e36e8d3713806719351f455711c1254a178 (patch)
tree4be5ffdd176b2f45e4f549f7eb4d88da9225c18e /editeng
parenttdf#107945: Perhaps this will make this method thread-safe... (diff)
downloadcore-4a340e36e8d3713806719351f455711c1254a178.tar.gz
core-4a340e36e8d3713806719351f455711c1254a178.zip
loplugin:constantparam
add the results files so I can just see the diff in future Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1 Reviewed-on: https://gerrit.libreoffice.org/37988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/items/svxfont.cxx11
2 files changed, 7 insertions, 10 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index f002bb3c31c9..8bdc5101ab99 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -830,7 +830,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( IsFixedCellHeight() )
nTextLineHeight = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
else
- nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice(), OUString() ).Height();
+ nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice() ).Height();
// Metrics can be greater
FormatterFontMetric aTempFormatterMetrics;
RecalcFormatterFontMetrics( aTempFormatterMetrics, aTmpFont );
@@ -1339,7 +1339,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( IsFixedCellHeight() )
aTextSize.Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
else
- aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev, OUString() ).Height();
+ aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev ).Height();
pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
}
@@ -1669,7 +1669,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion )
aTmpFont.SetPhysFont( pRefDev );
TextPortion* pDummyPortion = new TextPortion( 0 );
- pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev, OUString() );
+ pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev );
if ( IsFixedCellHeight() )
pDummyPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
pParaPortion->GetTextPortions().Append(pDummyPortion);
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 33b267be1fb9..1cd3d491293f 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -377,20 +377,17 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt,
return aTxtSize;
}
-Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt )
+Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut )
{
if ( !IsCaseMap() && !IsKern() )
- return Size( pOut->GetTextWidth( rTxt ), pOut->GetTextHeight() );
+ return Size( pOut->GetTextWidth( "" ), pOut->GetTextHeight() );
Size aTxtSize;
aTxtSize.setHeight( pOut->GetTextHeight() );
if ( !IsCaseMap() )
- aTxtSize.setWidth( pOut->GetTextWidth( rTxt ) );
+ aTxtSize.setWidth( pOut->GetTextWidth( "" ) );
else
- aTxtSize.setWidth( pOut->GetTextWidth( CalcCaseMap( rTxt ) ) );
-
- if( IsKern() && ( rTxt.getLength() > 1 ) )
- aTxtSize.Width() += ( ( rTxt.getLength()-1 ) * long( nKern ) );
+ aTxtSize.setWidth( pOut->GetTextWidth( CalcCaseMap( "" ) ) );
return aTxtSize;
}