diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-03 09:57:24 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-08-07 17:39:57 +0200 |
commit | 1a6a05adf8b0f2620c0798e8c6811b08c80d0dea (patch) | |
tree | c53bb559010bf40bdb666814cfe9b49193e52eb9 /sd | |
parent | 679ab387954b2c8c00a8e9c9b6ad67a65fa432cd (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/58552
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
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 122262da6566..262abd6f399d 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -805,7 +805,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 ); @@ -1437,7 +1437,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 ); } @@ -2576,9 +2576,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 ) @@ -2586,9 +2586,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 ); } @@ -2723,7 +2723,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 f4b6de81d752..4ede9502d149 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -63,7 +63,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; |