diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-07-24 12:06:11 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-24 12:30:13 +0000 |
commit | 5a49362a9c75566568e18fff973635a53b9e594e (patch) | |
tree | 93e72ab45d005789c6c477dcd7bbdf7c3733201d | |
parent | 5329610454d149af3e5afde0d50e5129980da879 (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
Reviewed-on: https://gerrit.libreoffice.org/10501
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/text/porrst.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 8aed6aacbf41..68af0743eb68 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -59,13 +59,22 @@ SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion ) void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const { - if( rInf.OnWin() && rInf.GetOpt().IsParagraph() ) + if (rInf.OnWin() && rInf.GetOpt().IsParagraph()) { #ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY const OUString aTmp( CH_PAR ); rInf.DrawText( aTmp, *this ); #else - 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)); #endif } } |