Kaydet (Commit) aac0ada9 authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Xisco Fauli

Fix #i119545# Fixed import of master page layout from PPT.

Reported by: Li Feng Wang
Patch by: SunYing
Review by: Andre Fischer
(cherry picked from commit f7da26f5)

Conflicts:
	sd/source/filter/ppt/pptin.cxx

Change-Id: Ic946de22b3f7ab1d498e71f3d5752ad6f89e2de5
üst d35004bf
...@@ -627,7 +627,13 @@ sal_Bool ImplSdPPTImport::Import() ...@@ -627,7 +627,13 @@ sal_Bool ImplSdPPTImport::Import()
{ {
sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE; sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE;
sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY; sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY;
const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
sal_Bool bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE;
if ( bSwapStyleSheet )
{
nTitleInstance = TSS_TYPE_TITLE;
nOutlinerInstance = TSS_TYPE_SUBTITLE;
}
///////////////////// /////////////////////
// titelstylesheet // // titelstylesheet //
///////////////////// /////////////////////
...@@ -994,7 +1000,6 @@ sal_Bool ImplSdPPTImport::Import() ...@@ -994,7 +1000,6 @@ sal_Bool ImplSdPPTImport::Import()
if( pStbMgr ) if( pStbMgr )
pStbMgr->SetState( nImportedPages++ ); pStbMgr->SetState( nImportedPages++ );
} }
//////////////
} }
else else
{ {
...@@ -2261,7 +2266,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj ...@@ -2261,7 +2266,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{ {
if ( eAktPageKind == PPT_MASTERPAGE ) 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) sal_Bool bIsHeaderFooter = ( ePresKind == PRESOBJ_HEADER) || (ePresKind == PRESOBJ_FOOTER)
|| (ePresKind == PRESOBJ_DATETIME) || (ePresKind == PRESOBJ_SLIDENUMBER); || (ePresKind == PRESOBJ_DATETIME) || (ePresKind == PRESOBJ_SLIDENUMBER);
if ( bCreatePlaceHolder && ( pTextObj->GetInstance() == TSS_TYPE_TEXT_IN_SHAPE ) ) if ( bCreatePlaceHolder && ( pTextObj->GetInstance() == TSS_TYPE_TEXT_IN_SHAPE ) )
...@@ -2293,6 +2298,11 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj ...@@ -2293,6 +2298,11 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) ); rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) ); rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) );
rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) ); 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 ); pText->NbcSetStyleSheet( pSheet2, sal_False );
} }
...@@ -2649,7 +2659,6 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi ...@@ -2649,7 +2659,6 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
} }
maAnimations[pMediaObj] = pAnimation; maAnimations[pMediaObj] = pAnimation;
} }
//--
SdrObject::Free( pObj ), pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list SdrObject::Free( pObj ), pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list
pMediaObj->setURL( aMediaURL ); pMediaObj->setURL( aMediaURL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment