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>
This commit is contained in:
parent
700ac29771
commit
c32bf48b74
3 changed files with 7 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue