incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suny...@apache.org
Subject svn commit: r1374179 - in /incubator/ooo/trunk/main: filter/inc/filter/msfilter/svdfppt.hxx sd/source/filter/ppt/pptin.cxx
Date Fri, 17 Aug 2012 08:56:17 GMT
Author: sunying
Date: Fri Aug 17 08:56:17 2012
New Revision: 1374179

URL: http://svn.apache.org/viewvc?rev=1374179&view=rev
Log:
#119866# fix the bullet in default outline area lost when open .ppt file
Reported by: Li Feng Wang 
Patch by: Ying Sun
Review by: Jian Yuan Li

Modified:
    incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx
    incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx

Modified: incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx?rev=1374179&r1=1374178&r2=1374179&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx (original)
+++ incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx Fri Aug 17 08:56:17 2012
@@ -1095,7 +1095,7 @@ struct ImplPPTTextObj
 	ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry
) {};
 };
 
-class PPTTextObj
+class MSFILTER_DLLPUBLIC PPTTextObj
 {
 		ImplPPTTextObj*			mpImplTextObj;
 		void					ImplClear();

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=1374179&r1=1374178&r2=1374179&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx Fri Aug 17 08:56:17 2012
@@ -2392,7 +2392,10 @@ SdrObject* ImplSdPPTImport::ApplyTextObj
                     sal_Bool    bVertical = sal_False;
 					if ( ( pTextObj->GetShapeType() == mso_sptRectangle ) || ( pTextObj->GetShapeType()
== mso_sptTextBox ) )
 					{
-						if ( pTextObj->Count() )
+						//if a placeholder with some custom attribute,the pTextObj will keep those attr,whose
text size is zero,
+						//so sdPage should renew a PresObj to process placeholder.
+						if ( pTextObj->Count() > 1 || 
+							( pTextObj->Count() == 1 &&(pTextObj->First()) && pTextObj->First()->GetTextSize()>0
))
 							bEmptyPresObj = sal_False;
 						switch ( nPlaceholderId )
 						{
@@ -2454,7 +2457,17 @@ SdrObject* ImplSdPPTImport::ApplyTextObj
                             ApplyAttributes( rStCtrl, aSet );
                             pPresObj->SetLogicRect(pText->GetLogicRect());
                             ApplyTextAnchorAttributes( *pTextObj, aSet );
-                            pPresObj->SetMergedItemSet(aSet);
+							//set custom font attribute of the placeholder 
+							if ( pTextObj->Count() == 1 )
+							{
+								PPTParagraphObj* pPara = pTextObj->First();
+								PPTPortionObj* pPor = NULL;
+								if ( pPara && pPara->GetTextSize() == 0 && (pPor = pPara->First()))
+								{
+									pPor->ApplyTo(aSet, (SdrPowerPointImport&)*this, pTextObj->GetDestinationInstance());
+								}
+							}
+							pPresObj->SetMergedItemSet(aSet);
 
 							if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( pSlideLayout->aPlacementId[
i ] != (sal_uLong)-1 ) )
 							{



Mime
View raw message