summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-07-17 19:09:34 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-07-26 07:16:40 +0200
commit318bbbfc9bad8c0e04306faade2dec956ff89d28 (patch)
treef89cc3cff4557e36439bb4bb36ccc55e8079b54d
parente992bd5090226fc4ee43606e0fe37fbbee0ca401 (diff)
Use SwTxtInfo height and ascent for portions
By now this is the same as the font's ascent and height but it can change. Change-Id: Ia40fed5d7a93f85b73b7fa019ec4ede9421d89d1
-rw-r--r--sw/source/core/text/itrform2.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 56dcbefea2f8..fcd49c15ba03 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -758,10 +758,8 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
{
// Numbering + InterNetFlds can keep an own font, then their size is
// independent from hard attribute values
- SwFont* pFldFnt = ((SwFldPortion*)pPor)->pFnt;
- SwFontSave aSave( rInf, pFldFnt );
- ((SwFldPortion*)pPor)->Height( pFldFnt->GetHeight( rInf.GetVsh(), *rInf.GetOut() ) );
- ((SwFldPortion*)pPor)->SetAscent( pFldFnt->GetAscent( rInf.GetVsh(), *rInf.GetOut() ) );
+ pPor->Height( rInf.GetTxtHeight() );
+ pPor->SetAscent( rInf.GetAscent() );
}
// #i89179#
// tab portion representing the list tab of a list label gets the
@@ -810,7 +808,7 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
bChg = SeekAndChg( rInf );
}
if( bChg || bFirstPor || !pPor->GetAscent()
- || !rInf.GetLast()->InTxtGrp() )
+ || !pLast->InTxtGrp() )
{
pPor->SetAscent( rInf.GetAscent() );
pPor->Height( rInf.GetTxtHeight() );