From 79f4b7a7c462f37ec87ce666334f2435cfde0968 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 18 Nov 2015 17:30:39 +0100 Subject: svx: SdrEdgeNode1HorzDistItem etc. missing Clone overrides Change-Id: I2bc2de3c3a71dd54e432905c129a3dbd5395f6ab --- include/svx/sxenditm.hxx | 6 ++++++ svx/source/svdraw/svdattr.cxx | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/include/svx/sxenditm.hxx b/include/svx/sxenditm.hxx index 033ecfdbb1d6..87cd2ac397a2 100644 --- a/include/svx/sxenditm.hxx +++ b/include/svx/sxenditm.hxx @@ -29,6 +29,7 @@ public: SdrEdgeNode1HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,rIn) {} virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SVX_DLLPUBLIC SdrEdgeNode1VertDistItem: public SdrMetricItem { @@ -37,6 +38,7 @@ public: SdrEdgeNode1VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,rIn) {} virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SVX_DLLPUBLIC SdrEdgeNode2HorzDistItem: public SdrMetricItem { @@ -45,6 +47,7 @@ public: SdrEdgeNode2HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,rIn) {} virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SVX_DLLPUBLIC SdrEdgeNode2VertDistItem: public SdrMetricItem { @@ -53,18 +56,21 @@ public: SdrEdgeNode2VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,rIn) {} virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SdrEdgeNode1GlueDistItem: public SdrMetricItem { public: SdrEdgeNode1GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {} SdrEdgeNode1GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SdrEdgeNode2GlueDistItem: public SdrMetricItem { public: SdrEdgeNode2GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {} SdrEdgeNode2GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; }; #endif diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 6fff9744b280..05fe6fe6a277 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1655,6 +1655,11 @@ bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb return true; } +SfxPoolItem* SdrEdgeNode1HorzDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode1HorzDistItem(*this); +} + bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); @@ -1671,6 +1676,11 @@ bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb return true; } +SfxPoolItem* SdrEdgeNode1VertDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode1VertDistItem(*this); +} + bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); @@ -1687,6 +1697,11 @@ bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb return true; } +SfxPoolItem* SdrEdgeNode2HorzDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode2HorzDistItem(*this); +} + bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); @@ -1703,6 +1718,20 @@ bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb return true; } +SfxPoolItem* SdrEdgeNode2VertDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode2VertDistItem(*this); +} + +SfxPoolItem* SdrEdgeNode1GlueDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode1GlueDistItem(*this); +} + +SfxPoolItem* SdrEdgeNode2GlueDistItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SdrEdgeNode2GlueDistItem(*this); +} SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); } -- cgit