[Libreoffice-commits] core.git: cui/source filter/source include/svx oox/source sc/source sd/qa sd/source svx/source sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Nov 20 10:54:14 UTC 2017
cui/source/tabpages/textattr.cxx | 20 +-
cui/source/tabpages/tpshadow.cxx | 20 +-
filter/source/msfilter/escherex.cxx | 2
filter/source/msfilter/svdfppt.cxx | 12 -
include/svx/svddef.hxx | 120 ++++++++------
oox/source/export/vmlexport.cxx | 2
sc/source/filter/xcl97/xcl97rec.cxx | 2
sc/source/ui/drawfunc/drtxtob.cxx | 4
sd/qa/unit/export-tests-ooxml1.cxx | 14 -
sd/qa/unit/import-tests.cxx | 8
sd/source/filter/ppt/pptin.cxx | 12 -
sd/source/ui/view/drviews2.cxx | 4
sd/source/ui/view/drviews3.cxx | 6
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4
svx/source/sdr/attribute/sdrformtextattribute.cxx | 4
svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 8
svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | 2
svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 2
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 14 -
svx/source/sdr/properties/customshapeproperties.cxx | 2
svx/source/svdraw/svddrgmt.cxx | 4
svx/source/svdraw/svdedtv1.cxx | 6
svx/source/svdraw/svdedtv2.cxx | 2
svx/source/svdraw/svdedxv.cxx | 2
svx/source/svdraw/svdoashp.cxx | 32 +--
svx/source/svdraw/svdocapt.cxx | 16 -
svx/source/svdraw/svdotext.cxx | 66 +++----
svx/source/svdraw/svdotextdecomposition.cxx | 24 +-
svx/source/svdraw/svdotxat.cxx | 2
svx/source/svdraw/svdotxed.cxx | 2
svx/source/table/cell.cxx | 16 -
svx/source/table/tablecontroller.cxx | 10 -
svx/source/toolbars/fontworkbar.cxx | 4
sw/source/filter/html/htmldrawwriter.cxx | 12 -
sw/source/filter/ww8/wrtw8esh.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 3
sw/source/uibase/shells/drwtxtsh.cxx | 4
37 files changed, 239 insertions(+), 230 deletions(-)
New commits:
commit ffba2c683a5cd7ac3293e146fb0b930545b93609
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Nov 17 11:36:24 2017 +0200
TypedWhichId for SDRATTR* constants (1)
Change-Id: I29bd18fea4dea531ae84ebc024d2aa87a5c7004d
Reviewed-on: https://gerrit.libreoffice.org/44943
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 472a3931d8e6..36063403c765 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -190,11 +190,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
// adjust to height and autogrowsize
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
{
- m_pTsbAutoGrowHeight->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
+ m_pTsbAutoGrowHeight->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowHeight->EnableTriState( false );
- m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
+ m_pTsbAutoGrowSize->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowSize->EnableTriState( false );
}
@@ -209,7 +209,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
// adjust to width
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE )
{
- m_pTsbAutoGrowWidth->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ).
+ m_pTsbAutoGrowWidth->SetState( rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowWidth->EnableTriState( false );
}
@@ -220,7 +220,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
// wordwrap text
if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE )
{
- m_pTsbWordWrapText->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_WORDWRAP ) ).
+ m_pTsbWordWrapText->SetState( rAttrs->Get( SDRATTR_TEXT_WORDWRAP ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbWordWrapText->EnableTriState( false );
}
@@ -237,8 +237,8 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
{
// VertAdjust and HorAdjust are unequivocal, thus
- SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
- SdrTextHorzAdjust eTHA = static_cast<const SdrTextHorzAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_HORZADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = rAttrs->Get(SDRATTR_TEXT_VERTADJUST).GetValue();
+ SdrTextHorzAdjust eTHA = rAttrs->Get(SDRATTR_TEXT_HORZADJUST).GetValue();
RectPoint eRP = RectPoint::LB;
m_pTsbFullWidth->EnableTriState( false );
@@ -312,7 +312,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SfxItemState::DONTCARE )
{
drawing::TextFitToSizeType const eFTS =
- static_cast<const SdrTextFitToSizeTypeItem&>( rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
+ rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ).GetValue();
if (eFTS == drawing::TextFitToSizeType_AUTOFIT || eFTS == drawing::TextFitToSizeType_NONE)
m_pTsbFitToSize->SetState( TRISTATE_FALSE );
else
@@ -326,7 +326,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SfxItemState::DONTCARE )
{
- bool bContour = static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bool bContour = rAttrs->Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue();
m_pTsbContour->SetState( bContour ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbContour->EnableTriState( false );
}
@@ -464,7 +464,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE )
{
- eOldTVA = static_cast<const SdrTextVertAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue();
+ eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue();
if( eOldTVA != eTVA )
rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
}
@@ -473,7 +473,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE )
{
- eOldTHA = static_cast<const SdrTextHorzAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue();
+ eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue();
if( eOldTHA != eTHA )
rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
}
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index c77b4375d307..70a9c5b95208 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -279,10 +279,8 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
if( m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE &&
m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE )
{
- nOldX = static_cast<const SdrMetricItem&>( m_rOutAttrs.
- Get( SDRATTR_SHADOWXDIST ) ).GetValue();
- nOldY = static_cast<const SdrMetricItem&>( m_rOutAttrs.
- Get( SDRATTR_SHADOWYDIST ) ).GetValue();
+ nOldX = m_rOutAttrs.Get( SDRATTR_SHADOWXDIST ).GetValue();
+ nOldY = m_rOutAttrs.Get( SDRATTR_SHADOWYDIST ).GetValue();
}
SdrMetricItem aXItem( makeSdrShadowXDistItem(nX) );
pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWXDIST );
@@ -342,7 +340,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
{
m_pTsbShowShadow->EnableTriState( false );
- if( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_SHADOW ) ).GetValue() )
+ if( rAttrs->Get( SDRATTR_SHADOW ).GetValue() )
m_pTsbShowShadow->SetState( TRISTATE_TRUE );
else
{
@@ -358,8 +356,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE &&
rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE )
{
- sal_Int32 nX = static_cast<const SdrMetricItem&>( rAttrs->Get( SDRATTR_SHADOWXDIST ) ).GetValue();
- sal_Int32 nY = static_cast<const SdrMetricItem&>( rAttrs->Get( SDRATTR_SHADOWYDIST ) ).GetValue();
+ sal_Int32 nX = rAttrs->Get( SDRATTR_SHADOWXDIST ).GetValue();
+ sal_Int32 nY = rAttrs->Get( SDRATTR_SHADOWYDIST ).GetValue();
if( nX != 0 )
SetMetricValue( *m_pMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit );
@@ -382,8 +380,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
{
// determine default-distance
SfxItemPool* pPool = m_rOutAttrs.GetPool();
- const SdrMetricItem* pXDistItem = static_cast<const SdrMetricItem*>(&pPool->GetDefaultItem(SDRATTR_SHADOWXDIST));
- const SdrMetricItem* pYDistItem = static_cast<const SdrMetricItem*>(&pPool->GetDefaultItem(SDRATTR_SHADOWYDIST));
+ const SdrMetricItem* pXDistItem = &pPool->GetDefaultItem(SDRATTR_SHADOWXDIST);
+ const SdrMetricItem* pYDistItem = &pPool->GetDefaultItem(SDRATTR_SHADOWYDIST);
if (pXDistItem && pYDistItem)
{
sal_Int32 nX = pXDistItem->GetValue();
@@ -403,14 +401,14 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE )
{
- m_pLbShadowColor->SelectEntry( static_cast<const XColorItem&>( rAttrs->Get( SDRATTR_SHADOWCOLOR ) ).GetColorValue() );
+ m_pLbShadowColor->SelectEntry( rAttrs->Get( SDRATTR_SHADOWCOLOR ).GetColorValue() );
}
else
m_pLbShadowColor->SetNoSelection();
if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::DONTCARE )
{
- sal_uInt16 nTransp = static_cast<const SdrPercentItem&>( rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue();
+ sal_uInt16 nTransp = rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ).GetValue();
m_pMtrTransparent->SetValue( nTransp );
}
else
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d404bf3b1df4..5a27ec408d79 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3449,7 +3449,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
case drawing::TextHorizontalAdjust_BLOCK:
{
drawing::TextFitToSizeType const eFTS(
- static_cast<const SdrTextFitToSizeTypeItem&>(pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+ pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE ).GetValue() );
if (eFTS == drawing::TextFitToSizeType_ALLLINES ||
eFTS == drawing::TextFitToSizeType_PROPORTIONAL)
{
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 27e0de3d2962..78a8e1b9500a 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7387,16 +7387,16 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{
Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
- const sal_Int32 nLeftDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST)).GetValue());
- const sal_Int32 nRightDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
- const sal_Int32 nUpperDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
- const sal_Int32 nLowerDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
+ const sal_Int32 nLeftDist(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST).GetValue());
+ const sal_Int32 nRightDist(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
+ const sal_Int32 nUpperDist(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST).GetValue());
+ const sal_Int32 nLowerDist(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST).GetValue());
xPropSet->setPropertyValue( "TextUpperDistance", Any( nUpperDist ) );
xPropSet->setPropertyValue( "TextRightDistance", Any( nRightDist ) );
xPropSet->setPropertyValue( "TextLeftDistance", Any( nLeftDist ) );
xPropSet->setPropertyValue( "TextLowerDistance", Any( nLowerDist ) );
- const SdrTextVertAdjust eTextVertAdjust(static_cast<const SdrTextVertAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
+ const SdrTextVertAdjust eTextVertAdjust(pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST).GetValue());
drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
eVA = drawing::TextVerticalAdjust_CENTER;
@@ -7405,7 +7405,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
//set textHorizontalAdjust and TextWritingMode attr
- const sal_Int32 eHA(static_cast<const SdrTextHorzAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
+ const sal_Int32 eHA(pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST).GetValue());
const SvxFrameDirection eDirection = pObj->GetMergedItem(EE_PARA_WRITINGDIR).GetValue();
xPropSet->setPropertyValue( "TextHorizontalAdjust" , Any( eHA ) );
if ( eDirection == SvxFrameDirection::Vertical_RL_TB )
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 61e61df07ffc..2d30918b6441 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SVX_SVDDEF_HXX
#include <svx/xdef.hxx>
+#include <svl/typedwhich.hxx>
/*************************************************************************/
// SdrItemPool V2, 09-11-1995:
@@ -59,59 +60,78 @@
// V3: 1000..1126, 1127..1140
// V4: 1000..1126, 1172..1185
+
+class SdrAngleItem;
+class SdrCaptionEscAbsItem;
+class SdrCaptionEscDirItem;
+class SdrCaptionEscIsRelItem;
+class SdrCaptionEscRelItem;
+class SdrCaptionFitLineLenItem;
+class SdrCaptionLineLenItem;
+class SdrCaptionTypeItem;
+class SdrMetricItem;
+class SdrOnOffItem;
+class SdrPercentItem;
+class SdrTextFitToSizeTypeItem;
+class SdrTextFixedCellHeightItem;
+class SdrTextVertAdjustItem;
+class SfxStringItem;
+class SfxVoidItem;
+class XColorItem;
+
#define SDRATTR_START XATTR_START /* 1000 */
- /* Pool V4*/ /* Pool V3*/ /* Pool V2*/
-#define SDRATTR_SHADOW_FIRST (XATTR_END + 1) /* 1067 */ /* 1067 */ /* 1050 */ /* Pool V1: 1036 */
-#define SDRATTR_SHADOW (SDRATTR_SHADOW_FIRST+ 0) /* 1067 */ /* 1067 */ /* 1050 */
-#define SDRATTR_SHADOWCOLOR (SDRATTR_SHADOW_FIRST+ 1) /* 1068 */ /* 1068 */ /* 1051 */
-#define SDRATTR_SHADOWXDIST (SDRATTR_SHADOW_FIRST+ 2) /* 1069 */ /* 1069 */ /* 1052 */
-#define SDRATTR_SHADOWYDIST (SDRATTR_SHADOW_FIRST+ 3) /* 1070 */ /* 1070 */ /* 1053 */
-#define SDRATTR_SHADOWTRANSPARENCE (SDRATTR_SHADOW_FIRST+ 4) /* 1071 */ /* 1071 */ /* 1054 */ /* Pool V2 */
-#define SDRATTR_SHADOW3D (SDRATTR_SHADOW_FIRST+ 5) /* 1072 */ /* 1072 */ /* 1055 */ /* Pool V2 */
-#define SDRATTR_SHADOWPERSP (SDRATTR_SHADOW_FIRST+ 6) /* 1073 */ /* 1073 */ /* 1056 */ /* Pool V2 */
-#define SDRATTR_SHADOW_LAST (SDRATTR_SHADOWPERSP) /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */
+ /* Pool V4*/ /* Pool V3*/ /* Pool V2*/
+#define SDRATTR_SHADOW_FIRST (XATTR_END + 1) /* 1067 */ /* 1067 */ /* 1050 */ /* Pool V1: 1036 */
+#define SDRATTR_SHADOW TypedWhichId<SdrOnOffItem>(SDRATTR_SHADOW_FIRST+ 0) /* 1067 */ /* 1067 */ /* 1050 */
+#define SDRATTR_SHADOWCOLOR TypedWhichId<XColorItem>(SDRATTR_SHADOW_FIRST+ 1) /* 1068 */ /* 1068 */ /* 1051 */
+#define SDRATTR_SHADOWXDIST TypedWhichId<SdrMetricItem>(SDRATTR_SHADOW_FIRST+ 2) /* 1069 */ /* 1069 */ /* 1052 */
+#define SDRATTR_SHADOWYDIST TypedWhichId<SdrMetricItem>(SDRATTR_SHADOW_FIRST+ 3) /* 1070 */ /* 1070 */ /* 1053 */
+#define SDRATTR_SHADOWTRANSPARENCE TypedWhichId<SdrPercentItem>(SDRATTR_SHADOW_FIRST+ 4) /* 1071 */ /* 1071 */ /* 1054 */ /* Pool V2 */
+#define SDRATTR_SHADOW3D TypedWhichId<SfxVoidItem>(SDRATTR_SHADOW_FIRST+ 5) /* 1072 */ /* 1072 */ /* 1055 */ /* Pool V2 */
+#define SDRATTR_SHADOWPERSP TypedWhichId<SfxVoidItem>(SDRATTR_SHADOW_FIRST+ 6) /* 1073 */ /* 1073 */ /* 1056 */ /* Pool V2 */
+#define SDRATTR_SHADOW_LAST (SDRATTR_SHADOWPERSP) /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */
-#define SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1) /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */
-#define SDRATTR_CAPTIONTYPE (SDRATTR_CAPTION_FIRST+ 0) /* 1080 */ /* 1080 */ /* 1063 */
-#define SDRATTR_CAPTIONFIXEDANGLE (SDRATTR_CAPTION_FIRST+ 1) /* 1081 */ /* 1081 */ /* 1064 */
-#define SDRATTR_CAPTIONANGLE (SDRATTR_CAPTION_FIRST+ 2) /* 1082 */ /* 1082 */ /* 1065 */
-#define SDRATTR_CAPTIONGAP (SDRATTR_CAPTION_FIRST+ 3) /* 1083 */ /* 1083 */ /* 1066 */
-#define SDRATTR_CAPTIONESCDIR (SDRATTR_CAPTION_FIRST+ 4) /* 1084 */ /* 1084 */ /* 1067 */
-#define SDRATTR_CAPTIONESCISREL (SDRATTR_CAPTION_FIRST+ 5) /* 1085 */ /* 1085 */ /* 1068 */
-#define SDRATTR_CAPTIONESCREL (SDRATTR_CAPTION_FIRST+ 6) /* 1086 */ /* 1086 */ /* 1069 */
-#define SDRATTR_CAPTIONESCABS (SDRATTR_CAPTION_FIRST+ 7) /* 1087 */ /* 1087 */ /* 1070 */
-#define SDRATTR_CAPTIONLINELEN (SDRATTR_CAPTION_FIRST+ 8) /* 1088 */ /* 1088 */ /* 1071 */
-#define SDRATTR_CAPTIONFITLINELEN (SDRATTR_CAPTION_FIRST+ 9) /* 1089 */ /* 1089 */ /* 1072 */
-#define SDRATTR_CAPTION_LAST (SDRATTR_CAPTIONFITLINELEN) /* 1094 */ /* 1094 */ /* 1077 */ /* Pool V1: 1050 */
+#define SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1) /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */
+#define SDRATTR_CAPTIONTYPE TypedWhichId<SdrCaptionTypeItem>(SDRATTR_CAPTION_FIRST+ 0) /* 1080 */ /* 1080 */ /* 1063 */
+#define SDRATTR_CAPTIONFIXEDANGLE TypedWhichId<SdrOnOffItem>(SDRATTR_CAPTION_FIRST+ 1) /* 1081 */ /* 1081 */ /* 1064 */
+#define SDRATTR_CAPTIONANGLE TypedWhichId<SdrAngleItem>(SDRATTR_CAPTION_FIRST+ 2) /* 1082 */ /* 1082 */ /* 1065 */
+#define SDRATTR_CAPTIONGAP TypedWhichId<SdrMetricItem>(SDRATTR_CAPTION_FIRST+ 3) /* 1083 */ /* 1083 */ /* 1066 */
+#define SDRATTR_CAPTIONESCDIR TypedWhichId<SdrCaptionEscDirItem>(SDRATTR_CAPTION_FIRST+ 4) /* 1084 */ /* 1084 */ /* 1067 */
+#define SDRATTR_CAPTIONESCISREL TypedWhichId<SdrCaptionEscIsRelItem>(SDRATTR_CAPTION_FIRST+ 5) /* 1085 */ /* 1085 */ /* 1068 */
+#define SDRATTR_CAPTIONESCREL TypedWhichId<SdrCaptionEscRelItem>(SDRATTR_CAPTION_FIRST+ 6) /* 1086 */ /* 1086 */ /* 1069 */
+#define SDRATTR_CAPTIONESCABS TypedWhichId<SdrCaptionEscAbsItem>(SDRATTR_CAPTION_FIRST+ 7) /* 1087 */ /* 1087 */ /* 1070 */
+#define SDRATTR_CAPTIONLINELEN TypedWhichId<SdrCaptionLineLenItem>(SDRATTR_CAPTION_FIRST+ 8) /* 1088 */ /* 1088 */ /* 1071 */
+#define SDRATTR_CAPTIONFITLINELEN TypedWhichId<SdrCaptionFitLineLenItem>(SDRATTR_CAPTION_FIRST+ 9) /* 1089 */ /* 1089 */ /* 1072 */
+#define SDRATTR_CAPTION_LAST (SDRATTR_CAPTIONFITLINELEN) /* 1094 */ /* 1094 */ /* 1077 */ /* Pool V1: 1050 */
-#define SDRATTR_MISC_FIRST (SDRATTR_CAPTION_LAST + 1) /* 1097 */ /* 1097 */ /* 1080 */ /* Pool V1: 1053 */
-#define SDRATTR_ECKENRADIUS (SDRATTR_MISC_FIRST + 0) /* 1097 */ /* 1097 */ /* 1080 long, def=0 */
-#define SDRATTR_TEXT_MINFRAMEHEIGHT (SDRATTR_MISC_FIRST + 1) /* 1098 */ /* 1098 */ /* 1081 long, def=0 */
-#define SDRATTR_TEXT_AUTOGROWHEIGHT (SDRATTR_MISC_FIRST + 2) /* 1099 */ /* 1099 */ /* 1082 sal_Bool, def=sal_True */
-#define SDRATTR_TEXT_FITTOSIZE (SDRATTR_MISC_FIRST + 3) /* 1100 */ /* 1100 */ /* 1083 enum, def=css::drawing::TextFitToSizeType_NONE */
-#define SDRATTR_TEXT_LEFTDIST (SDRATTR_MISC_FIRST + 4) /* 1101 */ /* 1101 */ /* 1084 long, def=0 */ /* Pool V2 */
-#define SDRATTR_TEXT_RIGHTDIST (SDRATTR_MISC_FIRST + 5) /* 1102 */ /* 1102 */ /* 1085 long, def=0 */ /* Pool V2 */
-#define SDRATTR_TEXT_UPPERDIST (SDRATTR_MISC_FIRST + 6) /* 1103 */ /* 1103 */ /* 1086 long, def=0 */ /* Pool V2 */
-#define SDRATTR_TEXT_LOWERDIST (SDRATTR_MISC_FIRST + 7) /* 1104 */ /* 1104 */ /* 1087 long, def=0 */ /* Pool V2 */
-#define SDRATTR_TEXT_VERTADJUST (SDRATTR_MISC_FIRST + 8) /* 1105 */ /* 1105 */ /* 1088 enum, def=SDRTEXTVERTADJUST_TOP */ /* Pool V2 */
-#define SDRATTR_TEXT_MAXFRAMEHEIGHT (SDRATTR_MISC_FIRST + 9) /* 1106 */ /* 1106 */ /* 1089 long, def=0 - Pool V2 */
-#define SDRATTR_TEXT_MINFRAMEWIDTH (SDRATTR_MISC_FIRST +10) /* 1107 */ /* 1107 */ /* 1090 long, def=0 - Pool V2 */
-#define SDRATTR_TEXT_MAXFRAMEWIDTH (SDRATTR_MISC_FIRST +11) /* 1108 */ /* 1108 */ /* 1091 long, def=0 - Pool V2 */
-#define SDRATTR_TEXT_AUTOGROWWIDTH (SDRATTR_MISC_FIRST +12) /* 1109 */ /* 1109 */ /* 1092 sal_Bool, def=sal_False - Pool V2 */
-#define SDRATTR_TEXT_HORZADJUST (SDRATTR_MISC_FIRST +13) /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */
-#define SDRATTR_TEXT_ANIKIND (SDRATTR_MISC_FIRST +14) /* 1111 */ /* 1111 */ /* 1094 enum, def=SdrTextAniKind::NONE - Pool V2/V4 */
-#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SdrTextAniDirection::Left - Pool V2/V4 */
-#define SDRATTR_TEXT_ANISTARTINSIDE (SDRATTR_MISC_FIRST +16) /* 1113 */ /* 1113 */ /* 1096 sal_Bool, def=sal_False - Pool V2/V4 */
-#define SDRATTR_TEXT_ANISTOPINSIDE (SDRATTR_MISC_FIRST +17) /* 1114 */ /* 1114 */ /* 1097 sal_Bool, def=sal_False - Pool V2/V4 */
-#define SDRATTR_TEXT_ANICOUNT (SDRATTR_MISC_FIRST +18) /* 1115 */ /* 1115 */ /* 1098 sal_uInt16, def=0 - Pool V2/V4 */
-#define SDRATTR_TEXT_ANIDELAY (SDRATTR_MISC_FIRST +19) /* 1116 */ /* 1116 */ /* 1099 sal_uInt16, def=0 - Pool V2/V4 */
-#define SDRATTR_TEXT_ANIAMOUNT (SDRATTR_MISC_FIRST +20) /* 1117 */ /* 1117 */ /* 1100 sal_uInt16, def=0 - Pool V2/V4 */
-#define SDRATTR_TEXT_CONTOURFRAME (SDRATTR_MISC_FIRST +21) /* 1118 */ /* 1118 */ /* 1101 */ /* Pool V2 */
-#define SDRATTR_XMLATTRIBUTES (SDRATTR_MISC_FIRST +22) /* 1120 */ /* 1120 */ /* 1103 */ /* Pool V2 */
-#define SDRATTR_TEXT_USEFIXEDCELLHEIGHT (SDRATTR_MISC_FIRST +23) /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */
-#define SDRATTR_TEXT_WORDWRAP (SDRATTR_MISC_FIRST +24) /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */
-#define SDRATTR_TEXT_CHAINNEXTNAME (SDRATTR_MISC_FIRST +25) /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */
-#define SDRATTR_MISC_LAST (SDRATTR_TEXT_CHAINNEXTNAME) /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */
+#define SDRATTR_MISC_FIRST (SDRATTR_CAPTION_LAST + 1) /* 1097 */ /* 1097 */ /* 1080 */ /* Pool V1: 1053 */
+#define SDRATTR_ECKENRADIUS TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 0) /* 1097 */ /* 1097 */ /* 1080 long, def=0 */
+#define SDRATTR_TEXT_MINFRAMEHEIGHT TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 1) /* 1098 */ /* 1098 */ /* 1081 long, def=0 */
+#define SDRATTR_TEXT_AUTOGROWHEIGHT TypedWhichId<SdrOnOffItem>(SDRATTR_MISC_FIRST + 2) /* 1099 */ /* 1099 */ /* 1082 sal_Bool, def=sal_True */
+#define SDRATTR_TEXT_FITTOSIZE TypedWhichId<SdrTextFitToSizeTypeItem>(SDRATTR_MISC_FIRST + 3) /* 1100 */ /* 1100 */ /* 1083 enum, def=css::drawing::TextFitToSizeType_NONE */
+#define SDRATTR_TEXT_LEFTDIST TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 4) /* 1101 */ /* 1101 */ /* 1084 long, def=0 */ /* Pool V2 */
+#define SDRATTR_TEXT_RIGHTDIST TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 5) /* 1102 */ /* 1102 */ /* 1085 long, def=0 */ /* Pool V2 */
+#define SDRATTR_TEXT_UPPERDIST TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 6) /* 1103 */ /* 1103 */ /* 1086 long, def=0 */ /* Pool V2 */
+#define SDRATTR_TEXT_LOWERDIST TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 7) /* 1104 */ /* 1104 */ /* 1087 long, def=0 */ /* Pool V2 */
+#define SDRATTR_TEXT_VERTADJUST TypedWhichId<SdrTextVertAdjustItem>(SDRATTR_MISC_FIRST + 8) /* 1105 */ /* 1105 */ /* 1088 enum, def=SDRTEXTVERTADJUST_TOP */ /* Pool V2 */
+#define SDRATTR_TEXT_MAXFRAMEHEIGHT TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST + 9) /* 1106 */ /* 1106 */ /* 1089 long, def=0 - Pool V2 */
+#define SDRATTR_TEXT_MINFRAMEWIDTH TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST +10) /* 1107 */ /* 1107 */ /* 1090 long, def=0 - Pool V2 */
+#define SDRATTR_TEXT_MAXFRAMEWIDTH TypedWhichId<SdrMetricItem>(SDRATTR_MISC_FIRST +11) /* 1108 */ /* 1108 */ /* 1091 long, def=0 - Pool V2 */
+#define SDRATTR_TEXT_AUTOGROWWIDTH TypedWhichId<SdrOnOffItem>(SDRATTR_MISC_FIRST +12) /* 1109 */ /* 1109 */ /* 1092 sal_Bool, def=sal_False - Pool V2 */
+#define SDRATTR_TEXT_HORZADJUST TypedWhichId<SdrTextHorzAdjustItem>(SDRATTR_MISC_FIRST +13) /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */
+#define SDRATTR_TEXT_ANIKIND TypedWhichId<SdrTextAniKindItem>(SDRATTR_MISC_FIRST +14) /* 1111 */ /* 1111 */ /* 1094 enum, def=SdrTextAniKind::NONE - Pool V2/V4 */
+#define SDRATTR_TEXT_ANIDIRECTION TypedWhichId<SdrTextAniDirectionItem>(SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SdrTextAniDirection::Left - Pool V2/V4 */
+#define SDRATTR_TEXT_ANISTARTINSIDE TypedWhichId<SdrTextAniStartInsideItem>(SDRATTR_MISC_FIRST +16) /* 1113 */ /* 1113 */ /* 1096 sal_Bool, def=sal_False - Pool V2/V4 */
+#define SDRATTR_TEXT_ANISTOPINSIDE TypedWhichId<SdrTextAniStopInsideItem>(SDRATTR_MISC_FIRST +17) /* 1114 */ /* 1114 */ /* 1097 sal_Bool, def=sal_False - Pool V2/V4 */
+#define SDRATTR_TEXT_ANICOUNT TypedWhichId<SdrTextAniCountItem>(SDRATTR_MISC_FIRST +18) /* 1115 */ /* 1115 */ /* 1098 sal_uInt16, def=0 - Pool V2/V4 */
+#define SDRATTR_TEXT_ANIDELAY TypedWhichId<SdrTextAniDelayItem>(SDRATTR_MISC_FIRST +19) /* 1116 */ /* 1116 */ /* 1099 sal_uInt16, def=0 - Pool V2/V4 */
+#define SDRATTR_TEXT_ANIAMOUNT TypedWhichId<SdrTextAniAmountItem>(SDRATTR_MISC_FIRST +20) /* 1117 */ /* 1117 */ /* 1100 sal_uInt16, def=0 - Pool V2/V4 */
+#define SDRATTR_TEXT_CONTOURFRAME TypedWhichId<SdrOnOffItem>(SDRATTR_MISC_FIRST +21) /* 1118 */ /* 1118 */ /* 1101 */ /* Pool V2 */
+#define SDRATTR_XMLATTRIBUTES TypedWhichId<SvXMLAttrContainerItem>(SDRATTR_MISC_FIRST +22) /* 1120 */ /* 1120 */ /* 1103 */ /* Pool V2 */
+#define SDRATTR_TEXT_USEFIXEDCELLHEIGHT TypedWhichId<SdrTextFixedCellHeightItem>(SDRATTR_MISC_FIRST +23) /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */
+#define SDRATTR_TEXT_WORDWRAP TypedWhichId<SdrOnOffItem>(SDRATTR_MISC_FIRST +24) /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */
+#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 */
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index a290db597df7..b90b18977ec9 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -389,7 +389,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
// Watermark need some padding to be compatible with MSO
long nPaddingY = 0;
const SfxItemSet& rSet = m_pSdrObject->GetMergedItemSet();
- if ( const SdrMetricItem* pItem = static_cast<const SdrMetricItem*>( rSet.GetItem( SDRATTR_TEXT_UPPERDIST ) ) )
+ if ( const SdrMetricItem* pItem = rSet.GetItem( SDRATTR_TEXT_UPPERDIST ) )
nPaddingY += pItem->GetValue();
tools::Rectangle aRect( rRect );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 6109de2251f4..c587a3adba13 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -752,7 +752,7 @@ static sal_uInt8 lcl_GetVerAlignFromItemSet( const SfxItemSet& rItemSet )
{
sal_uInt8 nVerAlign = EXC_OBJ_VER_TOP;
- switch( static_cast< const SdrTextVertAdjustItem& >( rItemSet.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue() )
+ switch( rItemSet.Get( SDRATTR_TEXT_VERTADJUST ).GetValue() )
{
case SDRTEXTVERTADJUST_TOP: nVerAlign = EXC_OBJ_VER_TOP; break;
case SDRTEXTVERTADJUST_CENTER: nVerAlign = EXC_OBJ_VER_CENTER; break;
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index feb264f6ae49..0ab35ac65530 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1224,7 +1224,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet)
SfxItemState eConState = aEditAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SfxItemState::DONTCARE )
{
- bContour = static_cast<const SdrOnOffItem&>( aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = aEditAttr.Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue();
}
if (bContour) break;
@@ -1234,7 +1234,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet)
//if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
if(SfxItemState::DONTCARE != eVState)
{
- SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = aEditAttr.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 0ad825d57700..a31ff8d350e7 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -313,17 +313,17 @@ void SdOOXMLExportTest1::testFdo71961()
SdrObjCustomShape *pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 1 ));
CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Text to be always wrapped" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
- CPPUNIT_ASSERT_EQUAL( true, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
+ CPPUNIT_ASSERT_EQUAL( true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 2 ));
CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Custom shape non-wrapped text" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
- CPPUNIT_ASSERT_EQUAL( false, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
+ CPPUNIT_ASSERT_EQUAL( false, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 3 ));
CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Custom shape wrapped text" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
- CPPUNIT_ASSERT_EQUAL( true, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
+ CPPUNIT_ASSERT_EQUAL( true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue());
xDocShRef->DoClose();
}
@@ -397,10 +397,10 @@ void SdOOXMLExportTest1::testBnc862510_5()
CPPUNIT_ASSERT(pObjGroup);
const SdrObject* pObj = pObjGroup->GetSubList()->GetObj(1);
CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(7510), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(7510), pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST).GetValue());
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 1f0cd6fde6e2..cf03f83d02c5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -768,10 +768,10 @@ void SdImportTest::testBnc870237()
// Simulate a:ext inside dsp:txXfrm with changing the lower distance
const SdrObjGroup* pObj = dynamic_cast<SdrObjGroup*>( pPage->GetObj( 0 ) );
CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue());
- CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST).GetValue());
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST).GetValue());
xDocShRef->DoClose();
}
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 8fe7ceb1b98a..79020b01dac7 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2329,12 +2329,12 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if ( pSheet2 )
{
SfxItemSet& rItemSet = pSheet2->GetItemSet();
- rItemSet.Put( static_cast<const SdrMetricItem&>(pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) ) );
- rItemSet.Put( static_cast<const SdrMetricItem&>(pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST )) );
- rItemSet.Put( static_cast<const SdrMetricItem&>(pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST )) );
- rItemSet.Put( static_cast<const SdrMetricItem&>(pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST )) );
- rItemSet.Put( static_cast<const SdrTextVertAdjustItem&>(pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST )) );
- rItemSet.Put( static_cast<const SdrTextHorzAdjustItem&>(pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST )) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) );
+ rItemSet.Put( pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) );
if ( pTextObj->GetInstance() == TSS_Type::Title
|| pTextObj->GetInstance() == TSS_Type::Subtitle)
{
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6b0259bfeaae..a7236c03bb94 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3559,7 +3559,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SfxItemState::DONTCARE )
{
- bContour = static_cast<const SdrOnOffItem&>( aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue();
}
if (bContour) break;
@@ -3569,7 +3569,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
//if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
if(SfxItemState::DONTCARE != eVState)
{
- SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = aAttrs.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 274644ec72a9..f8f398dd91ca 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -924,8 +924,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
{
- const SdrMetricItem& rTLDItem = static_cast<const SdrMetricItem&>(
- aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ));
+ const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
long nLD = rTLDItem.GetValue();
aPos.X() += nLD;
}
@@ -936,8 +935,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
{
- const SdrMetricItem& rTLDItem = static_cast<const SdrMetricItem&>(
- aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ));
+ const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
long nLD = rTLDItem.GetValue();
aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD );
}
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 0aea03d3ed54..d336ec66e4af 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -415,8 +415,8 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
bool GetFontWorkOutline(FWData& rFWData, const SdrObject* pCustomShape)
{
- SdrTextHorzAdjust eHorzAdjust( static_cast<const SdrTextHorzAdjustItem&>(pCustomShape->GetMergedItem( SDRATTR_TEXT_HORZADJUST )).GetValue() );
- drawing::TextFitToSizeType const eFTS( static_cast<const SdrTextFitToSizeTypeItem&>(pCustomShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+ SdrTextHorzAdjust eHorzAdjust( pCustomShape->GetMergedItem( SDRATTR_TEXT_HORZADJUST ).GetValue() );
+ drawing::TextFitToSizeType const eFTS( pCustomShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE ).GetValue() );
std::vector< FWTextArea >::iterator aTextAreaIter = rFWData.vTextAreas.begin();
std::vector< FWTextArea >::const_iterator aTextAreaIEnd = rFWData.vTextAreas.end();
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 110aadbd0cdd..1a2ff5325698 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -82,7 +82,7 @@ namespace
if(bShadow)
{
- nRetval = (sal_uInt8)((static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue() * 255) / 100);
+ nRetval = (sal_uInt8)((rSet.Get(SDRATTR_SHADOWTRANSPARENCE).GetValue() * 255) / 100);
}
else
{
@@ -98,7 +98,7 @@ namespace
if(bShadow)
{
- const Color aShadowColor(static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue());
+ const Color aShadowColor(rSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue());
aColorAttribute = aShadowColor.getBColor();
}
else
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 413d4abd0785..7fc5effd6cf3 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -108,8 +108,8 @@ namespace sdr
{
// for SC, the caption object may have a specialized shadow. The usual object shadow is off
// and a specialized shadow gets created here (see old paint)
- const XColorItem& rShadColItem = static_cast<const XColorItem&>(rItemSet.Get(SDRATTR_SHADOWCOLOR));
- const sal_uInt16 nShadowTransparence(static_cast<const SdrPercentItem&>(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue());
+ const XColorItem& rShadColItem = rItemSet.Get(SDRATTR_SHADOWCOLOR);
+ const sal_uInt16 nShadowTransparence(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE).GetValue());
const Color aShadowColor(rShadColItem.GetColorValue());
const drawing::FillStyle eShadowStyle = rItemSet.Get(XATTR_FILLSTYLE).GetValue();
@@ -145,8 +145,8 @@ namespace sdr
if(!aFill.isDefault() && 1.0 != aFill.getTransparence())
{
// add shadow offset to object matrix
- const sal_uInt32 nXDist(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWXDIST)).GetValue());
- const sal_uInt32 nYDist(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWYDIST)).GetValue());
+ const sal_uInt32 nXDist(rItemSet.Get(SDRATTR_SHADOWXDIST).GetValue());
+ const sal_uInt32 nYDist(rItemSet.Get(SDRATTR_SHADOWYDIST).GetValue());
if(nXDist || nYDist)
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 03c46280c4d0..8cabe8d261bf 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -215,7 +215,7 @@ namespace sdr
}
// check if SdrTextWordWrapItem is set
- bWordWrap = static_cast<const SdrOnOffItem&>(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP)).GetValue();
+ bWordWrap = GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue();
}
// create primitive
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index c508f3fc8515..c0ab639395de 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -66,7 +66,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV
aObjectRange.getMinX(), aObjectRange.getMinY()));
// calculate corner radius
- sal_uInt32 nCornerRadius(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_ECKENRADIUS)).GetValue());
+ sal_uInt32 nCornerRadius(rItemSet.Get(SDRATTR_ECKENRADIUS).GetValue());
double fCornerRadiusX;
double fCornerRadiusY;
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 799b525493df..dc62cf66c067 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -338,11 +338,11 @@ namespace drawinglayer
attribute::SdrShadowAttribute createNewSdrShadowAttribute(const SfxItemSet& rSet)
{
- const bool bShadow(static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_SHADOW)).GetValue());
+ const bool bShadow(rSet.Get(SDRATTR_SHADOW).GetValue());
if(bShadow)
{
- sal_uInt16 nTransparence(static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue());
+ sal_uInt16 nTransparence(rSet.Get(SDRATTR_SHADOWTRANSPARENCE).GetValue());
if(nTransparence > 100)
{
@@ -371,9 +371,9 @@ namespace drawinglayer
if(100 != nTransparence)
{
const basegfx::B2DVector aOffset(
- (double)static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_SHADOWXDIST)).GetValue(),
- (double)static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_SHADOWYDIST)).GetValue());
- const Color aColor(static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue());
+ (double)rSet.Get(SDRATTR_SHADOWXDIST).GetValue(),
+ (double)rSet.Get(SDRATTR_SHADOWYDIST).GetValue());
+ const Color aColor(rSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue());
return attribute::SdrShadowAttribute(aOffset, (double)nTransparence * 0.01, aColor.getBColor());
}
@@ -577,14 +577,14 @@ namespace drawinglayer
pLower ? *pLower : rTextObj.GetTextLowerDistance(),
rTextObj.GetTextHorizontalAdjust(rSet),
rTextObj.GetTextVerticalAdjust(rSet),
- static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
+ rSet.Get(SDRATTR_TEXT_CONTOURFRAME).GetValue(),
rTextObj.IsFitToSize(),
rTextObj.IsAutoFit(),
rSet.Get(XATTR_FORMTXTHIDEFORM).GetValue(),
SdrTextAniKind::Blink == eAniKind,
SdrTextAniKind::Scroll == eAniKind || SdrTextAniKind::Alternate == eAniKind || SdrTextAniKind::Slide == eAniKind,
bInEditMode,
- static_cast<const SdrTextFixedCellHeightItem&>(rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue(),
+ rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue(),
bWrongSpell,
bChainable);
}
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 24633ee82f99..95ab71fbddef 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -41,7 +41,7 @@ namespace sdr
// change TextFrame flag when bResizeShapeToFitText changes (which is mapped
// on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)
- rObj.bTextFrame = static_cast< const SdrOnOffItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ rObj.bTextFrame = GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
// check if it did change
if(rObj.bTextFrame != bOld)
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 1e3344c26410..840c561c1193 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1314,8 +1314,8 @@ void SdrDragObjOwn::MoveSdrDrag(const Point& rNoSnapPnt)
// also this (pretty indirect) property change is possible. If it gets
// changed, it needs to be copied to the original since nothing will
// happen when it only changes in the drag clone
- const bool bOldAutoGrowWidth(static_cast<const SdrOnOffItem&>(pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
- const bool bNewAutoGrowWidth(static_cast<const SdrOnOffItem&>(mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
+ const bool bOldAutoGrowWidth(pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue());
+ const bool bNewAutoGrowWidth(mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue());
if (bOldAutoGrowWidth != bNewAutoGrowWidth)
{
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index cf04b96e9010..b6da423fb97b 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1351,7 +1351,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH);
- bool bAutoGrow=static_cast<const SdrOnOffItem&>(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
+ bool bAutoGrow=aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH);
} else if (eState==SfxItemState::SET) {
@@ -1359,7 +1359,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT);
- bAutoGrow=static_cast<const SdrOnOffItem&>(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bAutoGrow=aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT);
} else if (eState==SfxItemState::SET) {
@@ -1367,7 +1367,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS);
- long nRadius=static_cast<const SdrMetricItem&>(aMarkAttr.Get(SDRATTR_ECKENRADIUS)).GetValue();
+ long nRadius=aMarkAttr.Get(SDRATTR_ECKENRADIUS).GetValue();
if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS);
} else if (eState==SfxItemState::SET) {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 25a8eeb6c50e..9af01a3954f8 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1586,7 +1586,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
DBG_ASSERT(pCandidate, "SdrEditView::ImpDismantleOneObject: Could not clone SdrObject (!)");
pCandidate->SetModel(pCustomShape->GetModel());
- if(static_cast<const SdrOnOffItem&>(pCustomShape->GetMergedItem(SDRATTR_SHADOW)).GetValue())
+ if(pCustomShape->GetMergedItem(SDRATTR_SHADOW).GetValue())
{
if(dynamic_cast<const SdrObjGroup*>( pReplacement) != nullptr)
{
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index d20912eb62d9..72938cf77f26 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -850,7 +850,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
if (pText!=nullptr)
{
pOutlView->SetAnchorMode(pText->GetOutlinerViewAnchorMode());
- pTextEditOutliner->SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ pTextEditOutliner->SetFixedCellHeight(pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
// do update before setting output area so that aTextEditArea can be recalculated
pTextEditOutliner->SetUpdateMode(true);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index a1c62229b792..d191331917ab 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -206,15 +206,15 @@ static bool ImpVerticalSwitch( const SdrObjCustomShape& rCustoShape )
SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemSet& rOriginalSet)
{
SdrObject* pRetval = nullptr;
- const bool bShadow(static_cast<const SdrOnOffItem&>(rOriginalSet.Get(SDRATTR_SHADOW)).GetValue());
+ const bool bShadow(rOriginalSet.Get(SDRATTR_SHADOW).GetValue());
if(bShadow)
{
// create a shadow representing object
- const sal_Int32 nXDist(static_cast<const SdrMetricItem&>(rOriginalSet.Get(SDRATTR_SHADOWXDIST)).GetValue());
- const sal_Int32 nYDist(static_cast<const SdrMetricItem&>(rOriginalSet.Get(SDRATTR_SHADOWYDIST)).GetValue());
- const ::Color aShadowColor(static_cast<const XColorItem&>(rOriginalSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue());
- const sal_uInt16 nShadowTransparence(static_cast<const SdrPercentItem&>(rOriginalSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue());
+ const sal_Int32 nXDist(rOriginalSet.Get(SDRATTR_SHADOWXDIST).GetValue());
+ const sal_Int32 nYDist(rOriginalSet.Get(SDRATTR_SHADOWYDIST).GetValue());
+ const ::Color aShadowColor(rOriginalSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue());
+ const sal_uInt16 nShadowTransparence(rOriginalSet.Get(SDRATTR_SHADOWTRANSPARENCE).GetValue());
pRetval = rOriginal.Clone();
DBG_ASSERT(pRetval, "ImpCreateShadowObjectClone: Could not clone object (!)");
@@ -455,7 +455,7 @@ const SdrObject* SdrObjCustomShape::GetSdrObjectShadowFromCustomShape() const
if(pSdrObject)
{
const SfxItemSet& rOriginalSet = GetObjectItemSet();
- const bool bShadow(static_cast<const SdrOnOffItem&>(rOriginalSet.Get( SDRATTR_SHADOW )).GetValue());
+ const bool bShadow(rOriginalSet.Get( SDRATTR_SHADOW ).GetValue());
if(bShadow)
{
@@ -2158,17 +2158,17 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r
bool SdrObjCustomShape::IsAutoGrowHeight() const
{
const SfxItemSet& rSet = GetMergedItemSet();
- bool bIsAutoGrowHeight = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bIsAutoGrowHeight = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
if ( bIsAutoGrowHeight && IsVerticalWriting() )
- bIsAutoGrowHeight = !static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_WORDWRAP)).GetValue();
+ bIsAutoGrowHeight = !rSet.Get(SDRATTR_TEXT_WORDWRAP).GetValue();
return bIsAutoGrowHeight;
}
bool SdrObjCustomShape::IsAutoGrowWidth() const
{
const SfxItemSet& rSet = GetMergedItemSet();
- bool bIsAutoGrowWidth = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bIsAutoGrowWidth = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
if ( bIsAutoGrowWidth && !IsVerticalWriting() )
- bIsAutoGrowWidth = !static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_WORDWRAP)).GetValue();
+ bIsAutoGrowWidth = !rSet.Get(SDRATTR_TEXT_WORDWRAP).GetValue();
return bIsAutoGrowWidth;
}
@@ -2192,8 +2192,8 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical )
const SfxItemSet& rSet = GetObjectItemSet();
// Also exchange horizontal and vertical adjust items
- SdrTextHorzAdjust eHorz = static_cast<const SdrTextHorzAdjustItem&>(rSet.Get(SDRATTR_TEXT_HORZADJUST)).GetValue();
- SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextHorzAdjust eHorz = rSet.Get(SDRATTR_TEXT_HORZADJUST).GetValue();
+ SdrTextVertAdjust eVert = rSet.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
// rescue object size
tools::Rectangle aObjectRect = GetSnapRect();
@@ -2307,7 +2307,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
if( pOutlinerParaObject != nullptr )
{
rOutliner.SetText(*pOutlinerParaObject);
- rOutliner.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
if ( bWdtGrow )
{
@@ -2529,7 +2529,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
if ( nMaxHgt == 0 || nMaxHgt > aMaxSiz.Height() )
nMaxHgt=aMaxSiz.Height();
- if (static_cast<const SdrOnOffItem&>(GetMergedItem(SDRATTR_TEXT_WORDWRAP)).GetValue())
+ if (GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue())
{
if ( IsVerticalWriting() )
{
@@ -2631,7 +2631,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
long nAnkWdt=aAnkRect.GetWidth();
long nAnkHgt=aAnkRect.GetHeight();
- if (static_cast<const SdrOnOffItem&>(GetMergedItem(SDRATTR_TEXT_WORDWRAP)).GetValue())
+ if (GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue())
{
if ( IsVerticalWriting() )
nMaxAutoPaperHeight = nAnkHgt;
@@ -2834,7 +2834,7 @@ SdrObject* SdrObjCustomShape::DoConvertToPolyObj(bool bBezier, bool bAddText) co
if(pRetval)
{
- const bool bShadow(static_cast<const SdrOnOffItem&>(GetMergedItem(SDRATTR_SHADOW)).GetValue());
+ const bool bShadow(GetMergedItem(SDRATTR_SHADOW).GetValue());
if(bShadow)
{
pRetval->SetMergedItem(makeSdrShadowItem(true));
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 803cc72b6313..9c62fa28067d 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -415,15 +415,15 @@ OUString SdrCaptionObj::getSpecialDragComment(const SdrDragStat& rDrag) const
void SdrCaptionObj::ImpGetCaptParams(ImpCaptParams& rPara) const
{
const SfxItemSet& rSet = GetObjectItemSet();
- rPara.eType =static_cast<const SdrCaptionTypeItem&> (rSet.Get(SDRATTR_CAPTIONTYPE )).GetValue();
- rPara.bFixedAngle=static_cast<const SdrOnOffItem&> (rSet.Get(SDRATTR_CAPTIONFIXEDANGLE)).GetValue();
+ rPara.eType =rSet.Get(SDRATTR_CAPTIONTYPE ).GetValue();
+ rPara.bFixedAngle=rSet.Get(SDRATTR_CAPTIONFIXEDANGLE).GetValue();
rPara.nGap =static_cast<const SdrCaptionGapItem&> (rSet.Get(SDRATTR_CAPTIONGAP )).GetValue();
- rPara.eEscDir =static_cast<const SdrCaptionEscDirItem&> (rSet.Get(SDRATTR_CAPTIONESCDIR )).GetValue();
- rPara.bEscRel =static_cast<const SdrCaptionEscIsRelItem&> (rSet.Get(SDRATTR_CAPTIONESCISREL )).GetValue();
- rPara.nEscRel =static_cast<const SdrCaptionEscRelItem&> (rSet.Get(SDRATTR_CAPTIONESCREL )).GetValue();
- rPara.nEscAbs =static_cast<const SdrCaptionEscAbsItem&> (rSet.Get(SDRATTR_CAPTIONESCABS )).GetValue();
- rPara.nLineLen =static_cast<const SdrCaptionLineLenItem&> (rSet.Get(SDRATTR_CAPTIONLINELEN )).GetValue();
- rPara.bFitLineLen=static_cast<const SdrCaptionFitLineLenItem&>(rSet.Get(SDRATTR_CAPTIONFITLINELEN)).GetValue();
+ rPara.eEscDir =rSet.Get(SDRATTR_CAPTIONESCDIR ).GetValue();
+ rPara.bEscRel =rSet.Get(SDRATTR_CAPTIONESCISREL ).GetValue();
+ rPara.nEscRel =rSet.Get(SDRATTR_CAPTIONESCREL ).GetValue();
+ rPara.nEscAbs =rSet.Get(SDRATTR_CAPTIONESCABS ).GetValue();
+ rPara.nLineLen =rSet.Get(SDRATTR_CAPTIONLINELEN ).GetValue();
+ rPara.bFitLineLen=rSet.Get(SDRATTR_CAPTIONFITLINELEN).GetValue();
}
void SdrCaptionObj::ImpRecalcTail()
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index a780086a9dda..9c943843d083 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -282,15 +282,15 @@ bool SdrTextObj::IsAutoGrowHeight() const
return false; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
- bool bRet = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bRet = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
if(bRet)
{
- SdrTextAniKind eAniKind = static_cast<const SdrTextAniKindItem&>(rSet.Get(SDRATTR_TEXT_ANIKIND)).GetValue();
+ SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
{
- SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
if(eDirection == SdrTextAniDirection::Up || eDirection == SdrTextAniDirection::Down)
{
@@ -307,17 +307,17 @@ bool SdrTextObj::IsAutoGrowWidth() const
return false; // AutoGrow only together with TextFrames
const SfxItemSet& rSet = GetObjectItemSet();
- bool bRet = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
+ bool bRet = rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
bool bInEditMOde = IsInEditMode();
if(!bInEditMOde && bRet)
{
- SdrTextAniKind eAniKind = static_cast<const SdrTextAniKindItem&>(rSet.Get(SDRATTR_TEXT_ANIKIND)).GetValue();
+ SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
{
- SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
@@ -338,17 +338,17 @@ SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust(const SfxItemSet& rSet) co
if(IsContourTextFrame())
return SDRTEXTHORZADJUST_BLOCK;
- SdrTextHorzAdjust eRet = static_cast<const SdrTextHorzAdjustItem&>(rSet.Get(SDRATTR_TEXT_HORZADJUST)).GetValue();
+ SdrTextHorzAdjust eRet = rSet.Get(SDRATTR_TEXT_HORZADJUST).GetValue();
bool bInEditMode = IsInEditMode();
if(!bInEditMode && eRet == SDRTEXTHORZADJUST_BLOCK)
{
- SdrTextAniKind eAniKind = static_cast<const SdrTextAniKindItem&>(rSet.Get(SDRATTR_TEXT_ANIKIND)).GetValue();
+ SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
{
- SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
@@ -371,17 +371,17 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons
return SDRTEXTVERTADJUST_TOP;
// Take care for vertical text animation here
- SdrTextVertAdjust eRet = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eRet = rSet.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
bool bInEditMode = IsInEditMode();
// Take care for vertical text animation here
if(!bInEditMode && eRet == SDRTEXTVERTADJUST_BLOCK)
{
- SdrTextAniKind eAniKind = static_cast<const SdrTextAniKindItem&>(rSet.Get(SDRATTR_TEXT_ANIKIND)).GetValue();
+ SdrTextAniKind eAniKind = rSet.Get(SDRATTR_TEXT_ANIKIND).GetValue();
if(eAniKind == SdrTextAniKind::Scroll || eAniKind == SdrTextAniKind::Alternate || eAniKind == SdrTextAniKind::Slide)
{
- SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right)
{
@@ -596,7 +596,7 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle&
// test if shadow needs to be avoided for TakeContour()
const SfxItemSet& rSet = GetObjectItemSet();
- bool bShadowOn = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_SHADOW)).GetValue();
+ bool bShadowOn = rSet.Get(SDRATTR_SHADOW).GetValue();
// #i33696#
// Remember TextObject currently set at the DrawOutliner, it WILL be
@@ -765,7 +765,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
if( bHitTest ) // #i33696# take back fix #i27510#
{
rOutliner.SetTextObj( this );
- rOutliner.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
rOutliner.SetUpdateMode(true);
@@ -1240,7 +1240,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame,
rOutliner.SetControlWord(nStat);
}
}
- rOutliner.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
TakeTextRect(rOutliner, rTextRect, false, &rAnchorRect);
rPaintRect = rTextRect;
@@ -1535,12 +1535,12 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
{
// get item settings
const SfxItemSet& rSet = GetObjectItemSet();
- bool bAutoGrowWidth = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
- bool bAutoGrowHeight = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bAutoGrowWidth = rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
+ bool bAutoGrowHeight = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
// Also exchange hor/ver adjust items
- SdrTextHorzAdjust eHorz = static_cast<const SdrTextHorzAdjustItem&>(rSet.Get(SDRATTR_TEXT_HORZADJUST)).GetValue();
- SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextHorzAdjust eHorz = rSet.Get(SDRATTR_TEXT_HORZADJUST).GetValue();
+ SdrTextVertAdjust eVert = rSet.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
// rescue object size
tools::Rectangle aObjectRect = GetSnapRect();
@@ -1769,27 +1769,27 @@ bool SdrTextObj::IsReallyEdited() const
long SdrTextObj::GetEckenradius() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_ECKENRADIUS)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_ECKENRADIUS).GetValue();
}
long SdrTextObj::GetMinTextFrameHeight() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEHEIGHT)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEHEIGHT).GetValue();
}
long SdrTextObj::GetMaxTextFrameHeight() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEHEIGHT)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEHEIGHT).GetValue();
}
long SdrTextObj::GetMinTextFrameWidth() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEWIDTH)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEWIDTH).GetValue();
}
long SdrTextObj::GetMaxTextFrameWidth() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH).GetValue();
}
bool SdrTextObj::IsFontwork() const
@@ -1807,37 +1807,37 @@ bool SdrTextObj::IsHideContour() const
bool SdrTextObj::IsContourTextFrame() const
{
return !bTextFrame // ContourFrame not together with normal TextFrames
- && static_cast<const SdrOnOffItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue();
+ && GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME).GetValue();
}
long SdrTextObj::GetTextLeftDistance() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST).GetValue();
}
long SdrTextObj::GetTextRightDistance() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST).GetValue();
}
long SdrTextObj::GetTextUpperDistance() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST).GetValue();
}
long SdrTextObj::GetTextLowerDistance() const
{
- return static_cast<const SdrMetricItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST).GetValue();
}
SdrTextAniKind SdrTextObj::GetTextAniKind() const
{
- return static_cast<const SdrTextAniKindItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_ANIKIND)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_ANIKIND).GetValue();
}
SdrTextAniDirection SdrTextObj::GetTextAniDirection() const
{
- return static_cast<const SdrTextAniDirectionItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ return GetObjectItemSet().Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
}
// Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
@@ -1862,7 +1862,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
tools::Rectangle aScrollFrameRect(aPaintRect);
const SfxItemSet& rSet = GetObjectItemSet();
- SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue();
+ SdrTextAniDirection eDirection = rSet.Get(SDRATTR_TEXT_ANIDIRECTION).GetValue();
if(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection)
{
@@ -1988,7 +1988,7 @@ bool SdrTextObj::IsChainable() const
{
// Read it as item
const SfxItemSet& rSet = GetObjectItemSet();
- OUString aNextLinkName = static_cast<const SfxStringItem&>(rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME)).GetValue();
+ OUString aNextLinkName = rSet.Get(SDRATTR_TEXT_CHAINNEXTNAME).GetValue();
// Update links if any inconsistency is found
bool bNextLinkUnsetYet = !aNextLinkName.isEmpty() && !mpNextInChain;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 53a202e8c8be..859fc4639e63 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1209,8 +1209,8 @@ void SdrTextObj::impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryLi
{
// get values
const SfxItemSet& rSet = GetObjectItemSet();
- const sal_uInt32 nRepeat((sal_uInt32)static_cast<const SdrTextAniCountItem&>(rSet.Get(SDRATTR_TEXT_ANICOUNT)).GetValue());
- double fDelay((double)static_cast<const SdrTextAniDelayItem&>(rSet.Get(SDRATTR_TEXT_ANIDELAY)).GetValue());
+ const sal_uInt32 nRepeat((sal_uInt32)rSet.Get(SDRATTR_TEXT_ANICOUNT).GetValue());
+ double fDelay((double)rSet.Get(SDRATTR_TEXT_ANIDELAY).GetValue());
if(0.0 == fDelay)
{
@@ -1229,7 +1229,7 @@ void SdrTextObj::impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryLi
// add stopped state if loop is not endless
if(0L != nRepeat)
{
- bool bVisibleWhenStopped(static_cast<const SdrTextAniStopInsideItem&>(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE)).GetValue());
+ bool bVisibleWhenStopped(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE).GetValue());
drawinglayer::animation::AnimationEntryFixed aStop(ENDLESS_TIME, bVisibleWhenStopped ? 0.0 : 1.0);
rAnimList.append(aStop);
}
@@ -1238,9 +1238,9 @@ void SdrTextObj::impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryLi
void impCreateScrollTiming(const SfxItemSet& rSet, drawinglayer::animation::AnimationEntryList& rAnimList, bool bForward, double fTimeFullPath, double fFrequency)
{
- bool bVisibleWhenStopped(static_cast<const SdrTextAniStopInsideItem&>(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE)).GetValue());
- bool bVisibleWhenStarted(static_cast<const SdrTextAniStartInsideItem&>(rSet.Get(SDRATTR_TEXT_ANISTARTINSIDE)).GetValue());
- const sal_uInt32 nRepeat(static_cast<const SdrTextAniCountItem&>(rSet.Get(SDRATTR_TEXT_ANICOUNT)).GetValue());
+ bool bVisibleWhenStopped(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE).GetValue());
+ bool bVisibleWhenStarted(rSet.Get(SDRATTR_TEXT_ANISTARTINSIDE).GetValue());
+ const sal_uInt32 nRepeat(rSet.Get(SDRATTR_TEXT_ANICOUNT).GetValue());
if(bVisibleWhenStarted)
{
@@ -1278,8 +1278,8 @@ void impCreateAlternateTiming(const SfxItemSet& rSet, drawinglayer::animation::A
const double fStartPosition(bForward ? fRelativeTextLength : 1.0 - fRelativeTextLength);
const double fEndPosition(bForward ? 1.0 - fRelativeTextLength : fRelativeTextLength);
- bool bVisibleWhenStarted(static_cast<const SdrTextAniStartInsideItem&>(rSet.Get(SDRATTR_TEXT_ANISTARTINSIDE)).GetValue());
- const sal_uInt32 nRepeat(static_cast<const SdrTextAniCountItem&>(rSet.Get(SDRATTR_TEXT_ANICOUNT)).GetValue());
+ bool bVisibleWhenStarted(rSet.Get(SDRATTR_TEXT_ANISTARTINSIDE).GetValue());
+ const sal_uInt32 nRepeat(rSet.Get(SDRATTR_TEXT_ANICOUNT).GetValue());
if(!bVisibleWhenStarted)
{
@@ -1319,7 +1319,7 @@ void impCreateAlternateTiming(const SfxItemSet& rSet, drawinglayer::animation::A
if(0L != nRepeat)
{
- bool bVisibleWhenStopped(static_cast<const SdrTextAniStopInsideItem&>(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE)).GetValue());
+ bool bVisibleWhenStopped(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE).GetValue());
if(bVisibleWhenStopped)
{
// add timing for staying at the end
@@ -1339,7 +1339,7 @@ void impCreateSlideTiming(const SfxItemSet& rSet, drawinglayer::animation::Anima
{
// move in from outside, start outside
const double fStartPosition(bForward ? 0.0 : 1.0);
- const sal_uInt32 nRepeat(static_cast<const SdrTextAniCountItem&>(rSet.Get(SDRATTR_TEXT_ANICOUNT)).GetValue());
+ const sal_uInt32 nRepeat(rSet.Get(SDRATTR_TEXT_ANICOUNT).GetValue());
// move from outside to center
drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath * 0.5, fFrequency, fStartPosition, 0.5);
@@ -1373,8 +1373,8 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
// get data. Goal is to calculate fTimeFullPath which is the time needed to
// move animation from (0.0) to (1.0) state
const SfxItemSet& rSet = GetObjectItemSet();
- double fAnimationDelay((double)static_cast<const SdrTextAniDelayItem&>(rSet.Get(SDRATTR_TEXT_ANIDELAY)).GetValue());
- double fSingleStepWidth((double)static_cast<const SdrTextAniAmountItem&>(rSet.Get(SDRATTR_TEXT_ANIAMOUNT)).GetValue());
+ double fAnimationDelay((double)rSet.Get(SDRATTR_TEXT_ANIDELAY).GetValue());
+ double fSingleStepWidth((double)rSet.Get(SDRATTR_TEXT_ANIAMOUNT).GetValue());
const SdrTextAniDirection eDirection(GetTextAniDirection());
const bool bForward(SdrTextAniDirection::Right == eDirection || SdrTextAniDirection::Down == eDirection);
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index b25ead77cc87..f6aa20a83961 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -169,7 +169,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
if (pOutlinerParaObject)
{
rOutliner.SetText(*pOutlinerParaObject);
- rOutliner.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
if (bWdtGrow)
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 515277a4cd18..52a4dfa07ed2 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -77,7 +77,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
if(pOutlinerParaObject!=nullptr)
{
rOutl.SetText(*GetOutlinerParaObject());
- rOutl.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutl.SetFixedCellHeight(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
// if necessary, set frame attributes for the first (new) paragraph of the
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index f8a4855c66ad..fec8b197b43c 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -351,8 +351,8 @@ namespace sdr
tools::Rectangle aObjectRect = rObj.GetSnapRect();
const SfxItemSet& rSet = rObj.GetObjectItemSet();
- bool bAutoGrowWidth = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
- bool bAutoGrowHeight = static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ bool bAutoGrowWidth = rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH).GetValue();
+ bool bAutoGrowHeight = rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
@@ -765,37 +765,37 @@ sal_Int32 Cell::getMinimumHeight()
long Cell::GetTextLeftDistance() const
{
- return static_cast<const SdrMetricItem&>(GetItemSet().Get(SDRATTR_TEXT_LEFTDIST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_LEFTDIST).GetValue();
}
long Cell::GetTextRightDistance() const
{
- return static_cast<const SdrMetricItem&>(GetItemSet().Get(SDRATTR_TEXT_RIGHTDIST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_RIGHTDIST).GetValue();
}
long Cell::GetTextUpperDistance() const
{
- return static_cast<const SdrMetricItem&>(GetItemSet().Get(SDRATTR_TEXT_UPPERDIST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_UPPERDIST).GetValue();
}
long Cell::GetTextLowerDistance() const
{
- return static_cast<const SdrMetricItem&>(GetItemSet().Get(SDRATTR_TEXT_LOWERDIST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_LOWERDIST).GetValue();
}
SdrTextVertAdjust Cell::GetTextVerticalAdjust() const
{
- return static_cast<const SdrTextVertAdjustItem&>(GetItemSet().Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_VERTADJUST).GetValue();
}
SdrTextHorzAdjust Cell::GetTextHorizontalAdjust() const
{
- return static_cast<const SdrTextHorzAdjustItem&>(GetItemSet().Get(SDRATTR_TEXT_HORZADJUST)).GetValue();
+ return GetItemSet().Get(SDRATTR_TEXT_HORZADJUST).GetValue();
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 0677bccbb892..7f1dbc070254 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -447,7 +447,7 @@ void SvxTableController::GetState( SfxItemSet& rSet )
SdrTextVertAdjust eAdj = SDRTEXTVERTADJUST_BLOCK;
if (xSet->GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE)
- eAdj = static_cast<const SdrTextVertAdjustItem&>(xSet->Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ eAdj = xSet->Get(SDRATTR_TEXT_VERTADJUST).GetValue();
rSet.Put(SfxBoolItem(SID_TABLE_VERT_BOTTOM, eAdj == SDRTEXTVERTADJUST_BOTTOM));
rSet.Put(SfxBoolItem(SID_TABLE_VERT_CENTER, eAdj == SDRTEXTVERTADJUST_CENTER));
@@ -883,10 +883,10 @@ namespace
{
// merge drawing layer text distance items into SvxBoxItem used by the dialog
SvxBoxItem aBoxItem( static_cast< const SvxBoxItem& >( rAttrSet.Get( SDRATTR_TABLE_BORDER ) ) );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( static_cast<const SdrMetricItem&>(rAttrSet.Get(SDRATTR_TEXT_LEFTDIST)).GetValue()), SvxBoxItemLine::LEFT );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( static_cast<const SdrMetricItem&>(rAttrSet.Get(SDRATTR_TEXT_RIGHTDIST)).GetValue()), SvxBoxItemLine::RIGHT );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( static_cast<const SdrMetricItem&>(rAttrSet.Get(SDRATTR_TEXT_UPPERDIST)).GetValue()), SvxBoxItemLine::TOP );
- aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( static_cast<const SdrMetricItem&>(rAttrSet.Get(SDRATTR_TEXT_LOWERDIST)).GetValue()), SvxBoxItemLine::BOTTOM );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_LEFTDIST).GetValue()), SvxBoxItemLine::LEFT );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_RIGHTDIST).GetValue()), SvxBoxItemLine::RIGHT );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_UPPERDIST).GetValue()), SvxBoxItemLine::TOP );
+ aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_LOWERDIST).GetValue()), SvxBoxItemLine::BOTTOM );
return aBoxItem;
}
}
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index d7d35fb7c0be..161136f3482e 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -64,8 +64,8 @@ void SetAlignmentState( SdrView const * pSdrView, SfxItemSet& rSet )
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
sal_Int32 nOldAlignment = nAlignment;
- const SdrTextHorzAdjustItem& rTextHorzAdjustItem = static_cast<const SdrTextHorzAdjustItem&>(pObj->GetMergedItem( SDRATTR_TEXT_HORZADJUST ));
- const SdrTextFitToSizeTypeItem& rTextFitToSizeTypeItem = static_cast<const SdrTextFitToSizeTypeItem&>(pObj->GetMergedItem( SDRATTR_TEXT_FITTOSIZE ));
+ const SdrTextHorzAdjustItem& rTextHorzAdjustItem = pObj->GetMergedItem( SDRATTR_TEXT_HORZADJUST );
+ const SdrTextFitToSizeTypeItem& rTextFitToSizeTypeItem = pObj->GetMergedItem( SDRATTR_TEXT_FITTOSIZE );
switch ( rTextHorzAdjustItem.GetValue() )
{
case SDRTEXTHORZADJUST_LEFT : nAlignment = 0; break;
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 8b71164dc1e9..7d3ac31f630d 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -187,25 +187,19 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
}
// LOOP
- sal_Int32 nCount =
- static_cast<const SdrTextAniCountItem&>(rItemSet.Get( SDRATTR_TEXT_ANICOUNT ))
- .GetValue();
+ sal_Int32 nCount = rItemSet.Get( SDRATTR_TEXT_ANICOUNT ).GetValue();
if( 0==nCount )
nCount = SdrTextAniKind::Slide==eAniKind ? 1 : -1;
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_loop).append("=\"").
append(nCount).append("\"");
// SCROLLDELAY
- sal_uInt16 nDelay =
- static_cast<const SdrTextAniDelayItem&>(rItemSet.Get( SDRATTR_TEXT_ANIDELAY ))
- .GetValue();
+ sal_uInt16 nDelay = rItemSet.Get( SDRATTR_TEXT_ANIDELAY ).GetValue();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolldelay).
append("=\"").append(static_cast<sal_Int32>(nDelay)).append("\"");
// SCROLLAMOUNT
- sal_Int16 nAmount =
- static_cast<const SdrTextAniAmountItem&>(rItemSet.Get( SDRATTR_TEXT_ANIAMOUNT ))
- .GetValue();
+ sal_Int16 nAmount = rItemSet.Get( SDRATTR_TEXT_ANIAMOUNT ).GetValue();
if( nAmount < 0 )
{
nAmount = -nAmount;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index c8a4b7677d3e..709b0531297b 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -694,7 +694,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
{
const SfxItemSet& rSet = pObj->GetMergedItemSet();
long nHeight = aRect.GetHeight();
- if (const SdrMetricItem* pItem = static_cast<const SdrMetricItem*>(rSet.GetItem(SDRATTR_TEXT_UPPERDIST)))
+ if (const SdrMetricItem* pItem = rSet.GetItem(SDRATTR_TEXT_UPPERDIST))
nHeight += pItem->GetValue();
aRect.SetSize(Size(aRect.GetWidth(), nHeight));
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index f03331909aaf..4ef69f36b18b 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1745,8 +1745,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
{
SvxShadowItem aShadow( RES_SHADOW );
- const Color aShdColor = static_cast< XColorItem const & >(
- rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
+ const Color aShdColor = rOldSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue();
const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrMetricItem);
const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index e5af6c0995a1..e0ce504234da 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -845,7 +845,7 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet)
SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
if( eConState != SfxItemState::DONTCARE )
{
- bContour = static_cast<const SdrOnOffItem&>( aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ bContour = aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ).GetValue();
}
if (bContour) break;
@@ -855,7 +855,7 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet)
//if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
if(SfxItemState::DONTCARE != eVState)
{
- SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = aAttrs.Get(SDRATTR_TEXT_VERTADJUST).GetValue();
bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
More information about the Libreoffice-commits
mailing list