incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1359174 - /incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx
Date Mon, 09 Jul 2012 13:59:07 GMT
Author: af
Date: Mon Jul  9 13:59:06 2012
New Revision: 1359174

URL: http://svn.apache.org/viewvc?rev=1359174&view=rev
Log:
#i119545# Fixed import of master page layout from PPT.

          Reported by: Li Feng Wang
          Patch by: SunYing
          Review by: Andre Fischer

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=1359174&r1=1359173&r2=1359174&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/ppt/pptin.cxx Mon Jul  9 13:59:06 2012
@@ -643,12 +643,13 @@ sal_Bool ImplSdPPTImport::Import()
 					{
 						sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE;
 						sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY;
-//						sal_Bool bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE;
-//						if ( bSwapStyleSheet )
-//						{
-//							nTitleInstance = TSS_TYPE_TITLE;
-//							nOutlinerInstance = TSS_TYPE_SUBTITLE;
-//						}
+                        const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
+						sal_Bool bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE;
+						if ( bSwapStyleSheet )
+						{
+							nTitleInstance = TSS_TYPE_TITLE;
+							nOutlinerInstance = TSS_TYPE_SUBTITLE;
+						}
 						/////////////////////
 						// titelstylesheet //
 						/////////////////////
@@ -2316,7 +2317,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj
 	{
 		if ( eAktPageKind == PPT_MASTERPAGE )
 		{
-			sal_Bool bCreatePlaceHolder = ( pTextObj->GetInstance() != TSS_TYPE_SUBTITLE ) &&
( pTextObj->GetInstance() != TSS_TYPE_UNUSED );
+			sal_Bool bCreatePlaceHolder = ( pTextObj->GetInstance() != TSS_TYPE_UNUSED );
 			sal_Bool bIsHeaderFooter = ( ePresKind == PRESOBJ_HEADER) || (ePresKind == PRESOBJ_FOOTER)
 										|| (ePresKind == PRESOBJ_DATETIME) || (ePresKind == PRESOBJ_SLIDENUMBER);
 			if ( bCreatePlaceHolder && ( pTextObj->GetInstance() == TSS_TYPE_TEXT_IN_SHAPE
) )
@@ -2348,6 +2349,11 @@ SdrObject* ImplSdPPTImport::ApplyTextObj
 						rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST
) );
 						rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST
) );
 						rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST
) );
+						if (  pTextObj->GetInstance() ==  TSS_TYPE_TITLE 
+							|| pTextObj->GetInstance() == TSS_TYPE_SUBTITLE)
+						{
+							rItemSet.Put( pText->GetMergedItemSet() );
+						}					
 					}
 					pText->NbcSetStyleSheet( pSheet2, sal_False );
 				}



Mime
View raw message