Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A56399914 for ; Fri, 8 Jun 2012 12:42:43 +0000 (UTC) Received: (qmail 80317 invoked by uid 500); 8 Jun 2012 12:42:42 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 80241 invoked by uid 500); 8 Jun 2012 12:42:42 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 80228 invoked by uid 99); 8 Jun 2012 12:42:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 12:42:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 12:42:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9A42823889E0; Fri, 8 Jun 2012 12:42:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1348044 - in /incubator/ooo/branches/AOO34: ./ main/ main/editeng/source/editeng/impedit3.cxx Date: Fri, 08 Jun 2012 12:42:20 -0000 To: ooo-commits@incubator.apache.org From: alg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120608124220.9A42823889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: alg Date: Fri Jun 8 12:42:20 2012 New Revision: 1348044 URL: http://svn.apache.org/viewvc?rev=1348044&view=rev Log: #119756# merged fix from trunk (r1348010) Modified: incubator/ooo/branches/AOO34/ (props changed) incubator/ooo/branches/AOO34/main/ (props changed) incubator/ooo/branches/AOO34/main/editeng/source/editeng/impedit3.cxx Propchange: incubator/ooo/branches/AOO34/ ------------------------------------------------------------------------------ Merged /incubator/ooo/trunk:r1348010 Propchange: incubator/ooo/branches/AOO34/main/ ------------------------------------------------------------------------------ Merged /incubator/ooo/trunk/main:r1348010 Modified: incubator/ooo/branches/AOO34/main/editeng/source/editeng/impedit3.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/editeng/source/editeng/impedit3.cxx?rev=1348044&r1=1348043&r2=1348044&view=diff ============================================================================== --- incubator/ooo/branches/AOO34/main/editeng/source/editeng/impedit3.cxx (original) +++ incubator/ooo/branches/AOO34/main/editeng/source/editeng/impedit3.cxx Fri Jun 8 12:42:20 2012 @@ -2899,6 +2899,9 @@ void ImpEditEngine::Paint( OutputDevice* sal_uInt16 nLines = pPortion->GetLines().Count(); sal_uInt16 nLastLine = nLines-1; + // #108052# + bool bEndOfParagraphWritten(false); + if ( !IsVertical() ) aStartPos.Y() += pPortion->GetFirstLineOffset(); else @@ -2909,7 +2912,9 @@ void ImpEditEngine::Paint( OutputDevice* const SvxLineSpacingItem& rLSItem = ((const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL )); sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; - for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) + bool bPaintBullet (false); + + for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) { pLine = pPortion->GetLines().GetObject(nLine); DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in UpdateViews" ); @@ -2930,7 +2935,7 @@ void ImpEditEngine::Paint( OutputDevice* if ( ( !IsVertical() && ( aStartPos.Y() > aClipRec.Top() ) ) || ( IsVertical() && aStartPos.X() < aClipRec.Right() ) ) { - bool bPaintBullet (false); + bPaintBullet = false; // Why not just also call when stripping portions? This will give the correct values // and needs no position corrections in OutlinerEditEng::DrawingText which tries to call @@ -2952,32 +2957,6 @@ void ImpEditEngine::Paint( OutputDevice* // -------------------------------------------------- nIndex = pLine->GetStart(); - // #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. - // #i118881#: Do not include the empty paragraph - // after a bullet. Otherwise the wrong paragraph - // indices will eventually find their way into - // metafiles and break the association between - // paragraphs and Impress animations. - if(!bPaintBullet && 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(), "Zeile ohne Textportion im Paint!" ); @@ -3325,6 +3304,12 @@ void ImpEditEngine::Paint( OutputDevice* &aLocale, aOverlineColor, aTextLineColor); + + // #108052# remember that EOP is written already for this ParaPortion + if(bEndOfParagraph) + { + bEndOfParagraphWritten = true; + } } else { @@ -3580,6 +3565,27 @@ void ImpEditEngine::Paint( OutputDevice* else aStartPos.X() -= nUL; } + + // #108052# Safer way for #i108052# and #i118881#: If for the current ParaPortion + // EOP is not written, do it now. This will be safer than before. It has shown + // that the reason for #i108052# was fixed/removed again, so this is a try to fix + // the number of paragraphs (and counting empty ones) now independent from the + // changes in EditEngine behaviour. + if(!bEndOfParagraphWritten && !bPaintBullet && bStripOnly) + { + 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); + } } else {