diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 13:26:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-09 16:32:47 +0100 |
commit | c32bf48b7446808ffc47472021ec32cb7c70eea7 (patch) | |
tree | b815c1f528bc1630c6ee663e31e0e16a435f9c4b /sc | |
parent | 700ac29771ccec2d66934f66b45a33a48a5ac3f1 (diff) |
loplugin:fieldcast in XclObjOle
Change-Id: I255e94dfa1e0f336f78f6b8d470ae6aa2130196e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/xcl97rec.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index 78d173568e97..57210208ddad 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -33,6 +33,7 @@ class SdrCaptionObj; class SdrTextObj; class XclTxo; class XclEscherEx; +class SdrOle2Obj; class ScURLTransformer : public oox::drawingml::URLTransformer { @@ -237,13 +238,13 @@ class XclObjOle : public XclObj { private: - const SdrObject& rOleObj; + const SdrOle2Obj& rOleObj; SotStorage* pRootStorage; virtual void WriteSubRecs( XclExpStream& rStrm ) override; public: - XclObjOle( XclExpObjectManager& rObjMgr, const SdrObject& rObj ); + XclObjOle( XclExpObjectManager& rObjMgr, const SdrOle2Obj& rObj ); virtual ~XclObjOle() override; virtual void Save( XclExpStream& rStrm ) override; diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 07e3769e65b9..43538de6c889 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -217,7 +217,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape pCurrXclObj = nullptr; // no metafile or whatsoever } else // metafile and OLE object - pCurrXclObj = new XclObjOle( mrObjMgr, *pObj ); + pCurrXclObj = new XclObjOle( mrObjMgr, *static_cast<SdrOle2Obj*>(pObj) ); } else // just a metafile pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() ); diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index f9031449bf70..e9ae7bdeba42 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -996,7 +996,7 @@ std::size_t XclTxo::GetLen() const // --- class XclObjOle ------------------------------------------- -XclObjOle::XclObjOle( XclExpObjectManager& rObjMgr, const SdrObject& rObj ) : +XclObjOle::XclObjOle( XclExpObjectManager& rObjMgr, const SdrOle2Obj& rObj ) : XclObj( rObjMgr, EXC_OBJTYPE_PICTURE ), rOleObj( rObj ), pRootStorage( rObjMgr.GetRoot().GetRootStorage().get() ) @@ -1020,7 +1020,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) if( !xOleStg.is() ) return; - uno::Reference < embed::XEmbeddedObject > xObj( static_cast<const SdrOle2Obj&>(rOleObj).GetObjRef() ); + uno::Reference < embed::XEmbeddedObject > xObj( rOleObj.GetObjRef() ); if ( !xObj.is() ) return; @@ -1051,7 +1051,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // OBJFLAGS subrecord, undocumented as usual rStrm.StartRecord( EXC_ID_OBJFLAGS, 2 ); sal_uInt16 nFlags = EXC_OBJ_PIC_MANUALSIZE; - ::set_flag( nFlags, EXC_OBJ_PIC_SYMBOL, static_cast<const SdrOle2Obj&>(rOleObj).GetAspect() == embed::Aspects::MSOLE_ICON ); + ::set_flag( nFlags, EXC_OBJ_PIC_SYMBOL, rOleObj.GetAspect() == embed::Aspects::MSOLE_ICON ); rStrm << nFlags; rStrm.EndRecord(); |