diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-03 09:57:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-03 15:04:53 +0200 |
commit | a61b4c214b8acfcdddd2f5203184468e329bdb92 (patch) | |
tree | 6fec90f7a394852d719dbc8ac1bf22728e6af129 /sd | |
parent | ea59fc4831b9d2430de51faa8c3e0a24e6d90cd1 (diff) |
forcepoint#70 give all escher client data objects a common parent class
and make NotifyFreeObj a virtual method of SvxMSDffClientData, finding
the sc case where the client data was neither SvxMSDffImportData nor
ProcessData.
make the sc case a XclImpDrawObjClientData whose NotifyFreeObj is a noop
Change-Id: I07422e7a3415114674bb1e3c1ef120299adf2dc8
Reviewed-on: https://gerrit.libreoffice.org/58551
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 16 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.hxx | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 17de2095157f..9ffb861d59f7 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -809,7 +809,7 @@ bool ImplSdPPTImport::Import() ::tools::Rectangle aEmpty; if (!aHd2.SeekToBegOfRecord(rStCtrl)) break; - SdrObject* pImpObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty, /*nCalledByGroup*/0, /*pShapeId*/ nullptr ); + SdrObject* pImpObj = ImportObj( rStCtrl, aProcessData, aEmpty, aEmpty, /*nCalledByGroup*/0, /*pShapeId*/ nullptr ); if ( pImpObj ) { pImpObj->SetLayer( mnBackgroundObjectsLayerID ); @@ -1441,7 +1441,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide bVisible = false; rStCtrl.Seek( nPosition ); ProcessData aProcessData( rSlidePersist, SdPageCapsule(pPage) ); - SdrObject* pObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty, /*nCalledByGroup*/0, /*pShapeId*/nullptr ); + SdrObject* pObj = ImportObj( rStCtrl, aProcessData, aEmpty, aEmpty, /*nCalledByGroup*/0, /*pShapeId*/nullptr ); if ( pObj ) pPage->NbcInsertObject( pObj, 0 ); } @@ -2579,9 +2579,9 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj return pRet; } -SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pRet ) +SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, SvxMSDffClientData& rData, ::tools::Rectangle& rTextRect, SdrObject* pRet ) { - SdrObject* pObj = SdrPowerPointImport::ProcessObj( rSt, rObjData, pData, rTextRect, pRet ); + SdrObject* pObj = SdrPowerPointImport::ProcessObj( rSt, rObjData, rData, rTextRect, pRet ); // read animation effect of object if ( pObj ) @@ -2589,9 +2589,9 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi // further setup placeholder objects if (dynamic_cast<const SdrPageObj*>(pObj)) { - const ProcessData* pProcessData=static_cast<const ProcessData*>(pData); - if( pProcessData->pPage.page ) - static_cast<SdPage *>(pProcessData->pPage.page)->InsertPresObj( + const ProcessData& rProcessData=static_cast<const ProcessData&>(rData); + if(rProcessData.pPage.page) + static_cast<SdPage *>(rProcessData.pPage.page)->InsertPresObj( pObj, PRESOBJ_PAGE ); } @@ -2726,7 +2726,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi if ( bInhabitanceChecked || bAnimationInfoFound ) break; bInhabitanceChecked = true; - if ( ! ( IsProperty( DFF_Prop_hspMaster ) && SeekToShape( rSt, pData, GetPropertyValue( DFF_Prop_hspMaster, 0 ) ) ) ) + if ( ! ( IsProperty( DFF_Prop_hspMaster ) && SeekToShape( rSt, &rData, GetPropertyValue( DFF_Prop_hspMaster, 0 ) ) ) ) break; ReadDffRecordHeader( rSt, aMasterShapeHd ); if ( !SeekToRec( rSt, DFF_msofbtClientData, aMasterShapeHd.GetRecEndFilePos(), &aMasterShapeHd ) ) diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index b620836b8791..e63bd323e9af 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -61,7 +61,7 @@ class ImplSdPPTImport : public SdrPowerPointImport void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom const * pIAtom, const OUString& aMacroName ); - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pObj ) override; + virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, SvxMSDffClientData& rClientData, ::tools::Rectangle& rTextRect, SdrObject* pObj ) override; virtual SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPageCapsule pPage, SfxStyleSheet*, SfxStyleSheet** ) const override; |