diff options
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 4 | ||||
-rw-r--r-- | include/svx/sderitm.hxx | 11 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 4 |
8 files changed, 15 insertions, 20 deletions
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index fdc4d4ed5430..42b441eb52d3 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -479,7 +479,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) long nTmp = GetCoreValue( *m_pMtrRadius, ePoolUnit ); nTmp = Fraction( nTmp ) * aUIScale; - rAttrs->Put( SdrEckenradiusItem( nTmp ) ); + rAttrs->Put( makeSdrEckenradiusItem( nTmp ) ); bModified = true; } @@ -528,7 +528,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) if( pItem ) { const double fUIScale(double(pView->GetModel()->GetUIScale())); - const double fTmp((double)((const SdrEckenradiusItem*)pItem)->GetValue() / fUIScale); + const double fTmp((double)((const SdrMetricItem*)pItem)->GetValue() / fUIScale); SetMetricValue(*m_pMtrRadius, basegfx::fround(fTmp), ePoolUnit); } else diff --git a/include/svx/sderitm.hxx b/include/svx/sderitm.hxx index a6a22ec90de4..ad03621c50fb 100644 --- a/include/svx/sderitm.hxx +++ b/include/svx/sderitm.hxx @@ -22,14 +22,9 @@ #include <svx/sdmetitm.hxx> #include <svx/svddef.hxx> -/** - * class SdrEckenradiusItem - */ -class SdrEckenradiusItem: public SdrMetricItem { -public: - SdrEckenradiusItem(long nRadius=0): SdrMetricItem(SDRATTR_ECKENRADIUS,nRadius) {} - SdrEckenradiusItem(SvStream& rIn) : SdrMetricItem(SDRATTR_ECKENRADIUS,rIn) {} -}; +inline SdrMetricItem makeSdrEckenradiusItem(long nRadius) { + return SdrMetricItem(SDRATTR_ECKENRADIUS, nRadius); +} #endif diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ebd76dbc192c..ced9706fe4e2 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -431,7 +431,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) nSlotId == SID_DRAW_SQUARE_ROUND_NOFILL) { // round corner - rAttr.Put(SdrEckenradiusItem(500)); + rAttr.Put(makeSdrEckenradiusItem(500)); } else if (nSlotId == SID_CONNECTOR_LINE || nSlotId == SID_CONNECTOR_LINE_ARROW_START || diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 8a02658711fe..2ab01737f981 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -71,7 +71,7 @@ namespace sdr aObjectRange.getMinX(), aObjectRange.getMinY())); // calculate corner radius - sal_uInt32 nCornerRadius(((SdrEckenradiusItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue()); + sal_uInt32 nCornerRadius(((SdrMetricItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue()); double fCornerRadiusX; double fCornerRadiusY; drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index dc431195a03c..4dd3f7799579 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -139,7 +139,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ; mppLocalPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ; mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem; - mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrEckenradiusItem; + mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrMetricItem(SDRATTR_ECKENRADIUS, 0); mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0); mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true); mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem; diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 81b056406827..e776a7c513ba 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1386,11 +1386,11 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const } eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS); - long nRadius=((SdrEckenradiusItem&)(aMarkAttr.Get(SDRATTR_ECKENRADIUS))).GetValue(); + long nRadius=((SdrMetricItem&)(aMarkAttr.Get(SDRATTR_ECKENRADIUS))).GetValue(); if (eState==SFX_ITEM_DONTCARE) { aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS); } else if (eState==SFX_ITEM_SET) { - aRetSet.Put(SdrEckenradiusItem(nRadius)); + aRetSet.Put(makeSdrEckenradiusItem(nRadius)); } basegfx::B2DHomMatrix aTransformation; @@ -1593,8 +1593,8 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // corner radius if (bEdgeRadiusAllowed && SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) { - long nRadius=((SdrEckenradiusItem*)pPoolItem)->GetValue(); - aSetAttr.Put(SdrEckenradiusItem(nRadius)); + long nRadius=((SdrMetricItem*)pPoolItem)->GetValue(); + aSetAttr.Put(makeSdrEckenradiusItem(nRadius)); bSetAttr=true; } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index adb85752bb07..2da6c1b55238 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -735,7 +735,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaRoundRectAction& rAct) long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2; if (nRad!=0) { SfxItemSet aSet(*mpLineAttr->GetPool(), SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, 0, 0); - aSet.Put(SdrEckenradiusItem(nRad)); + aSet.Put(SdrMetricItem(nRad)); pRect->SetMergedItemSet(aSet); } InsertObj(pRect); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 7e339f2c8c7b..d74d9b0fec77 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -540,7 +540,7 @@ void SdrTextObj::SetModel(SdrModel* pNewModel) bool SdrTextObj::NbcSetEckenradius(long nRad) { - SetObjectItem(SdrEckenradiusItem(nRad)); + SetObjectItem(makeSdrEckenradiusItem(nRad)); return true; } @@ -1756,7 +1756,7 @@ bool SdrTextObj::IsRealyEdited() const long SdrTextObj::GetEckenradius() const { - return ((SdrEckenradiusItem&)(GetObjectItemSet().Get(SDRATTR_ECKENRADIUS))).GetValue(); + return ((SdrMetricItem&)(GetObjectItemSet().Get(SDRATTR_ECKENRADIUS))).GetValue(); } long SdrTextObj::GetMinTextFrameHeight() const |