sc/source/filter/inc/xcl97rec.hxx   |    5 +++--
 sc/source/filter/xcl97/xcl97esc.cxx |    2 +-
 sc/source/filter/xcl97/xcl97rec.cxx |    6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit c32bf48b7446808ffc47472021ec32cb7c70eea7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 8 13:26:15 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 9 16:32:47 2023 +0100

    loplugin:fieldcast in XclObjOle
    
    Change-Id: I255e94dfa1e0f336f78f6b8d470ae6aa2130196e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159210
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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();
 

Reply via email to