[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source
Jan Holesovsky
kendy at collabora.com
Thu Jul 24 05:30:40 PDT 2014
sw/source/core/text/porrst.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 5a49362a9c75566568e18fff973635a53b9e594e
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Jul 24 12:06:11 2014 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 8aed6aa..68af074 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
}
}
More information about the Libreoffice-commits
mailing list