diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-20 15:04:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-21 07:20:49 +0100 |
commit | 1bbd5a1f907f6ee86f060c3c4bcd0a4ab25e5aa0 (patch) | |
tree | eecc2717964d1b8604898228ca09bb11ac70f4ef /svx/source/svdraw | |
parent | 0220520609b7e67fdbe22e641d9dd5c027ee3d75 (diff) |
TypedWhichId for SDRATTR* constants (2)
Change-Id: I9926d55568f8b5bbc67f448bbf7fb660e74505fd
Reviewed-on: https://gerrit.libreoffice.org/44964
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 26 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 24 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 34 |
5 files changed, 49 insertions, 49 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 5f134d591fb0..052db16b48ea 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -3840,7 +3840,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) return false; } - const SdrGrafCropItem& rOldCrop = static_cast<const SdrGrafCropItem&>(pObj->GetMergedItem(SDRATTR_GRAFCROP)); + const SdrGrafCropItem& rOldCrop = pObj->GetMergedItem(SDRATTR_GRAFCROP); double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / (double)aOldRect.GetWidth(); double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / (double)aOldRect.GetHeight(); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 2b03fa71b1ec..5024e265de67 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -1056,7 +1056,7 @@ void SdrCircObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) void SdrCircObj::ImpSetAttrToCircInfo() { const SfxItemSet& rSet = GetObjectItemSet(); - SdrCircKind eNewKindA = static_cast<const SdrCircKindItem&>(rSet.Get(SDRATTR_CIRCKIND)).GetValue(); + SdrCircKind eNewKindA = rSet.Get(SDRATTR_CIRCKIND).GetValue(); SdrObjKind eNewKind = meCircleKind; if(eNewKindA == SDRCIRC_FULL) @@ -1068,8 +1068,8 @@ void SdrCircObj::ImpSetAttrToCircInfo() else if(eNewKindA == SDRCIRC_CUT) eNewKind = OBJ_CCUT; - sal_Int32 nNewStart = static_cast<const SdrAngleItem&>(rSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue(); - sal_Int32 nNewEnd = static_cast<const SdrAngleItem&>(rSet.Get(SDRATTR_CIRCENDANGLE)).GetValue(); + sal_Int32 nNewStart = rSet.Get(SDRATTR_CIRCSTARTANGLE).GetValue(); + sal_Int32 nNewEnd = rSet.Get(SDRATTR_CIRCENDANGLE).GetValue(); bool bKindChg = meCircleKind != eNewKind; bool bAngleChg = nNewStart != nStartAngle || nNewEnd != nEndAngle; @@ -1100,9 +1100,9 @@ void SdrCircObj::ImpSetCircInfoToAttr() else if(meCircleKind == OBJ_CCUT) eNewKindA = SDRCIRC_CUT; - SdrCircKind eOldKindA = static_cast<const SdrCircKindItem&>(rSet.Get(SDRATTR_CIRCKIND)).GetValue(); - sal_Int32 nOldStartAngle = static_cast<const SdrAngleItem&>(rSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue(); - sal_Int32 nOldEndAngle = static_cast<const SdrAngleItem&>(rSet.Get(SDRATTR_CIRCENDANGLE)).GetValue(); + SdrCircKind eOldKindA = rSet.Get(SDRATTR_CIRCKIND).GetValue(); + sal_Int32 nOldStartAngle = rSet.Get(SDRATTR_CIRCSTARTANGLE).GetValue(); + sal_Int32 nOldEndAngle = rSet.Get(SDRATTR_CIRCENDANGLE).GetValue(); if(eNewKindA != eOldKindA || nStartAngle != nOldStartAngle || nEndAngle != nOldEndAngle) { diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 7e45a2b3cdae..f81c1b3d5710 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -187,10 +187,10 @@ SdrEdgeObj::~SdrEdgeObj() void SdrEdgeObj::ImpSetAttrToEdgeInfo() { const SfxItemSet& rSet = GetObjectItemSet(); - SdrEdgeKind eKind = static_cast<const SdrEdgeKindItem&>(rSet.Get(SDRATTR_EDGEKIND)).GetValue(); - sal_Int32 nVal1 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue(); - sal_Int32 nVal2 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue(); - sal_Int32 nVal3 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue(); + SdrEdgeKind eKind = rSet.Get(SDRATTR_EDGEKIND).GetValue(); + sal_Int32 nVal1 = rSet.Get(SDRATTR_EDGELINE1DELTA).GetValue(); + sal_Int32 nVal2 = rSet.Get(SDRATTR_EDGELINE2DELTA).GetValue(); + sal_Int32 nVal3 = rSet.Get(SDRATTR_EDGELINE3DELTA).GetValue(); if(eKind == SdrEdgeKind::OrthoLines || eKind == SdrEdgeKind::Bezier) { @@ -257,11 +257,11 @@ void SdrEdgeObj::ImpSetAttrToEdgeInfo() void SdrEdgeObj::ImpSetEdgeInfoToAttr() { const SfxItemSet& rSet = GetObjectItemSet(); - SdrEdgeKind eKind = static_cast<const SdrEdgeKindItem&>(rSet.Get(SDRATTR_EDGEKIND)).GetValue(); - sal_Int32 nValAnz = static_cast<const SdrEdgeLineDeltaCountItem&>(rSet.Get(SDRATTR_EDGELINEDELTACOUNT)).GetValue(); - sal_Int32 nVal1 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue(); - sal_Int32 nVal2 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue(); - sal_Int32 nVal3 = static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue(); + SdrEdgeKind eKind = rSet.Get(SDRATTR_EDGEKIND).GetValue(); + sal_Int32 nValAnz = rSet.Get(SDRATTR_EDGELINEDELTACOUNT).GetValue(); + sal_Int32 nVal1 = rSet.Get(SDRATTR_EDGELINE1DELTA).GetValue(); + sal_Int32 nVal2 = rSet.Get(SDRATTR_EDGELINE2DELTA).GetValue(); + sal_Int32 nVal3 = rSet.Get(SDRATTR_EDGELINE3DELTA).GetValue(); sal_Int32 nVals[3] = { nVal1, nVal2, nVal3 }; sal_uInt16 n = 0; @@ -726,8 +726,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y()); aBewareRect1=aBoundRect1; - sal_Int32 nH = static_cast<const SdrEdgeNode1HorzDistItem&>(rSet.Get(SDRATTR_EDGENODE1HORZDIST)).GetValue(); - sal_Int32 nV = static_cast<const SdrEdgeNode1VertDistItem&>(rSet.Get(SDRATTR_EDGENODE1VERTDIST)).GetValue(); + sal_Int32 nH = rSet.Get(SDRATTR_EDGENODE1HORZDIST).GetValue(); + sal_Int32 nV = rSet.Get(SDRATTR_EDGENODE1VERTDIST).GetValue(); aBewareRect1.Left()-=nH; aBewareRect1.Right()+=nH; @@ -749,8 +749,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y()); aBewareRect2=aBoundRect2; - sal_Int32 nH = static_cast<const SdrEdgeNode2HorzDistItem&>(rSet.Get(SDRATTR_EDGENODE2HORZDIST)).GetValue(); - sal_Int32 nV = static_cast<const SdrEdgeNode2VertDistItem&>(rSet.Get(SDRATTR_EDGENODE2VERTDIST)).GetValue(); + sal_Int32 nH = rSet.Get(SDRATTR_EDGENODE2HORZDIST).GetValue(); + sal_Int32 nV = rSet.Get(SDRATTR_EDGENODE2VERTDIST).GetValue(); aBewareRect2.Left()-=nH; aBewareRect2.Right()+=nH; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 9745cd84b632..ea8701929a88 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1252,18 +1252,18 @@ void SdrGrafObj::SetMirrored( bool _bMirrored ) void SdrGrafObj::ImpSetAttrToGrafInfo() { const SfxItemSet& rSet = GetObjectItemSet(); - const sal_uInt16 nTrans = static_cast<const SdrGrafTransparenceItem&>( rSet.Get( SDRATTR_GRAFTRANSPARENCE ) ).GetValue(); - const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( rSet.Get( SDRATTR_GRAFCROP ) ); - - aGrafInfo.SetLuminance( static_cast<const SdrGrafLuminanceItem&>( rSet.Get( SDRATTR_GRAFLUMINANCE ) ).GetValue() ); - aGrafInfo.SetContrast( static_cast<const SdrGrafContrastItem&>( rSet.Get( SDRATTR_GRAFCONTRAST ) ).GetValue() ); - aGrafInfo.SetChannelR( static_cast<const SdrGrafRedItem&>( rSet.Get( SDRATTR_GRAFRED ) ).GetValue() ); - aGrafInfo.SetChannelG( static_cast<const SdrGrafGreenItem&>( rSet.Get( SDRATTR_GRAFGREEN ) ).GetValue() ); - aGrafInfo.SetChannelB( static_cast<const SdrGrafBlueItem&>( rSet.Get( SDRATTR_GRAFBLUE ) ).GetValue() ); - aGrafInfo.SetGamma( static_cast<const SdrGrafGamma100Item&>( rSet.Get( SDRATTR_GRAFGAMMA ) ).GetValue() * 0.01 ); + const sal_uInt16 nTrans = rSet.Get( SDRATTR_GRAFTRANSPARENCE ).GetValue(); + const SdrGrafCropItem& rCrop = rSet.Get( SDRATTR_GRAFCROP ); + + aGrafInfo.SetLuminance( rSet.Get( SDRATTR_GRAFLUMINANCE ).GetValue() ); + aGrafInfo.SetContrast( rSet.Get( SDRATTR_GRAFCONTRAST ).GetValue() ); + aGrafInfo.SetChannelR( rSet.Get( SDRATTR_GRAFRED ).GetValue() ); + aGrafInfo.SetChannelG( rSet.Get( SDRATTR_GRAFGREEN ).GetValue() ); + aGrafInfo.SetChannelB( rSet.Get( SDRATTR_GRAFBLUE ).GetValue() ); + aGrafInfo.SetGamma( rSet.Get( SDRATTR_GRAFGAMMA ).GetValue() * 0.01 ); aGrafInfo.SetTransparency( (sal_uInt8) FRound( std::min( nTrans, (sal_uInt16) 100 ) * 2.55 ) ); - aGrafInfo.SetInvert( static_cast<const SdrGrafInvertItem&>( rSet.Get( SDRATTR_GRAFINVERT ) ).GetValue() ); - aGrafInfo.SetDrawMode( static_cast<const SdrGrafModeItem&>( rSet.Get( SDRATTR_GRAFMODE ) ).GetValue() ); + aGrafInfo.SetInvert( rSet.Get( SDRATTR_GRAFINVERT ).GetValue() ); + aGrafInfo.SetDrawMode( rSet.Get( SDRATTR_GRAFMODE ).GetValue() ); aGrafInfo.SetCrop( rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom() ); SetXPolyDirty(); @@ -1532,7 +1532,7 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const } // get crop values - const SdrGrafCropItem& rCrop = static_cast< const SdrGrafCropItem& >(GetMergedItem(SDRATTR_GRAFCROP)); + const SdrGrafCropItem& rCrop = GetMergedItem(SDRATTR_GRAFCROP); if(rCrop.GetLeft() || rCrop.GetTop() || rCrop.GetRight() ||rCrop.GetBottom()) { diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 7fce613f2aad..2f6152df4d9b 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -84,11 +84,11 @@ OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind FieldUnit eModUIUnit(FUNIT_NONE); const SfxItemSet& rSet = GetMergedItemSet(); - bTextRota90 = static_cast<const SdrMeasureTextRota90Item&>(rSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue(); - eMeasureUnit = static_cast<const SdrMeasureUnitItem&>(rSet.Get(SDRATTR_MEASUREUNIT)).GetValue(); - aMeasureScale = static_cast<const SdrMeasureScaleItem&>(rSet.Get(SDRATTR_MEASURESCALE)).GetValue(); - bShowUnit = static_cast<const SdrYesNoItem&>(rSet.Get(SDRATTR_MEASURESHOWUNIT)).GetValue(); - sal_Int16 nNumDigits = static_cast<const SdrMeasureDecimalPlacesItem&>(rSet.Get(SDRATTR_MEASUREDECIMALPLACES)).GetValue(); + bTextRota90 = rSet.Get(SDRATTR_MEASURETEXTROTA90).GetValue(); + eMeasureUnit = rSet.Get(SDRATTR_MEASUREUNIT).GetValue(); + aMeasureScale = rSet.Get(SDRATTR_MEASURESCALE).GetValue(); + bShowUnit = rSet.Get(SDRATTR_MEASURESHOWUNIT).GetValue(); + sal_Int16 nNumDigits = rSet.Get(SDRATTR_MEASUREDECIMALPLACES).GetValue(); switch(eMeasureFieldKind) { @@ -317,19 +317,19 @@ void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const rRec.aPt2 = aPt2; const SfxItemSet& rSet = GetObjectItemSet(); - rRec.eWantTextHPos =static_cast<const SdrMeasureTextHPosItem& >(rSet.Get(SDRATTR_MEASURETEXTHPOS )).GetValue(); - rRec.eWantTextVPos =static_cast<const SdrMeasureTextVPosItem& >(rSet.Get(SDRATTR_MEASURETEXTVPOS )).GetValue(); - rRec.nLineDist =static_cast<const SdrMetricItem& >(rSet.Get(SDRATTR_MEASURELINEDIST )).GetValue(); - rRec.nHelplineOverhang =static_cast<const SdrMetricItem& >(rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue(); - rRec.nHelplineDist =static_cast<const SdrMetricItem& >(rSet.Get(SDRATTR_MEASUREHELPLINEDIST )).GetValue(); - rRec.nHelpline1Len =static_cast<const SdrMetricItem& >(rSet.Get(SDRATTR_MEASUREHELPLINE1LEN )).GetValue(); - rRec.nHelpline2Len =static_cast<const SdrMetricItem& >(rSet.Get(SDRATTR_MEASUREHELPLINE2LEN )).GetValue(); - rRec.bBelowRefEdge =static_cast<const SdrMeasureBelowRefEdgeItem& >(rSet.Get(SDRATTR_MEASUREBELOWREFEDGE )).GetValue(); - rRec.bTextRota90 =static_cast<const SdrMeasureTextRota90Item& >(rSet.Get(SDRATTR_MEASURETEXTROTA90 )).GetValue(); + rRec.eWantTextHPos =rSet.Get(SDRATTR_MEASURETEXTHPOS ).GetValue(); + rRec.eWantTextVPos =rSet.Get(SDRATTR_MEASURETEXTVPOS ).GetValue(); + rRec.nLineDist =rSet.Get(SDRATTR_MEASURELINEDIST ).GetValue(); + rRec.nHelplineOverhang =rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG).GetValue(); + rRec.nHelplineDist =rSet.Get(SDRATTR_MEASUREHELPLINEDIST ).GetValue(); + rRec.nHelpline1Len =rSet.Get(SDRATTR_MEASUREHELPLINE1LEN ).GetValue(); + rRec.nHelpline2Len =rSet.Get(SDRATTR_MEASUREHELPLINE2LEN ).GetValue(); + rRec.bBelowRefEdge =rSet.Get(SDRATTR_MEASUREBELOWREFEDGE ).GetValue(); + rRec.bTextRota90 =rSet.Get(SDRATTR_MEASURETEXTROTA90 ).GetValue(); rRec.bTextUpsideDown =static_cast<const SdrMeasureTextUpsideDownItem& >(rSet.Get(SDRATTR_MEASURETEXTUPSIDEDOWN )).GetValue(); - rRec.aMeasureScale =static_cast<const SdrMeasureScaleItem& >(rSet.Get(SDRATTR_MEASURESCALE )).GetValue(); - rRec.aFormatString =static_cast<const SdrMeasureFormatStringItem& >(rSet.Get(SDRATTR_MEASUREFORMATSTRING )).GetValue(); - rRec.bTextAutoAngle =static_cast<const SdrMeasureTextAutoAngleItem& >(rSet.Get(SDRATTR_MEASURETEXTAUTOANGLE )).GetValue(); + rRec.aMeasureScale =rSet.Get(SDRATTR_MEASURESCALE ).GetValue(); + rRec.aFormatString =rSet.Get(SDRATTR_MEASUREFORMATSTRING ).GetValue(); + rRec.bTextAutoAngle =rSet.Get(SDRATTR_MEASURETEXTAUTOANGLE ).GetValue(); rRec.nTextAutoAngleView=static_cast<const SdrMeasureTextAutoAngleViewItem&>(rSet.Get(SDRATTR_MEASURETEXTAUTOANGLEVIEW)).GetValue(); } |