Kaydet (Commit) d22964a9 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Paint drop cap background only once

Painting default background is unecessary when
there is a user defined background.

Change-Id: I6564f403f0f7769b5460b07d5f3947be08c0dbf6
üst cc7a94cf
......@@ -273,10 +273,6 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
{
if ( rInf.OnWin() &&
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
rInf.DrawBackground( *this );
OSL_ENSURE( nDropHeight && pPart && nLines != 1, "Drop Portion painted twice" );
const SwDropPortionPart* pCurrPart = GetPart();
......@@ -299,6 +295,13 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
((SwTxtPaintInfo&)rInf).SetLen( pCurrPart->GetLen() );
SwFontSave aFontSave( rInf, &pCurrPart->GetFont() );
if ( rInf.OnWin() &&
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() &&
(!pCurrPart->GetFont().GetBackColor() || *pCurrPart->GetFont().GetBackColor() == Color(COL_TRANSPARENT)) )
{
rInf.DrawBackground( *this );
}
SwTxtPortion::Paint( rInf );
((SwTxtPaintInfo&)rInf).SetIdx( rInf.GetIdx() + pCurrPart->GetLen() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment