diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-07-23 13:14:53 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-07-23 20:20:01 +0200 |
commit | 1f47b46959267a25195d4f3f5602ca638bb14c58 (patch) | |
tree | c3c4080e24fa996c3bd17c725830c05c8d7ff8c2 | |
parent | c8b4ffc2adcc744c0d7d5e68944439238828692b (diff) |
Fix drop caps background
Background were shifted upwards with the descent
of the character and so the default grey background
hanged out under the user added background.
Examples: A (no descent), S (small descent)
Q (big descent)
Change-Id: I044fc63cf9988152e7b6aa4042bcf14651e097c0
-rw-r--r-- | sw/source/core/text/txtdrop.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index d61ca5ce0f19..d708cc67c2c0 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -281,9 +281,11 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const const SwDropPortionPart* pCurrPart = GetPart(); const xub_StrLen nOldLen = GetLen(); + const KSHORT nOldAscent = GetAscent(); const SwTwips nBasePosY = rInf.Y(); ((SwTxtPaintInfo&)rInf).Y( nBasePosY + nY ); + ((SwDropPortion*)this)->SetAscent( nOldAscent + nY ); SwDropSave aSave( rInf ); // for text inside drop portions we let vcl handle the text directions SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() ); @@ -304,6 +306,7 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const ((SwTxtPaintInfo&)rInf).Y( nBasePosY ); ((SwDropPortion*)this)->SetLen( nOldLen ); + ((SwDropPortion*)this)->SetAscent( nOldAscent ); } /************************************************************************* |