From f277d0c88a478917002b4da370cc170b29a219ed Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Thu, 22 Dec 2011 23:46:02 +0100 Subject: Correctly handle empty paragraphs in slideshow animation fdo#43684 Fix a problem with empty paragraphs, that previously did not get proper end-of-para / end-of-line markup, thus the slideshow mis- counting them when getting index-based animation targets. --- editeng/source/editeng/impedit3.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 7c0ae4914c99..ffdd294a9fe1 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3455,6 +3455,27 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta aOverlineColor, aTextLineColor); } } + else if ( bStripOnly ) + { + // #i108052# When stripping, a callback for _empty_ paragraphs is also needed. + // This was optimized away (by not rendering the space-only tab portion), so do + // it manually here. + const bool bEndOfLine(y == pLine->GetEndPortion()); + const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines); + + const Color aOverlineColor(pOutDev->GetOverlineColor()); + const Color aTextLineColor(pOutDev->GetTextLineColor()); + + GetEditEnginePtr()->DrawingText( + aTmpPos, String(), 0, 0, 0, + aTmpFont, n, nIndex, 0, + 0, + 0, + bEndOfLine, bEndOfParagraph, false, + 0, + aOverlineColor, + aTextLineColor); + } } break; } -- cgit