summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-07-24 12:06:11 +0200
committerJan Holesovsky <kendy@collabora.com>2014-07-24 12:15:49 +0200
commitc8aa8226962db6ddbca6bfec8e415dfd5ecdda6f (patch)
treed850c64a00cf5be01f70755ee4c0fdfb886c3102
parent7b138fcb0cc3343196f4ffe7504da537f3d1ec89 (diff)
fdo#80721: Use the old way of drawing the pilcrow (but with changed color).
This fixes the reported problem (that the pilcrow stopped showning for centered paragraphs), and additionally makes the pilcrow large for large paragraphs (like titles) again. Change-Id: I78d9986c0da6abfb9936984bb8b72d5eba88c9d7
-rw-r--r--sw/source/core/text/porrst.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 56280f323ac1..5c80ebd913b0 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -59,9 +59,18 @@ SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion )
void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
- if( rInf.OnWin() && rInf.GetOpt().IsParagraph() )
+ if (rInf.OnWin() && rInf.GetOpt().IsParagraph())
{
- rInf.DrawSpecial( *this, CH_PAR, Color(NON_PRINTING_CHARACTER_COLOR) );
+ const SwFont* pOldFnt = rInf.GetFont();
+
+ SwFont aFont(*pOldFnt);
+ aFont.SetColor(NON_PRINTING_CHARACTER_COLOR);
+ const_cast<SwTxtPaintInfo&>(rInf).SetFont(&aFont);
+
+ // draw the pilcrow
+ rInf.DrawText(OUString(CH_PAR), *this);
+
+ const_cast<SwTxtPaintInfo&>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
}
}