From eff92f2501cf070cd912508b2ccc3c0108d0327c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 23 Mar 2011 16:30:13 +0100 Subject: aw084: #i108052# Added code to mimic old behaviour and call user layout link when empty paragraph is rendered --- editeng/source/editeng/impedit3.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 8f20f76e4be2..b27c89da53b8 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2944,6 +2944,27 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta sal_uInt16 nIndex = pLine->GetStart(); bool bParsingFields = false; ::std::vector< sal_Int32 >::iterator itSubLines; + + // #i108052# When stripping a callback for empty paragraphs is needed. This + // was somehow lost/removed/killed by making the TextPortions with empty + // paragraph to type PORTIONKIND_TAB instead of PORTIONKIND_TEXT. Adding here + // since I could not find out who and why this has changed. + if(bStripOnly && pLine->GetStartPortion() == pLine->GetEndPortion()) + { + const Color aOverlineColor(pOutDev->GetOverlineColor()); + const Color aTextLineColor(pOutDev->GetTextLineColor()); + + GetEditEnginePtr()->DrawingText( + aTmpPos, String(), 0, 0, 0, + aTmpFont, n, nIndex, 0, + 0, + 0, + false, true, false, // support for EOL/EOP TEXT comments + 0, + aOverlineColor, + aTextLineColor); + } + for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ ) { DBG_ASSERT( pPortion->GetTextPortions().Count(), "Line without Textportion in Paint!" ); -- cgit