[Libreoffice-commits] core.git: sd/source

Sun Ying sunying at apache.org
Sun May 26 07:14:56 PDT 2013


 sd/source/filter/ppt/pptin.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 28f2af669f01cd304994f1907de0b61245b3d37a
Author: Sun Ying <sunying at apache.org>
Date:   Fri Aug 17 07:56:17 2012 +0000

    Resolves: #i119866# ppt default outline area bullet lost
    
    Reported by: Li Feng Wang
    Patch by: Ying Sun
    Review by: Jian Yuan Li
    (cherry picked from commit 8d04823a6038d32f6ac9821925616da7c5cc44c9)
    
    Conflicts:
    	filter/inc/filter/msfilter/svdfppt.hxx
    	sd/source/filter/ppt/pptin.cxx
    
    Change-Id: I222003a9e8d474ebc4dd9bc83cdcceded88a79f4

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 67a5e18..a543f5c 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2332,6 +2332,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                     sal_Bool    bVertical = sal_False;
                     if ( ( pTextObj->GetShapeType() == mso_sptRectangle ) || ( pTextObj->GetShapeType() == mso_sptTextBox ) )
                     {
+                        //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.
                         bEmptyPresObj = ( pTextObj->Count() == 0 ) || ( pTextObj->Count() == 1 && pTextObj->First()->GetTextSize() == 0 );
                         switch ( nPlaceholderId )
                         {
@@ -2393,6 +2395,16 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                             ApplyAttributes( rStCtrl, aSet );
                             pPresObj->SetLogicRect(pText->GetLogicRect());
                             ApplyTextAnchorAttributes( *pTextObj, 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 ) && ( nPlacementId != 0xffffffff ) )


More information about the Libreoffice-commits mailing list