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 | |
parent | Translate German variable name (diff) | |
download | core-1bbd5a1f907f6ee86f060c3c4bcd0a4ab25e5aa0.tar.gz core-1bbd5a1f907f6ee86f060c3c4bcd0a4ab25e5aa0.zip |
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>
-rw-r--r-- | cui/source/tabpages/measure.cxx | 17 | ||||
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 3 | ||||
-rw-r--r-- | include/svx/sdgluitm.hxx | 3 | ||||
-rw-r--r-- | include/svx/svddef.hxx | 246 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsj.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/compressgraphicdialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/connctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofgraphic.cxx | 20 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrcircobj.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx | 20 | ||||
-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 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 25 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 2 |
20 files changed, 256 insertions, 198 deletions
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 5c79146ecfb3..63c5ed9104d4 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -263,7 +263,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // SdrMeasureBelowRefEdgeItem if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SfxItemState::DONTCARE ) { - m_pTsbBelowRefEdge->SetState( static_cast<const SdrMeasureBelowRefEdgeItem&>( rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE ) ). + m_pTsbBelowRefEdge->SetState( rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); m_pTsbBelowRefEdge->EnableTriState( false ); } @@ -292,7 +292,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // Attention: negate ! if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SfxItemState::DONTCARE ) { - m_pTsbParallel->SetState( static_cast<const SdrMeasureTextRota90Item&>( rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ) ). + m_pTsbParallel->SetState( rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ). GetValue() ? TRISTATE_FALSE : TRISTATE_TRUE ); m_pTsbParallel->EnableTriState( false ); } @@ -305,7 +305,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // SdrMeasureShowUnitItem if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SfxItemState::DONTCARE ) { - m_pTsbShowUnit->SetState( static_cast<const SdrYesNoItem&>( rAttrs->Get( SDRATTR_MEASURESHOWUNIT ) ). + m_pTsbShowUnit->SetState( rAttrs->Get( SDRATTR_MEASURESHOWUNIT ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); m_pTsbShowUnit->EnableTriState( false ); } @@ -318,8 +318,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) // SdrMeasureUnitItem if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::DONTCARE ) { - long nFieldUnit = (long) static_cast<const SdrMeasureUnitItem&>( rAttrs-> - Get( SDRATTR_MEASUREUNIT ) ).GetValue(); + long nFieldUnit = (long) rAttrs->Get( SDRATTR_MEASUREUNIT ).GetValue(); for( sal_Int32 i = 0; i < m_pLbUnit->GetEntryCount(); ++i ) { @@ -340,7 +339,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) { css::drawing::MeasureTextVertPos eVPos = - static_cast<const SdrMeasureTextVPosItem&>( rAttrs->Get( SDRATTR_MEASURETEXTVPOS ) ).GetValue(); + rAttrs->Get( SDRATTR_MEASURETEXTVPOS ).GetValue(); { if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) { @@ -348,7 +347,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs ) m_pTsbAutoPosH->EnableTriState( false ); css::drawing::MeasureTextHorzPos eHPos = - static_cast<const SdrMeasureTextHPosItem&>( rAttrs->Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); + rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); RectPoint eRP = RectPoint::MM; switch( eVPos ) { @@ -556,7 +555,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != SfxItemState::DONTCARE ) { - eOldVPos = static_cast<const SdrMeasureTextVPosItem&>(rOutAttrs.Get(SDRATTR_MEASURETEXTVPOS)).GetValue(); + eOldVPos = rOutAttrs.Get(SDRATTR_MEASURETEXTVPOS).GetValue(); if( eOldVPos != eVPos ) { rAttrs->Put( SdrMeasureTextVPosItem( eVPos ) ); @@ -571,7 +570,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != SfxItemState::DONTCARE ) { - eOldHPos = static_cast<const SdrMeasureTextHPosItem&>( rOutAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); + eOldHPos = rOutAttrs.Get( SDRATTR_MEASURETEXTHPOS ).GetValue(); if( eOldHPos != eHPos ) { rAttrs->Put( SdrMeasureTextHPosItem( eHPos ) ); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 36063403c765..4605193dbeef 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -703,8 +703,7 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight() const if(SfxItemState::DONTCARE != eState) { - const SvxWritingModeItem& rItem = static_cast<const SvxWritingModeItem&> ( - rOutAttrs.Get (SDRATTR_TEXTDIRECTION)); + const SvxWritingModeItem& rItem = rOutAttrs.Get(SDRATTR_TEXTDIRECTION); if (rItem.GetValue() == css::text::WritingMode_TB_RL) bLeftToRightDirection = false; } diff --git a/include/svx/sdgluitm.hxx b/include/svx/sdgluitm.hxx index da937f786e86..5fab3bdb0c44 100644 --- a/include/svx/sdgluitm.hxx +++ b/include/svx/sdgluitm.hxx @@ -33,7 +33,8 @@ class SVX_DLLPUBLIC SdrGrafLuminanceItem : public SdrSignedPercentItem public: - SdrGrafLuminanceItem( short nLuminancePercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFLUMINANCE, nLuminancePercent ) {} + SdrGrafLuminanceItem( short nLuminancePercent = 0 ) : SdrSignedPercentItem( + SDRATTR_GRAFLUMINANCE, nLuminancePercent ) {} virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override; }; diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx index 2d30918b6441..e86ce4483d3b 100644 --- a/include/svx/svddef.hxx +++ b/include/svx/svddef.hxx @@ -61,6 +61,12 @@ // V4: 1000..1126, 1172..1185 + + +class SdrAllPositionXItem; +class SdrAllPositionYItem; +class SdrAllSizeHeightItem; +class SdrAllSizeWidthItem; class SdrAngleItem; class SdrCaptionEscAbsItem; class SdrCaptionEscDirItem; @@ -69,14 +75,72 @@ class SdrCaptionEscRelItem; class SdrCaptionFitLineLenItem; class SdrCaptionLineLenItem; class SdrCaptionTypeItem; +class SdrCircKindItem; +class SdrEdgeKindItem; +class SdrEdgeLineDeltaCountItem; +class SdrEdgeNode1GlueDistItem; +class SdrEdgeNode1HorzDistItem; +class SdrEdgeNode1VertDistItem; +class SdrEdgeNode2GlueDistItem; +class SdrEdgeNode2HorzDistItem; +class SdrEdgeNode2VertDistItem; +class SdrGrafBlueItem; +class SdrGrafContrastItem; +class SdrGrafCropItem; +class SdrGrafGamma100Item; +class SdrGrafGreenItem; +class SdrGrafInvertItem; +class SdrGrafLuminanceItem; +class SdrGrafModeItem; +class SdrGrafRedItem; +class SdrGrafTransparenceItem; +class SdrHorzShearAllItem; +class SdrHorzShearOneItem; +class SdrLayerIdItem; +class SdrLayerNameItem; +class SdrLogicSizeHeightItem; +class SdrLogicSizeWidthItem; +class SdrMeasureBelowRefEdgeItem; +class SdrMeasureDecimalPlacesItem; +class SdrMeasureFormatStringItem; +class SdrMeasureKindItem; +class SdrMeasureOverhangItem; +class SdrMeasureTextAutoAngleItem; +class SdrMeasureTextFixedAngleItem; +class SdrMeasureTextHPosItem; +class SdrMeasureTextIsFixedAngleItem; +class SdrMeasureTextRota90Item; +class SdrMeasureTextVPosItem; +class SdrMeasureUnitItem; class SdrMetricItem; +class SdrMoveXItem; +class SdrMoveYItem; +class SdrObjPrintableItem; +class SdrObjVisibleItem; class SdrOnOffItem; +class SdrOnePositionXItem; +class SdrOnePositionYItem; +class SdrOneSizeHeightItem; +class SdrOneSizeWidthItem; class SdrPercentItem; +class SdrResizeXAllItem; +class SdrResizeXOneItem; +class SdrResizeYAllItem; +class SdrResizeYOneItem; +class SdrRotateOneItem; +class SdrShearAngleItem; class SdrTextFitToSizeTypeItem; class SdrTextFixedCellHeightItem; class SdrTextVertAdjustItem; +class SdrTransformRef1XItem; +class SdrTransformRef1YItem; +class SdrTransformRef2XItem; +class SdrTransformRef2YItem; +class SdrVertShearAllItem; +class SdrVertShearOneItem; class SfxStringItem; class SfxVoidItem; +class SvxWritingModeItem; class XColorItem; #define SDRATTR_START XATTR_START /* 1000 */ @@ -133,103 +197,103 @@ class XColorItem; #define SDRATTR_TEXT_CHAINNEXTNAME TypedWhichId<SfxStringItem>(SDRATTR_MISC_FIRST +25) /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */ #define SDRATTR_MISC_LAST (SDRATTR_TEXT_CHAINNEXTNAME) /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */ -#define SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1) /* 1127 */ /* Pool V4 */ -#define SDRATTR_EDGEKIND (SDRATTR_EDGE_FIRST + 0) /* 1127 */ /* Pool V4 */ -#define SDRATTR_EDGENODE1HORZDIST (SDRATTR_EDGE_FIRST + 1) /* 1128 */ /* Pool V4 */ -#define SDRATTR_EDGENODE1VERTDIST (SDRATTR_EDGE_FIRST + 2) /* 1129 */ /* Pool V4 */ -#define SDRATTR_EDGENODE2HORZDIST (SDRATTR_EDGE_FIRST + 3) /* 1130 */ /* Pool V4 */ -#define SDRATTR_EDGENODE2VERTDIST (SDRATTR_EDGE_FIRST + 4) /* 1131 */ /* Pool V4 */ -#define SDRATTR_EDGENODE1GLUEDIST (SDRATTR_EDGE_FIRST + 5) /* 1132 */ /* Pool V4 */ -#define SDRATTR_EDGENODE2GLUEDIST (SDRATTR_EDGE_FIRST + 6) /* 1133 */ /* Pool V4 */ -#define SDRATTR_EDGELINEDELTACOUNT (SDRATTR_EDGE_FIRST + 7) /* 1134 */ /* Pool V4 */ -#define SDRATTR_EDGELINE1DELTA (SDRATTR_EDGE_FIRST + 8) /* 1135 */ /* Pool V4 */ -#define SDRATTR_EDGELINE2DELTA (SDRATTR_EDGE_FIRST + 9) /* 1136 */ /* Pool V4 */ -#define SDRATTR_EDGELINE3DELTA (SDRATTR_EDGE_FIRST +10) /* 1137 */ /* Pool V4 */ -#define SDRATTR_EDGE_LAST (SDRATTR_EDGELINE3DELTA) /* 1145 */ /* Pool V4 */ +#define SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1) /* 1127 */ /* Pool V4 */ +#define SDRATTR_EDGEKIND TypedWhichId<SdrEdgeKindItem>(SDRATTR_EDGE_FIRST + 0) /* 1127 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1HORZDIST TypedWhichId<SdrEdgeNode1HorzDistItem>(SDRATTR_EDGE_FIRST + 1) /* 1128 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1VERTDIST TypedWhichId<SdrEdgeNode1VertDistItem>(SDRATTR_EDGE_FIRST + 2) /* 1129 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2HORZDIST TypedWhichId<SdrEdgeNode2HorzDistItem>(SDRATTR_EDGE_FIRST + 3) /* 1130 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2VERTDIST TypedWhichId<SdrEdgeNode2VertDistItem>(SDRATTR_EDGE_FIRST + 4) /* 1131 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1GLUEDIST TypedWhichId<SdrEdgeNode1GlueDistItem>(SDRATTR_EDGE_FIRST + 5) /* 1132 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2GLUEDIST TypedWhichId<SdrEdgeNode2GlueDistItem>(SDRATTR_EDGE_FIRST + 6) /* 1133 */ /* Pool V4 */ +#define SDRATTR_EDGELINEDELTACOUNT TypedWhichId<SdrEdgeLineDeltaCountItem>(SDRATTR_EDGE_FIRST + 7) /* 1134 */ /* Pool V4 */ +#define SDRATTR_EDGELINE1DELTA TypedWhichId<SdrMetricItem>(SDRATTR_EDGE_FIRST + 8) /* 1135 */ /* Pool V4 */ +#define SDRATTR_EDGELINE2DELTA TypedWhichId<SdrMetricItem>(SDRATTR_EDGE_FIRST + 9) /* 1136 */ /* Pool V4 */ +#define SDRATTR_EDGELINE3DELTA TypedWhichId<SdrMetricItem>(SDRATTR_EDGE_FIRST +10) /* 1137 */ /* Pool V4 */ +#define SDRATTR_EDGE_LAST (SDRATTR_EDGELINE3DELTA) /* 1145 */ /* Pool V4 */ -#define SDRATTR_MEASURE_FIRST (SDRATTR_EDGE_LAST + 1) /* 1147 */ /* Pool V4 */ -#define SDRATTR_MEASUREKIND (SDRATTR_MEASURE_FIRST+ 0) /* 1147 */ /* Pool V4 */ -#define SDRATTR_MEASURETEXTHPOS (SDRATTR_MEASURE_FIRST+ 1) /* 1148 */ /* Pool V4 */ -#define SDRATTR_MEASURETEXTVPOS (SDRATTR_MEASURE_FIRST+ 2) /* 1149 */ /* Pool V4 */ -#define SDRATTR_MEASURELINEDIST (SDRATTR_MEASURE_FIRST+ 3) /* 1150 */ /* Pool V4 */ -#define SDRATTR_MEASUREHELPLINEOVERHANG (SDRATTR_MEASURE_FIRST+ 4) /* 1151 */ /* Pool V4 */ -#define SDRATTR_MEASUREHELPLINEDIST (SDRATTR_MEASURE_FIRST+ 5) /* 1152 */ /* Pool V4 */ -#define SDRATTR_MEASUREHELPLINE1LEN (SDRATTR_MEASURE_FIRST+ 6) /* 1153 */ /* Pool V4 */ -#define SDRATTR_MEASUREHELPLINE2LEN (SDRATTR_MEASURE_FIRST+ 7) /* 1154 */ /* Pool V4 */ -#define SDRATTR_MEASUREBELOWREFEDGE (SDRATTR_MEASURE_FIRST+ 8) /* 1155 */ /* Pool V4 */ -#define SDRATTR_MEASURETEXTROTA90 (SDRATTR_MEASURE_FIRST+ 9) /* 1156 */ /* Pool V4 */ -#define SDRATTR_MEASURETEXTUPSIDEDOWN (SDRATTR_MEASURE_FIRST+10) /* 1157 */ /* Pool V4 */ -#define SDRATTR_MEASUREOVERHANG (SDRATTR_MEASURE_FIRST+11) /* 1158 */ /* Pool V4 */ -#define SDRATTR_MEASUREUNIT (SDRATTR_MEASURE_FIRST+12) /* 1159 */ /* Pool V4 */ -#define SDRATTR_MEASURESCALE (SDRATTR_MEASURE_FIRST+13) /* 1160 */ /* Pool V4 */ -#define SDRATTR_MEASURESHOWUNIT (SDRATTR_MEASURE_FIRST+14) /* 1161 */ /* Pool V4 */ -#define SDRATTR_MEASUREFORMATSTRING (SDRATTR_MEASURE_FIRST+15) /* 1162 */ /* Pool V4 */ -#define SDRATTR_MEASURETEXTAUTOANGLE (SDRATTR_MEASURE_FIRST+16) /* 1163 */ /* Pool V4, Correction 25-9-1996 */ -#define SDRATTR_MEASURETEXTAUTOANGLEVIEW (SDRATTR_MEASURE_FIRST+17) /* 1164 */ /* Pool V4, Correction 25-9-1996 */ -#define SDRATTR_MEASURETEXTISFIXEDANGLE (SDRATTR_MEASURE_FIRST+18) /* 1165 */ /* Pool V4, Correction 25-9-1996 */ -#define SDRATTR_MEASURETEXTFIXEDANGLE (SDRATTR_MEASURE_FIRST+19) /* 1166 */ /* Pool V4, Correction 25-9-1996 */ -#define SDRATTR_MEASUREDECIMALPLACES (SDRATTR_MEASURE_FIRST+20) /* 1167 */ /* Pool V4 */ -#define SDRATTR_MEASURE_LAST (SDRATTR_MEASUREDECIMALPLACES) /* 1170 */ /* Pool V4 */ +#define SDRATTR_MEASURE_FIRST (SDRATTR_EDGE_LAST + 1) /* 1147 */ /* Pool V4 */ +#define SDRATTR_MEASUREKIND TypedWhichId<SdrMeasureKindItem>(SDRATTR_MEASURE_FIRST+ 0) /* 1147 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTHPOS TypedWhichId<SdrMeasureTextHPosItem>(SDRATTR_MEASURE_FIRST+ 1) /* 1148 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTVPOS TypedWhichId<SdrMeasureTextVPosItem>(SDRATTR_MEASURE_FIRST+ 2) /* 1149 */ /* Pool V4 */ +#define SDRATTR_MEASURELINEDIST TypedWhichId<SdrMetricItem>(SDRATTR_MEASURE_FIRST+ 3) /* 1150 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINEOVERHANG TypedWhichId<SdrMetricItem>(SDRATTR_MEASURE_FIRST+ 4) /* 1151 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINEDIST TypedWhichId<SdrMetricItem>(SDRATTR_MEASURE_FIRST+ 5) /* 1152 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINE1LEN TypedWhichId<SdrMetricItem>(SDRATTR_MEASURE_FIRST+ 6) /* 1153 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINE2LEN TypedWhichId<SdrMetricItem>(SDRATTR_MEASURE_FIRST+ 7) /* 1154 */ /* Pool V4 */ +#define SDRATTR_MEASUREBELOWREFEDGE TypedWhichId<SdrMeasureBelowRefEdgeItem>(SDRATTR_MEASURE_FIRST+ 8) /* 1155 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTROTA90 TypedWhichId<SdrMeasureTextRota90Item>(SDRATTR_MEASURE_FIRST+ 9)/* 1156 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTUPSIDEDOWN TypedWhichId<SdrYesNoItem>(SDRATTR_MEASURE_FIRST+10) /* 1157 */ /* Pool V4 */ +#define SDRATTR_MEASUREOVERHANG TypedWhichId<SdrMeasureOverhangItem>(SDRATTR_MEASURE_FIRST+11) /* 1158 */ /* Pool V4 */ +#define SDRATTR_MEASUREUNIT TypedWhichId<SdrMeasureUnitItem>(SDRATTR_MEASURE_FIRST+12) /* 1159 */ /* Pool V4 */ +#define SDRATTR_MEASURESCALE TypedWhichId<SdrMeasureScaleItem>(SDRATTR_MEASURE_FIRST+13) /* 1160 */ /* Pool V4 */ +#define SDRATTR_MEASURESHOWUNIT TypedWhichId<SdrYesNoItem>(SDRATTR_MEASURE_FIRST+14) /* 1161 */ /* Pool V4 */ +#define SDRATTR_MEASUREFORMATSTRING TypedWhichId<SdrMeasureFormatStringItem>(SDRATTR_MEASURE_FIRST+15) /* 1162 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTAUTOANGLE TypedWhichId<SdrMeasureTextAutoAngleItem>(SDRATTR_MEASURE_FIRST+16) /* 1163 */ /* Pool V4, Correction 25-9-1996 */ +#define SDRATTR_MEASURETEXTAUTOANGLEVIEW TypedWhichId<SdrAngleItem>(SDRATTR_MEASURE_FIRST+17) /* 1164 */ /* Pool V4, Correction 25-9-1996 */ +#define SDRATTR_MEASURETEXTISFIXEDANGLE TypedWhichId<SdrMeasureTextIsFixedAngleItem>(SDRATTR_MEASURE_FIRST+18) /* 1165 */ /* Pool V4, Correction 25-9-1996 */ +#define SDRATTR_MEASURETEXTFIXEDANGLE TypedWhichId<SdrMeasureTextFixedAngleItem>(SDRATTR_MEASURE_FIRST+19) /* 1166 */ /* Pool V4, Correction 25-9-1996 */ +#define SDRATTR_MEASUREDECIMALPLACES TypedWhichId<SdrMeasureDecimalPlacesItem>(SDRATTR_MEASURE_FIRST+20) /* 1167 */ /* Pool V4 */ +#define SDRATTR_MEASURE_LAST (SDRATTR_MEASUREDECIMALPLACES) /* 1170 */ /* Pool V4 */ -#define SDRATTR_CIRC_FIRST (SDRATTR_MEASURE_LAST+ 1) /* 1172 */ /* Pool V4+ */ -#define SDRATTR_CIRCKIND (SDRATTR_CIRC_FIRST+ 0) /* 1172 */ /* Pool V4+ */ -#define SDRATTR_CIRCSTARTANGLE (SDRATTR_CIRC_FIRST+ 1) /* 1173 */ /* Pool V4+ */ -#define SDRATTR_CIRCENDANGLE (SDRATTR_CIRC_FIRST+ 2) /* 1174 */ /* Pool V4+ */ -#define SDRATTR_CIRC_LAST (SDRATTR_CIRCENDANGLE) /* 1178 */ /* Pool V4+ */ +#define SDRATTR_CIRC_FIRST (SDRATTR_MEASURE_LAST+ 1) /* 1172 */ /* Pool V4+ */ +#define SDRATTR_CIRCKIND TypedWhichId<SdrCircKindItem>(SDRATTR_CIRC_FIRST+ 0) /* 1172 */ /* Pool V4+ */ +#define SDRATTR_CIRCSTARTANGLE TypedWhichId<SdrAngleItem>(SDRATTR_CIRC_FIRST+ 1) /* 1173 */ /* Pool V4+ */ +#define SDRATTR_CIRCENDANGLE TypedWhichId<SdrAngleItem>(SDRATTR_CIRC_FIRST+ 2) /* 1174 */ /* Pool V4+ */ +#define SDRATTR_CIRC_LAST (SDRATTR_CIRCENDANGLE) /* 1178 */ /* Pool V4+ */ // Only for Interfacing, not yet implemented. / * + * V4 / -#define SDRATTR_NOTPERSIST_FIRST (SDRATTR_CIRC_LAST + 1) /* 1180 */ /* 1172 */ /* 1127 */ /* 1110 */ /* Pool V1: 1058 */ -#define SDRATTR_OBJMOVEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 0) /* 1180 sal_Bool, def=sal_False */ -#define SDRATTR_OBJSIZEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 1) /* 1181 sal_Bool, def=sal_False */ -#define SDRATTR_OBJPRINTABLE (SDRATTR_NOTPERSIST_FIRST+ 2) /* 1182 sal_Bool, def=sal_True */ -#define SDRATTR_LAYERID (SDRATTR_NOTPERSIST_FIRST+ 3) /* 1183 sal_uInt16, def=0 */ -#define SDRATTR_LAYERNAME (SDRATTR_NOTPERSIST_FIRST+ 4) /* 1184 String, def="" */ -#define SDRATTR_OBJECTNAME (SDRATTR_NOTPERSIST_FIRST+ 5) /* 1185 String, def="" */ -#define SDRATTR_ALLPOSITIONX (SDRATTR_NOTPERSIST_FIRST+ 6) /* 1186 long, def=0 */ -#define SDRATTR_ALLPOSITIONY (SDRATTR_NOTPERSIST_FIRST+ 7) /* 1187 long, def=0 */ -#define SDRATTR_ALLSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+ 8) /* 1188 long, def=0 */ -#define SDRATTR_ALLSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+ 9) /* 1189 long, def=0 */ -#define SDRATTR_ONEPOSITIONX (SDRATTR_NOTPERSIST_FIRST+10) /* 1190 long, def=0 */ -#define SDRATTR_ONEPOSITIONY (SDRATTR_NOTPERSIST_FIRST+11) /* 1191 long, def=0 */ -#define SDRATTR_ONESIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+12) /* 1192 long, def=0 */ -#define SDRATTR_ONESIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+13) /* 1193 long, def=0 */ -#define SDRATTR_LOGICSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+14) /* 1194 long, def=0 */ -#define SDRATTR_LOGICSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+15) /* 1195 long, def=0 */ -#define SDRATTR_ROTATEANGLE (SDRATTR_NOTPERSIST_FIRST+16) /* 1196 long, def=0 */ -#define SDRATTR_SHEARANGLE (SDRATTR_NOTPERSIST_FIRST+17) /* 1197 long, def=0 */ -#define SDRATTR_MOVEX (SDRATTR_NOTPERSIST_FIRST+18) /* 1198 long, def=0 */ -#define SDRATTR_MOVEY (SDRATTR_NOTPERSIST_FIRST+19) /* 1199 long, def=0 */ -#define SDRATTR_RESIZEXONE (SDRATTR_NOTPERSIST_FIRST+20) /* 1200 long, def=0 */ -#define SDRATTR_RESIZEYONE (SDRATTR_NOTPERSIST_FIRST+21) /* 1201 long, def=0 */ -#define SDRATTR_ROTATEONE (SDRATTR_NOTPERSIST_FIRST+22) /* 1202 long, def=0 */ -#define SDRATTR_HORZSHEARONE (SDRATTR_NOTPERSIST_FIRST+23) /* 1203 long, def=0 */ -#define SDRATTR_VERTSHEARONE (SDRATTR_NOTPERSIST_FIRST+24) /* 1204 long, def=0 */ -#define SDRATTR_RESIZEXALL (SDRATTR_NOTPERSIST_FIRST+25) /* 1205 long, def=0 */ -#define SDRATTR_RESIZEYALL (SDRATTR_NOTPERSIST_FIRST+26) /* 1206 long, def=0 */ -#define SDRATTR_ROTATEALL (SDRATTR_NOTPERSIST_FIRST+27) /* 1207 long, def=0 */ -#define SDRATTR_HORZSHEARALL (SDRATTR_NOTPERSIST_FIRST+28) /* 1208 long, def=0 */ -#define SDRATTR_VERTSHEARALL (SDRATTR_NOTPERSIST_FIRST+29) /* 1209 long, def=0 */ -#define SDRATTR_TRANSFORMREF1X (SDRATTR_NOTPERSIST_FIRST+30) /* 1210 long, def=0 */ -#define SDRATTR_TRANSFORMREF1Y (SDRATTR_NOTPERSIST_FIRST+31) /* 1211 long, def=0 */ -#define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */ -#define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */ -#define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */ -#define SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35) -#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ +#define SDRATTR_NOTPERSIST_FIRST (SDRATTR_CIRC_LAST + 1) /* 1180 */ /* 1172 */ /* 1127 */ /* 1110 */ /* Pool V1: 1058 */ +#define SDRATTR_OBJMOVEPROTECT TypedWhichId<SdrYesNoItem>(SDRATTR_NOTPERSIST_FIRST+ 0) /* 1180 sal_Bool, def=sal_False */ +#define SDRATTR_OBJSIZEPROTECT TypedWhichId<SdrYesNoItem>(SDRATTR_NOTPERSIST_FIRST+ 1) /* 1181 sal_Bool, def=sal_False */ +#define SDRATTR_OBJPRINTABLE TypedWhichId<SdrObjPrintableItem>(SDRATTR_NOTPERSIST_FIRST+ 2) /* 1182 sal_Bool, def=sal_True */ +#define SDRATTR_LAYERID TypedWhichId<SdrLayerIdItem>(SDRATTR_NOTPERSIST_FIRST+ 3) /* 1183 sal_uInt16, def=0 */ +#define SDRATTR_LAYERNAME TypedWhichId<SdrLayerNameItem>(SDRATTR_NOTPERSIST_FIRST+ 4) /* 1184 String, def="" */ +#define SDRATTR_OBJECTNAME TypedWhichId<SfxStringItem>(SDRATTR_NOTPERSIST_FIRST+ 5) /* 1185 String, def="" */ +#define SDRATTR_ALLPOSITIONX TypedWhichId<SdrAllPositionXItem>(SDRATTR_NOTPERSIST_FIRST+ 6) /* 1186 long, def=0 */ +#define SDRATTR_ALLPOSITIONY TypedWhichId<SdrAllPositionYItem>(SDRATTR_NOTPERSIST_FIRST+ 7) /* 1187 long, def=0 */ +#define SDRATTR_ALLSIZEWIDTH TypedWhichId<SdrAllSizeWidthItem>(SDRATTR_NOTPERSIST_FIRST+ 8) /* 1188 long, def=0 */ +#define SDRATTR_ALLSIZEHEIGHT TypedWhichId<SdrAllSizeHeightItem>(SDRATTR_NOTPERSIST_FIRST+ 9) /* 1189 long, def=0 */ +#define SDRATTR_ONEPOSITIONX TypedWhichId<SdrOnePositionXItem>(SDRATTR_NOTPERSIST_FIRST+10) /* 1190 long, def=0 */ +#define SDRATTR_ONEPOSITIONY TypedWhichId<SdrOnePositionYItem>(SDRATTR_NOTPERSIST_FIRST+11) /* 1191 long, def=0 */ +#define SDRATTR_ONESIZEWIDTH TypedWhichId<SdrOneSizeWidthItem>(SDRATTR_NOTPERSIST_FIRST+12) /* 1192 long, def=0 */ +#define SDRATTR_ONESIZEHEIGHT TypedWhichId<SdrOneSizeHeightItem>(SDRATTR_NOTPERSIST_FIRST+13) /* 1193 long, def=0 */ +#define SDRATTR_LOGICSIZEWIDTH TypedWhichId<SdrLogicSizeWidthItem>(SDRATTR_NOTPERSIST_FIRST+14) /* 1194 long, def=0 */ +#define SDRATTR_LOGICSIZEHEIGHT TypedWhichId<SdrLogicSizeHeightItem>(SDRATTR_NOTPERSIST_FIRST+15) /* 1195 long, def=0 */ +#define SDRATTR_ROTATEANGLE TypedWhichId<SdrAngleItem>(SDRATTR_NOTPERSIST_FIRST+16) /* 1196 long, def=0 */ +#define SDRATTR_SHEARANGLE TypedWhichId<SdrShearAngleItem>(SDRATTR_NOTPERSIST_FIRST+17) /* 1197 long, def=0 */ +#define SDRATTR_MOVEX TypedWhichId<SdrMoveXItem>(SDRATTR_NOTPERSIST_FIRST+18) /* 1198 long, def=0 */ +#define SDRATTR_MOVEY TypedWhichId<SdrMoveYItem>(SDRATTR_NOTPERSIST_FIRST+19) /* 1199 long, def=0 */ +#define SDRATTR_RESIZEXONE TypedWhichId<SdrResizeXOneItem>(SDRATTR_NOTPERSIST_FIRST+20) /* 1200 long, def=0 */ +#define SDRATTR_RESIZEYONE TypedWhichId<SdrResizeYOneItem>(SDRATTR_NOTPERSIST_FIRST+21) /* 1201 long, def=0 */ +#define SDRATTR_ROTATEONE TypedWhichId<SdrRotateOneItem>(SDRATTR_NOTPERSIST_FIRST+22) /* 1202 long, def=0 */ +#define SDRATTR_HORZSHEARONE TypedWhichId<SdrHorzShearOneItem>(SDRATTR_NOTPERSIST_FIRST+23) /* 1203 long, def=0 */ +#define SDRATTR_VERTSHEARONE TypedWhichId<SdrVertShearOneItem>(SDRATTR_NOTPERSIST_FIRST+24) /* 1204 long, def=0 */ +#define SDRATTR_RESIZEXALL TypedWhichId<SdrResizeXAllItem>(SDRATTR_NOTPERSIST_FIRST+25) /* 1205 long, def=0 */ +#define SDRATTR_RESIZEYALL TypedWhichId<SdrResizeYAllItem>(SDRATTR_NOTPERSIST_FIRST+26) /* 1206 long, def=0 */ +#define SDRATTR_ROTATEALL TypedWhichId<SdrRotateAllItem>(SDRATTR_NOTPERSIST_FIRST+27) /* 1207 long, def=0 */ +#define SDRATTR_HORZSHEARALL TypedWhichId<SdrHorzShearAllItem>(SDRATTR_NOTPERSIST_FIRST+28) /* 1208 long, def=0 */ +#define SDRATTR_VERTSHEARALL TypedWhichId<SdrVertShearAllItem>(SDRATTR_NOTPERSIST_FIRST+29) /* 1209 long, def=0 */ +#define SDRATTR_TRANSFORMREF1X TypedWhichId<SdrTransformRef1XItem>(SDRATTR_NOTPERSIST_FIRST+30) /* 1210 long, def=0 */ +#define SDRATTR_TRANSFORMREF1Y TypedWhichId<SdrTransformRef1YItem>(SDRATTR_NOTPERSIST_FIRST+31) /* 1211 long, def=0 */ +#define SDRATTR_TRANSFORMREF2X TypedWhichId<SdrTransformRef2XItem>(SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */ +#define SDRATTR_TRANSFORMREF2Y TypedWhichId<SdrTransformRef2YItem>(SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */ +#define SDRATTR_TEXTDIRECTION TypedWhichId<SvxWritingModeItem>(SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */ +#define SDRATTR_OBJVISIBLE TypedWhichId<SdrObjVisibleItem>(SDRATTR_NOTPERSIST_FIRST+35) +#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ // no SetItem for this -#define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/ -#define SDRATTR_GRAFRED (SDRATTR_GRAF_FIRST+0) /* 1229 V4+++*/ -#define SDRATTR_GRAFGREEN (SDRATTR_GRAF_FIRST+1) /* 1230 V4+++*/ -#define SDRATTR_GRAFBLUE (SDRATTR_GRAF_FIRST+2) /* 1231 V4+++*/ -#define SDRATTR_GRAFLUMINANCE (SDRATTR_GRAF_FIRST+3) /* 1232 V4+++*/ -#define SDRATTR_GRAFCONTRAST (SDRATTR_GRAF_FIRST+4) /* 1233 V4+++*/ -#define SDRATTR_GRAFGAMMA (SDRATTR_GRAF_FIRST+5) /* 1234 V4+++*/ -#define SDRATTR_GRAFTRANSPARENCE (SDRATTR_GRAF_FIRST+6) /* 1235 V4+++*/ -#define SDRATTR_GRAFINVERT (SDRATTR_GRAF_FIRST+7) /* 1236 V4+++*/ -#define SDRATTR_GRAFMODE (SDRATTR_GRAF_FIRST+8) /* 1237 V4+++*/ -#define SDRATTR_GRAFCROP (SDRATTR_GRAF_FIRST+9) /* 1238 V4+++*/ -#define SDRATTR_GRAF_LAST (SDRATTR_GRAFCROP) /* 1242 V4+++*/ +#define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/ +#define SDRATTR_GRAFRED TypedWhichId<SdrGrafRedItem>(SDRATTR_GRAF_FIRST+0) /* 1229 V4+++*/ +#define SDRATTR_GRAFGREEN TypedWhichId<SdrGrafGreenItem>(SDRATTR_GRAF_FIRST+1) /* 1230 V4+++*/ +#define SDRATTR_GRAFBLUE TypedWhichId<SdrGrafBlueItem>(SDRATTR_GRAF_FIRST+2) /* 1231 V4+++*/ +#define SDRATTR_GRAFLUMINANCE TypedWhichId<SdrGrafLuminanceItem>(SDRATTR_GRAF_FIRST+3) /* 1232 V4+++*/ +#define SDRATTR_GRAFCONTRAST TypedWhichId<SdrGrafContrastItem>(SDRATTR_GRAF_FIRST+4) /* 1233 V4+++*/ +#define SDRATTR_GRAFGAMMA TypedWhichId<SdrGrafGamma100Item>(SDRATTR_GRAF_FIRST+5) /* 1234 V4+++*/ +#define SDRATTR_GRAFTRANSPARENCE TypedWhichId<SdrGrafTransparenceItem>(SDRATTR_GRAF_FIRST+6) /* 1235 V4+++*/ +#define SDRATTR_GRAFINVERT TypedWhichId<SdrGrafInvertItem>(SDRATTR_GRAF_FIRST+7) /* 1236 V4+++*/ +#define SDRATTR_GRAFMODE TypedWhichId<SdrGrafModeItem>(SDRATTR_GRAF_FIRST+8) /* 1237 V4+++*/ +#define SDRATTR_GRAFCROP TypedWhichId<SdrGrafCropItem>(SDRATTR_GRAF_FIRST+9) /* 1238 V4+++*/ +#define SDRATTR_GRAF_LAST (SDRATTR_GRAFCROP) /* 1242 V4+++*/ #define SDRATTR_3D_FIRST (SDRATTR_GRAF_LAST + 1) /* 1244 V4+++*/ diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index c587a3adba13..bf8cda6bc28b 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -832,7 +832,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje SetVerAlign( lcl_GetVerAlignFromItemSet( rItemSet ) ); // orientation alignment - const SvxWritingModeItem& rItem = static_cast< const SvxWritingModeItem& >( rItemSet.Get( SDRATTR_TEXTDIRECTION ) ); + const SvxWritingModeItem& rItem = rItemSet.Get( SDRATTR_TEXTDIRECTION ); if( rItem.GetValue() == css::text::WritingMode_TB_RL ) mnRotation = EXC_OBJ_ORIENT_90CW; } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 0ab35ac65530..3069a5a855e2 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -1138,7 +1138,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) bLeftToRight = false; } else - bLeftToRight = static_cast<const SvxWritingModeItem&>( aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == css::text::WritingMode_LR_TB; + bLeftToRight = aAttrSet.Get( SDRATTR_TEXTDIRECTION ).GetValue() == css::text::WritingMode_LR_TB; if ( bDisableVerticalText ) { diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 3bcaf5e71f90..b2e821d7a58e 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -377,7 +377,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) bLeftToRight = false; } else - bLeftToRight = static_cast<const SvxWritingModeItem&>( aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == css::text::WritingMode_LR_TB; + bLeftToRight = aAttrSet.Get( SDRATTR_TEXTDIRECTION ).GetValue() == css::text::WritingMode_LR_TB; rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT, bLeftToRight ) ); rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM, !bLeftToRight ) ); diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 3bdcc15ada35..f0c32d1bf830 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -185,9 +185,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SfxItemState::DEFAULT && aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SfxItemState::DEFAULT ) { - long nVal1 = static_cast<const SdrMetricItem&>( aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue(); - long nVal2 = static_cast<const SdrMetricItem&>( aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue(); - long nVal3 = static_cast<const SdrMetricItem&>( aAttrSet.Get( SDRATTR_EDGELINE3DELTA ) ).GetValue(); + long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA ).GetValue(); + long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA ).GetValue(); + long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA ).GetValue(); { if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) bDisable = false; diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 77ce8cdfc868..9142d3c42186 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -47,7 +47,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj m_rBindings ( rBindings ), m_dResolution ( 96.0 ) { - const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP) ); + const SdrGrafCropItem& rCrop = m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP); m_aCropRectangle = tools::Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); Initialize(); diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 0391efac9314..1acaa9db15ad 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -245,7 +245,7 @@ sal_uInt16 SvxXConnectionPreview::GetLineDeltaCount() sal_uInt16 nCount(0); if(SfxItemState::DONTCARE != rSet.GetItemState(SDRATTR_EDGELINEDELTACOUNT)) - nCount = static_cast<const SdrEdgeLineDeltaCountItem&>(rSet.Get(SDRATTR_EDGELINEDELTACOUNT)).GetValue(); + nCount = rSet.Get(SDRATTR_EDGELINEDELTACOUNT).GetValue(); return nCount; } diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 7b202510c75a..79e5900f4f40 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -298,17 +298,17 @@ namespace sdr // create and fill GraphicAttr GraphicAttr aLocalGrafInfo; - const sal_uInt16 nTrans(static_cast<const SdrGrafTransparenceItem&>(rItemSet.Get(SDRATTR_GRAFTRANSPARENCE)).GetValue()); - const SdrGrafCropItem& rCrop(static_cast<const SdrGrafCropItem&>(rItemSet.Get(SDRATTR_GRAFCROP))); - aLocalGrafInfo.SetLuminance(static_cast<const SdrGrafLuminanceItem&>(rItemSet.Get(SDRATTR_GRAFLUMINANCE)).GetValue()); - aLocalGrafInfo.SetContrast(static_cast<const SdrGrafContrastItem&>(rItemSet.Get(SDRATTR_GRAFCONTRAST)).GetValue()); - aLocalGrafInfo.SetChannelR(static_cast<const SdrGrafRedItem&>(rItemSet.Get(SDRATTR_GRAFRED)).GetValue()); - aLocalGrafInfo.SetChannelG(static_cast<const SdrGrafGreenItem&>(rItemSet.Get(SDRATTR_GRAFGREEN)).GetValue()); - aLocalGrafInfo.SetChannelB(static_cast<const SdrGrafBlueItem&>(rItemSet.Get(SDRATTR_GRAFBLUE)).GetValue()); - aLocalGrafInfo.SetGamma(static_cast<const SdrGrafGamma100Item&>(rItemSet.Get(SDRATTR_GRAFGAMMA)).GetValue() * 0.01); + const sal_uInt16 nTrans(rItemSet.Get(SDRATTR_GRAFTRANSPARENCE).GetValue()); + const SdrGrafCropItem& rCrop(rItemSet.Get(SDRATTR_GRAFCROP)); + aLocalGrafInfo.SetLuminance(rItemSet.Get(SDRATTR_GRAFLUMINANCE).GetValue()); + aLocalGrafInfo.SetContrast(rItemSet.Get(SDRATTR_GRAFCONTRAST).GetValue()); + aLocalGrafInfo.SetChannelR(rItemSet.Get(SDRATTR_GRAFRED).GetValue()); + aLocalGrafInfo.SetChannelG(rItemSet.Get(SDRATTR_GRAFGREEN).GetValue()); + aLocalGrafInfo.SetChannelB(rItemSet.Get(SDRATTR_GRAFBLUE).GetValue()); + aLocalGrafInfo.SetGamma(rItemSet.Get(SDRATTR_GRAFGAMMA).GetValue() * 0.01); aLocalGrafInfo.SetTransparency((sal_uInt8)::basegfx::fround(std::min(nTrans, (sal_uInt16)100) * 2.55)); - aLocalGrafInfo.SetInvert(static_cast<const SdrGrafInvertItem&>(rItemSet.Get(SDRATTR_GRAFINVERT)).GetValue()); - aLocalGrafInfo.SetDrawMode(static_cast<const SdrGrafModeItem&>(rItemSet.Get(SDRATTR_GRAFMODE)).GetValue()); + aLocalGrafInfo.SetInvert(rItemSet.Get(SDRATTR_GRAFINVERT).GetValue()); + aLocalGrafInfo.SetDrawMode(rItemSet.Get(SDRATTR_GRAFMODE).GetValue()); aLocalGrafInfo.SetCrop(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); // we have content if graphic is not completely transparent diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index bcc4137f8083..7104edcb227c 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -85,8 +85,8 @@ namespace sdr } else { - const sal_Int32 nNewStart(static_cast<const SdrAngleItem&>(rItemSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue()); - const sal_Int32 nNewEnd(static_cast<const SdrAngleItem&>(rItemSet.Get(SDRATTR_CIRCENDANGLE)).GetValue()); + const sal_Int32 nNewStart(rItemSet.Get(SDRATTR_CIRCSTARTANGLE).GetValue()); + const sal_Int32 nNewEnd(rItemSet.Get(SDRATTR_CIRCENDANGLE).GetValue()); const double fStart(((36000 - nNewEnd) % 36000) * F_PI18000); const double fEnd(((36000 - nNewStart) % 36000) * F_PI18000); const bool bCloseSegment(OBJ_CARC != nIdentifier); diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx index bf9187d792bc..cdaed5a5b5e5 100644 --- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx @@ -54,18 +54,18 @@ namespace sdr // take properties which are the model data. const ::basegfx::B2DPoint aStart(GetMeasureObj().GetPoint(0).X(), GetMeasureObj().GetPoint(0).Y()); const ::basegfx::B2DPoint aEnd(GetMeasureObj().GetPoint(1).X(), GetMeasureObj().GetPoint(1).Y()); - const double fDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASURELINEDIST)).GetValue()); - const double fUpperDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue()); - const double fLowerDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST)).GetValue()); - const double fLeftDelta(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN)).GetValue()); - const double fRightDelta(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN)).GetValue()); - const bool bBelow(static_cast<const SdrMeasureBelowRefEdgeItem&>(rItemSet.Get(SDRATTR_MEASUREBELOWREFEDGE)).GetValue()); - const bool bTextRotation(static_cast<const SdrMeasureTextRota90Item&>(rItemSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue()); - const bool bTextAutoAngle(static_cast<const SdrMeasureTextAutoAngleItem&>(rItemSet.Get(SDRATTR_MEASURETEXTAUTOANGLE)).GetValue()); + const double fDistance(rItemSet.Get(SDRATTR_MEASURELINEDIST).GetValue()); + const double fUpperDistance(rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG).GetValue()); + const double fLowerDistance(rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST).GetValue()); + const double fLeftDelta(rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN).GetValue()); + const double fRightDelta(rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN).GetValue()); + const bool bBelow(rItemSet.Get(SDRATTR_MEASUREBELOWREFEDGE).GetValue()); + const bool bTextRotation(rItemSet.Get(SDRATTR_MEASURETEXTROTA90).GetValue()); + const bool bTextAutoAngle(rItemSet.Get(SDRATTR_MEASURETEXTAUTOANGLE).GetValue()); drawinglayer::primitive2d::MeasureTextPosition aMTPHor(drawinglayer::primitive2d::MEASURETEXTPOSITION_AUTOMATIC); drawinglayer::primitive2d::MeasureTextPosition aMTPVer(drawinglayer::primitive2d::MEASURETEXTPOSITION_AUTOMATIC); - switch(static_cast<const SdrMeasureTextHPosItem&>(rItemSet.Get(SDRATTR_MEASURETEXTHPOS)).GetValue()) + switch(rItemSet.Get(SDRATTR_MEASURETEXTHPOS).GetValue()) { case css::drawing::MeasureTextHorzPos::MeasureTextHorzPos_LEFTOUTSIDE: { @@ -88,7 +88,7 @@ namespace sdr } } - switch(static_cast<const SdrMeasureTextVPosItem&>(rItemSet.Get(SDRATTR_MEASURETEXTVPOS)).GetValue()) + switch(rItemSet.Get(SDRATTR_MEASURETEXTVPOS).GetValue()) { case css::drawing::MeasureTextVertPos_EAST: { 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(); } diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 3d4d53df8803..ff24039ef3ce 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -64,7 +64,6 @@ using namespace ::com::sun::star::lang; #include <svx/svxdlg.hxx> #define SYMBOL_TO_FIELD_OFFSET 4 -#define ITEMVALUE(ItemSet,Id,Cast) static_cast<const Cast&>((ItemSet).Get(Id)).GetValue() #define TOOLBOX_NAME "colorbar" #define RID_SVXSTR_UNDO_GRAFCROP RID_SVXSTR_GRAFCROP @@ -692,7 +691,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic( pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) ); - const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( aGrfAttr.Get( SDRATTR_GRAFCROP ) ); + const SdrGrafCropItem& rCrop = aGrfAttr.Get( SDRATTR_GRAFCROP ); Size aLTSize( OutputDevice::LogicToLogic( Size( rCrop.GetLeft(), rCrop.GetTop() ), aMap100, aMapTwip ) ); Size aRBSize( OutputDevice::LogicToLogic( @@ -726,7 +725,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) // set crop attributes if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) ) { - const SdrGrafCropItem& rNewCrop = static_cast<const SdrGrafCropItem&>( pOutAttr->Get( SDRATTR_GRAFCROP ) ); + const SdrGrafCropItem& rNewCrop = pOutAttr->Get( SDRATTR_GRAFCROP ); aLTSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetLeft(), rNewCrop.GetTop() ), aMapTwip, aMap100 ); aRBSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetRight(), rNewCrop.GetBottom() ), aMapTwip, aMap100 ); @@ -870,7 +869,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie if( bEnableColors ) { rSet.Put( SfxUInt16Item( nSlotId, - sal::static_int_cast< sal_uInt16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) ); + sal::static_int_cast< sal_uInt16 >( aAttrSet.Get(SDRATTR_GRAFMODE).GetValue() ) ) ); } else { @@ -886,8 +885,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie { if( bEnableColors ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFRED, SdrGrafRedItem ) ) ); + rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFRED).GetValue() ) ); } else { @@ -903,8 +901,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie { if( bEnableColors ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFGREEN, SdrGrafGreenItem ) ) ); + rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFGREEN).GetValue()) ); } else { @@ -920,8 +917,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie { if( bEnableColors ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFBLUE, SdrGrafBlueItem ) ) ); + rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFBLUE).GetValue()) ); } else { @@ -937,8 +933,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie { if( bEnableColors ) { - rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFLUMINANCE, SdrGrafLuminanceItem ) ) ); + rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFLUMINANCE).GetValue()) ); } else { @@ -955,7 +950,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie if( bEnableColors ) { rSet.Put( SfxInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFCONTRAST, SdrGrafContrastItem ) ) ); + aAttrSet.Get(SDRATTR_GRAFCONTRAST).GetValue()) ); } else { @@ -972,7 +967,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie if( bEnableColors ) { rSet.Put( SfxUInt32Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFGAMMA, SdrGrafGamma100Item ) ) ); + aAttrSet.Get(SDRATTR_GRAFGAMMA).GetValue() ) ); } else { @@ -989,7 +984,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie if( bEnableTransparency ) { rSet.Put( SfxUInt16Item( nSlotId, - ITEMVALUE( aAttrSet, SDRATTR_GRAFTRANSPARENCE, SdrGrafTransparenceItem ) ) ); + aAttrSet.Get(SDRATTR_GRAFTRANSPARENCE).GetValue() ) ); } else { diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 05cdf39bdc91..09bced48737c 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -804,7 +804,7 @@ ASK_ESCAPE: else { text::WritingMode eMode = (text::WritingMode) - static_cast<const SvxWritingModeItem&>( aEditAttr.Get( SDRATTR_TEXTDIRECTION ) ).GetValue(); + aEditAttr.Get( SDRATTR_TEXTDIRECTION ).GetValue(); if( nSlotId == SID_TEXTDIRECTION_LEFT_TO_RIGHT ) { |