summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-06 12:54:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-06 12:54:53 +0200
commit14ac70c74a9abd62936db74d825ab9d3375f2504 (patch)
treebccb11f46b3a158498fecc67f99e12681026215a /svx
parent3efa3ad7b6de78c291f49858e50e6bedbd6a2173 (diff)
Consistency around SdrMetricItem in svx/sxelditm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in 6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." (SdrEdgeLine1DeltaItem::Clone had been recently---and in retrospect needlessly ---introduced in 596ec6f52fe3a8d56d5c20df568633cfbcadc74d "Missing SdrEdgeLine1DeltaItem::Clone override" before 3efa3ad7b6de78c291f49858e50e6bedbd6a2173 "SdrEdgreLine*DeltaItem::Put/QueryValue are same as underlying" revealed that SdrEdgeLine1DeltaItem was a needless derivation of SdrMetricItem.) Change-Id: I154d32d46a7c01c792aa4e812cf576d4d749e0c9
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdattr.cxx11
-rw-r--r--svx/source/svdraw/svdoedge.cxx18
2 files changed, 12 insertions, 17 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 37e89ee243e4..bf296e08d9f0 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -180,9 +180,9 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem;
mppLocalPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem;
mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaAnzItem;
- mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrEdgeLine1DeltaItem;
- mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrEdgeLine2DeltaItem;
- mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrEdgeLine3DeltaItem;
+ mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0);
+ mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0);
+ mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0);
mppLocalPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem;
@@ -1747,11 +1747,6 @@ bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
-SfxPoolItem * SdrEdgeLine1DeltaItem::Clone(SfxItemPool *) const
-{
- return new SdrEdgeLine1DeltaItem(*this);
-}
-
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Measure
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index c25513de3c6f..caca40f780ab 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -194,9 +194,9 @@ void SdrEdgeObj::ImpSetAttrToEdgeInfo()
{
const SfxItemSet& rSet = GetObjectItemSet();
SdrEdgeKind eKind = ((SdrEdgeKindItem&)(rSet.Get(SDRATTR_EDGEKIND))).GetValue();
- sal_Int32 nVal1 = ((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
- sal_Int32 nVal2 = ((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
- sal_Int32 nVal3 = ((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+ sal_Int32 nVal1 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+ sal_Int32 nVal2 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+ sal_Int32 nVal3 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
if(eKind == SDREDGE_ORTHOLINES || eKind == SDREDGE_BEZIER)
{
@@ -265,9 +265,9 @@ void SdrEdgeObj::ImpSetEdgeInfoToAttr()
const SfxItemSet& rSet = GetObjectItemSet();
SdrEdgeKind eKind = ((SdrEdgeKindItem&)(rSet.Get(SDRATTR_EDGEKIND))).GetValue();
sal_Int32 nValAnz = ((SdrEdgeLineDeltaAnzItem&)rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
- sal_Int32 nVal1 = ((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
- sal_Int32 nVal2 = ((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
- sal_Int32 nVal3 = ((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+ sal_Int32 nVal1 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+ sal_Int32 nVal2 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+ sal_Int32 nVal3 = ((SdrMetricItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
sal_Int32 nVals[3] = { nVal1, nVal2, nVal3 };
sal_uInt16 n = 0;
@@ -323,17 +323,17 @@ void SdrEdgeObj::ImpSetEdgeInfoToAttr()
if(nVals[0] != nVal1)
{
- GetProperties().SetObjectItemDirect(SdrEdgeLine1DeltaItem(nVals[0]));
+ GetProperties().SetObjectItemDirect(makeSdrEdgeLine1DeltaItem(nVals[0]));
}
if(nVals[1] != nVal2)
{
- GetProperties().SetObjectItemDirect(SdrEdgeLine2DeltaItem(nVals[1]));
+ GetProperties().SetObjectItemDirect(makeSdrEdgeLine2DeltaItem(nVals[1]));
}
if(nVals[2] != nVal3)
{
- GetProperties().SetObjectItemDirect(SdrEdgeLine3DeltaItem(nVals[2]));
+ GetProperties().SetObjectItemDirect(makeSdrEdgeLine3DeltaItem(nVals[2]));
}
if(n < 3)