You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ch...@apache.org on 2012/09/12 08:25:25 UTC

svn commit: r1383798 - /incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx

Author: chengjh
Date: Wed Sep 12 06:25:24 2012
New Revision: 1383798

URL: http://svn.apache.org/viewvc?rev=1383798&view=rev
Log:
Fix issue #i120864: Text is overlapped by the drawing object when open the .doc file

* sw/source/core/text/itrform2.cxx
   Core function

Patch by: Jane Kang,<ka...@gmail.com>
Found by: Yan Ji,<ya...@gmail.com>
Review by: Jian Hong Cheng,<ch...@apache.org>

Modified:
    incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx

Modified: incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx?rev=1383798&r1=1383797&r2=1383798&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/text/itrform2.cxx Wed Sep 12 06:25:24 2012
@@ -1572,7 +1572,11 @@ xub_StrLen SwTxtFormatter::FormatLine( c
         pCurr->CalcLine( *this, GetInfo() );
 		CalcRealHeight( GetInfo().IsNewLine() );
 
-		if ( IsFlyInCntBase() && !IsQuick() )
+		//Bug 120864:For Special case that at the first caculation couldn't get correct height. And need to recaculate for the right height.
+		SwLinePortion* pPorTmp = pCurr->GetPortion();
+		if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
+			pCurr->Height() > pPorTmp->Height())))
+		//Bug 120864(End)
 		{
 			KSHORT nTmpAscent, nTmpHeight;
 			CalcAscentAndHeight( nTmpAscent, nTmpHeight );