summaryrefslogtreecommitdiff
path: root/include/filter/msfilter/msdffimp.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-03 09:57:24 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-08-07 17:39:57 +0200
commit1a6a05adf8b0f2620c0798e8c6811b08c80d0dea (patch)
treec53bb559010bf40bdb666814cfe9b49193e52eb9 /include/filter/msfilter/msdffimp.hxx
parent679ab387954b2c8c00a8e9c9b6ad67a65fa432cd (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 'include/filter/msfilter/msdffimp.hxx')
-rw-r--r--include/filter/msfilter/msdffimp.hxx32
1 files changed, 20 insertions, 12 deletions
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 41f5ce32ae0f..2a1435e4cca0 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -72,6 +72,13 @@ namespace com { namespace sun { namespace star {
namespace embed { class XStorage; }
} } }
+class MSFILTER_DLLPUBLIC SvxMSDffClientData
+{
+public:
+ virtual void NotifyFreeObj(SdrObject* pObj) = 0;
+ virtual ~SvxMSDffClientData() {}
+};
+
class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet
{
const SvxMSDffManager& rManager;
@@ -98,9 +105,9 @@ public:
static sal_Int32 Fix16ToAngle( sal_Int32 nAngle );
#ifdef DBG_CUSTOMSHAPE
- void ReadPropSet( SvStream& rIn, void* pClientData, sal_uInt32 nShapeType = 0 ) const;
+ void ReadPropSet( SvStream& rIn, SvxMSDffClientData* pClientData, sal_uInt32 nShapeType = 0 ) const;
#else
- void ReadPropSet( SvStream& rIn, void* pClientData ) const;
+ void ReadPropSet( SvStream& rIn, SvxMSDffClientData* pClientData ) const;
#endif
void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const;
@@ -264,7 +271,7 @@ private:
/** block of parameters for import/export for a single call of
ImportObjAtCurrentStreamPos() */
-class MSFILTER_DLLPUBLIC SvxMSDffImportData
+class MSFILTER_DLLPUBLIC SvxMSDffImportData : public SvxMSDffClientData
{
private:
/** list of all SvxMSDffImportRec instances of/for a group */
@@ -279,7 +286,7 @@ public:
explicit SvxMSDffImportData(const tools::Rectangle& rParentRect);
SvxMSDffImportData& operator=( SvxMSDffImportData const & ) = delete; // MSVC2015 workaround
SvxMSDffImportData( SvxMSDffImportData const & ) = delete; // MSVC2015 workaround
- ~SvxMSDffImportData();
+ virtual ~SvxMSDffImportData() override;
bool empty() const { return m_Records.empty(); }
void insert(SvxMSDffImportRec* pImpRec);
void unmap(const SdrObject* pObj) { m_ObjToRecMap.erase(pObj); }
@@ -288,6 +295,7 @@ public:
SvxMSDffImportRec* find(const SdrObject* pObj);
MSDffImportRecords::const_iterator begin() const { return m_Records.begin(); }
MSDffImportRecords::const_iterator end() const { return m_Records.end(); }
+ virtual void NotifyFreeObj(SdrObject* pObj) override;
};
struct DffObjData
@@ -498,18 +506,18 @@ protected:
sal_uInt32& rBuffLen );
virtual void ProcessClientAnchor2( SvStream& rStData,
DffRecordHeader& rHd,
- void* pData, DffObjData& );
+ SvxMSDffClientData& rData, DffObjData& );
static bool ProcessClientData( SvStream& rStData,
sal_uInt32 nDatLen,
std::unique_ptr<char[]>& rpBuff,
sal_uInt32& rBuffLen );
virtual SdrObject* ProcessObj( SvStream& rSt,
DffObjData& rData,
- void* pData,
+ SvxMSDffClientData& rClientData,
tools::Rectangle& rTextRect,
SdrObject* pObj);
- virtual void NotifyFreeObj(void* pData, SdrObject* pObj);
- void FreeObj(void* pData, SdrObject* pObj);
+ virtual void NotifyFreeObj(SvxMSDffClientData& rData, SdrObject* pObj);
+ void FreeObj(SvxMSDffClientData& rData, SdrObject* pObj);
/** Object finalization, used by the Excel filter to correctly
@@ -551,7 +559,7 @@ public:
Color MSO_CLR_ToColor( sal_uInt32 nColorCode,
sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
virtual bool SeekToShape( SvStream& rSt,
- void* pClientData,
+ SvxMSDffClientData* pClientData,
sal_uInt32 nId ) const;
static bool SeekToRec( SvStream& rSt,
sal_uInt16 nRecId,
@@ -660,21 +668,21 @@ public:
bool GetShape(sal_uLong nId, SdrObject*& rpData, SvxMSDffImportData& rData);
SdrObject* ImportObj( SvStream& rSt,
- void* pData,
+ SvxMSDffClientData& rData,
tools::Rectangle& rClientRect,
const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup,
sal_Int32* pShapeId);
SdrObject* ImportGroup( const DffRecordHeader& rHd,
SvStream& rSt,
- void* pData,
+ SvxMSDffClientData& rData,
tools::Rectangle& rClientRect,
const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup,
sal_Int32* pShapeId );
SdrObject* ImportShape( const DffRecordHeader& rHd,
SvStream& rSt,
- void* pData,
+ SvxMSDffClientData& rData,
tools::Rectangle& rClientRect,
const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup,