incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangz...@apache.org
Subject svn commit: r1381878 - /incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx
Date Fri, 07 Sep 2012 05:23:43 GMT
Author: wangzcdl
Date: Fri Sep  7 05:23:42 2012
New Revision: 1381878

URL: http://svn.apache.org/viewvc?rev=1381878&view=rev
Log:
 Fix issue #i119962#: [From Symphony]Placeholder in ppt file created by MS 2007 is lost if
load in Impress. 
   * subversion/main/sd/source/filter/ppt/pptin.cxx
     []Set the empty text object a placeholder.

   Patch by: Tang Meng <tmyl2010@gmail.com>
   Suggested by: Wang Zhe <kingwisemmx@gmail.com>
   Found by: Yan Ji <yanji.yj@gmail.com>
   Review by: Wang Zhe <kingwisemmx@gmail.com>

Modified:
    incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx

Modified: incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx?rev=1381878&r1=1381877&r2=1381878&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx Fri Sep  7 05:23:42 2012
@@ -2385,7 +2385,11 @@ SdrObject* ImplSdPPTImport::ApplyTextObj
 							break;
 					}
 				}
-				if ( i < 8 )
+// [Bug 119962] Placeholder in ppt file created by MS 2007 is lost if load in Impress 
+				unsigned int nParaCount = pTextObj->Count();
+				PPTParagraphObj *pFirstPara = nParaCount == 0 ? NULL : pTextObj->First();
+				unsigned int nFirstParaTextcount = pFirstPara == NULL ? 0 : pFirstPara->GetTextSize();
+				if ( i < 8 || (nParaCount == 1 && nFirstParaTextcount == 0 || nParaCount ==
0))
 				{
 					PresObjKind ePresObjKind = PRESOBJ_NONE;
 					sal_Bool    bEmptyPresObj = sal_True;



Mime
View raw message