summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx6
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--cui/source/tabpages/tparea.cxx2
-rw-r--r--cui/source/tabpages/tpbitmap.cxx20
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
-rw-r--r--cui/source/tabpages/tpgradnt.cxx2
-rw-r--r--cui/source/tabpages/tphatch.cxx10
-rw-r--r--cui/source/tabpages/tpline.cxx26
-rw-r--r--cui/source/tabpages/tplnedef.cxx2
-rw-r--r--cui/source/tabpages/tppattern.cxx2
-rw-r--r--cui/source/tabpages/tpshadow.cxx16
-rw-r--r--cui/source/tabpages/tptrans.cxx14
-rw-r--r--filter/source/msfilter/escherex.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx20
-rw-r--r--include/svl/typedwhich.hxx2
-rw-r--r--include/svx/xdef.hxx148
-rw-r--r--sc/source/core/tool/detfunc.cxx12
-rw-r--r--sc/source/filter/excel/xeescher.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx4
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx8
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/func/fuconstr.cxx2
-rw-r--r--sd/source/ui/func/fumorph.cxx26
-rw-r--r--sd/source/ui/func/fupage.cxx12
-rw-r--r--sd/source/ui/func/fusel.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/view/drviews7.cxx22
-rw-r--r--sd/source/ui/view/drviews9.cxx14
-rw-r--r--sd/source/ui/view/drviewsi.cxx4
-rw-r--r--sd/source/ui/view/sdview.cxx4
-rw-r--r--sd/source/ui/view/sdview2.cxx2
-rw-r--r--sd/source/ui/view/sdview3.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx30
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx23
-rw-r--r--svx/source/engine3d/float3d.cxx4
-rw-r--r--svx/source/engine3d/view3d.cxx20
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx38
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx72
-rw-r--r--svx/source/sdr/primitive3d/sdrattributecreator3d.cxx2
-rw-r--r--svx/source/sdr/properties/properties.cxx2
-rw-r--r--svx/source/svdraw/sdrmasterpagedescriptor.cxx2
-rw-r--r--svx/source/svdraw/svdcrtv.cxx4
-rw-r--r--svx/source/svdraw/svdedtv.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx8
-rw-r--r--svx/source/svdraw/svdedtv2.cxx4
-rw-r--r--svx/source/svdraw/svdetc.cxx14
-rw-r--r--svx/source/svdraw/svdhdl.cxx4
-rw-r--r--svx/source/svdraw/svdmrkv.cxx9
-rw-r--r--svx/source/svdraw/svdoashp.cxx10
-rw-r--r--svx/source/svdraw/svdoattr.cxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx8
-rw-r--r--svx/source/svdraw/svdocirc.cxx14
-rw-r--r--svx/source/svdraw/svdomeas.cxx18
-rw-r--r--svx/source/svdraw/svdotext.cxx4
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx6
-rw-r--r--svx/source/svdraw/svdpage.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/unodraw/unobrushitemhelper.cxx20
-rw-r--r--svx/source/unodraw/unopool.cxx4
-rw-r--r--svx/source/unodraw/unoprov.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx8
-rw-r--r--svx/source/xoutdev/xattr.cxx24
-rw-r--r--svx/source/xoutdev/xexch.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx20
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx4
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx9
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
-rw-r--r--sw/source/uibase/shells/langhelper.cxx6
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx14
77 files changed, 442 insertions, 411 deletions
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index 8847c3aaf50b..f6e3e7a16bd5 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -426,8 +426,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
const OUString aModePropName("FillBitmapMode");
- bool bStretched = static_cast< const XFillBmpStretchItem & >(
- rItemSet.Get( XATTR_FILLBMP_STRETCH )).GetValue();
+ bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue();
drawing::BitmapMode aMode =
(bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT);
@@ -444,8 +443,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
const OUString aModePropName("FillBitmapMode");
- bool bTiled = static_cast< const XFillBmpTileItem & >(
- rItemSet.Get( XATTR_FILLBMP_TILE )).GetValue();
+ bool bTiled = rItemSet.Get( XATTR_FILLBMP_TILE ).GetValue();
drawing::BitmapMode aMode =
(bTiled ? drawing::BitmapMode_REPEAT : drawing::BitmapMode_NO_REPEAT);
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index c460d856b692..fcbccefcaa97 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -197,7 +197,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
long nWidth = 300; // (1/100th mm)
if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = static_cast<const XLineWidthItem&>( aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if ( nValue > 0 )
{
nWidth = nValue * 3;
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 6f19bc50e4bb..aa45639d1e14 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -199,7 +199,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
}
case drawing::FillStyle_HATCH:
{
- m_rXFSet.Put( static_cast<const XFillHatchItem&>( rSet.Get(XATTR_FILLHATCH) ) );
+ m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) );
SelectFillTypeHdl_Impl( m_pBtnHatch );
break;
}
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 192297547949..00897f4848b9 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -179,7 +179,7 @@ void SvxBitmapTabPage::Construct()
void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet )
{
- XFillBitmapItem aItem( static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)) );
+ XFillBitmapItem aItem( rSet.Get(XATTR_FILLBITMAP) );
sal_Int32 nPos = SearchBitmapList( aItem.GetName() );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -298,7 +298,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectHeight), mePoolUnit, MapUnit::Map100thMM )) / fUIScale);
m_fObjectHeight = fTmpHeight;
- XFillBitmapItem aItem( static_cast<const XFillBitmapItem&>(rAttrs->Get(XATTR_FILLBITMAP)) );
+ XFillBitmapItem aItem( rAttrs->Get(XATTR_FILLBITMAP) );
if(!aItem.isPattern())
{
@@ -323,7 +323,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE)
{
- if( static_cast<const XFillBmpTileItem&>( rAttrs->Get( XATTR_FILLBMP_TILE ) ).GetValue() )
+ if( rAttrs->Get( XATTR_FILLBMP_TILE ).GetValue() )
{
m_pBitmapStyleLB->SelectEntryPos(static_cast<sal_Int32>(TILED));
}
@@ -331,7 +331,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if( m_pBitmapStyleLB->GetSelectedEntryPos() == 0 && rAttrs->GetItemState( XATTR_FILLBMP_STRETCH ) != SfxItemState::DONTCARE)
{
- if( static_cast<const XFillBmpStretchItem&>( rAttrs->Get( XATTR_FILLBMP_STRETCH ) ).GetValue() )
+ if( rAttrs->Get( XATTR_FILLBMP_STRETCH ).GetValue() )
{
m_pBitmapStyleLB->SelectEntryPos( static_cast<sal_Int32>(STRETCHED) );
}
@@ -355,7 +355,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if(rAttrs->GetItemState( XATTR_FILLBMP_SIZEY ) != SfxItemState::DONTCARE)
{
- nHeight = static_cast<const XFillBmpSizeYItem&>( rAttrs->Get( XATTR_FILLBMP_SIZEY ) ).GetValue();
+ nHeight = rAttrs->Get( XATTR_FILLBMP_SIZEY ).GetValue();
if(nHeight == 0)
nHeight = rBitmapSize.Height();
else if(nHeight < 0)
@@ -402,13 +402,13 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( XATTR_FILLBMP_POS ) != SfxItemState::DONTCARE )
{
- RectPoint eValue = static_cast<const XFillBmpPosItem&>( rAttrs->Get( XATTR_FILLBMP_POS ) ).GetValue();
+ RectPoint eValue = rAttrs->Get( XATTR_FILLBMP_POS ).GetValue();
m_pPositionLB->SelectEntryPos( static_cast< sal_Int32 >(eValue) );
}
if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SfxItemState::DONTCARE )
{
- sal_Int32 nValue = static_cast<const XFillBmpPosOffsetXItem&>( rAttrs->Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue();
+ sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_POSOFFSETX ).GetValue();
m_pPositionOffX->SetValue( nValue );
}
else
@@ -416,7 +416,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SfxItemState::DONTCARE )
{
- sal_Int32 nValue = static_cast<const XFillBmpPosOffsetYItem&>( rAttrs->Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue();
+ sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_POSOFFSETY ).GetValue();
m_pPositionOffY->SetValue( nValue );
}
else
@@ -424,7 +424,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SfxItemState::DONTCARE)
{
- sal_Int32 nValue = static_cast<const XFillBmpTileOffsetXItem&>( rAttrs->Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue();
+ sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_TILEOFFSETX ).GetValue();
if(nValue > 0)
{
m_pTileOffLB->SelectEntryPos(static_cast<sal_Int32>(ROW));
@@ -434,7 +434,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SfxItemState::DONTCARE )
{
- sal_Int32 nValue = static_cast<const XFillBmpTileOffsetYItem&>( rAttrs->Get( XATTR_FILLBMP_TILEOFFSETY ) ).GetValue();
+ sal_Int32 nValue = rAttrs->Get( XATTR_FILLBMP_TILEOFFSETY ).GetValue();
if(nValue > 0)
{
m_pTileOffLB->SelectEntryPos(static_cast<sal_Int32>(COLUMN));
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 8b43dd6830bc..185f28fcfcc4 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -292,7 +292,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
if ( nState >= SfxItemState::DEFAULT )
{
- XFillColorItem aColorItem( static_cast<const XFillColorItem&>(rSet->Get( XATTR_FILLCOLOR )) );
+ XFillColorItem aColorItem( rSet->Get( XATTR_FILLCOLOR ) );
aPreviousColor = aColorItem.GetColorValue();
aNewColor = aColorItem.GetColorValue();
}
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 36a05915a6e5..86cb408c1a01 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -201,7 +201,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet )
else
aString += aURL.getBase();
- sal_Int32 nPos = SearchGradientList( static_cast<const XFillGradientItem&>( rSet.Get(XATTR_FILLGRADIENT) ).GetName() );
+ sal_Int32 nPos = SearchGradientList( rSet.Get(XATTR_FILLGRADIENT).GetName() );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_uInt16 nId = m_pGradientLB->GetItemId( static_cast<size_t>( nPos ) );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index bcab052260aa..922418d8c358 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -188,7 +188,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
else
aString += aURL.getBase();
- sal_Int32 nPos = SearchHatchList( static_cast<const XFillHatchItem&>( rSet.Get(XATTR_FILLHATCH) ).GetName() );
+ sal_Int32 nPos = SearchHatchList( rSet.Get(XATTR_FILLHATCH).GetName() );
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_uInt16 nId = m_pHatchLB->GetItemId( static_cast<size_t>( nPos ) );
@@ -198,13 +198,13 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
ChangeHatchHdl_Impl();
}
- XFillBackgroundItem aBckItem( static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)));
+ XFillBackgroundItem aBckItem( rSet.Get(XATTR_FILLBACKGROUND));
m_rXFSet.Put( aBckItem );
if(aBckItem.GetValue())
{
m_pCbBackgroundColor->SetState(TRISTATE_TRUE);
- XFillColorItem aColorItem( static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)) );
+ XFillColorItem aColorItem( rSet.Get(XATTR_FILLCOLOR) );
Color aColor(aColorItem.GetColorValue());
m_pLbBackgroundColor->Enable();
m_pLbBackgroundColor->SelectEntry(aColor);
@@ -282,14 +282,14 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
{
ChangeHatchHdl_Impl();
- XFillBackgroundItem aBckItem( static_cast<const XFillBackgroundItem&>(rSet->Get(XATTR_FILLBACKGROUND)) );
+ XFillBackgroundItem aBckItem( rSet->Get(XATTR_FILLBACKGROUND) );
if(aBckItem.GetValue())
m_pCbBackgroundColor->SetState(TRISTATE_TRUE);
else
m_pCbBackgroundColor->SetState(TRISTATE_FALSE);
m_rXFSet.Put( aBckItem );
- XFillColorItem aColItem( static_cast<const XFillColorItem&>(rSet->Get(XATTR_FILLCOLOR)) );
+ XFillColorItem aColItem( rSet->Get(XATTR_FILLCOLOR) );
m_pLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
m_rXFSet.Put( aColItem );
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 7c238dfeeba6..c2da4dcca633 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1209,7 +1209,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
if( rAttrs->GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE )
{
- eXLS = (drawing::LineStyle) static_cast<const XLineStyleItem&>( rAttrs->Get( XATTR_LINESTYLE ) ).GetValue();
+ eXLS = (drawing::LineStyle) rAttrs->Get( XATTR_LINESTYLE ).GetValue();
switch( eXLS )
{
@@ -1222,7 +1222,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
case drawing::LineStyle_DASH:
m_pLbLineStyle->SetNoSelection();
- m_pLbLineStyle->SelectEntry( static_cast<const XLineDashItem&>( rAttrs->Get( XATTR_LINEDASH ) ).GetName() );
+ m_pLbLineStyle->SelectEntry( rAttrs->Get( XATTR_LINEDASH ).GetName() );
break;
default:
@@ -1237,7 +1237,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
// Line strength
if( rAttrs->GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- SetMetricValue( *m_pMtrLineWidth, static_cast<const XLineWidthItem&>( rAttrs->Get( XATTR_LINEWIDTH ) ).GetValue(), m_ePoolUnit );
+ SetMetricValue( *m_pMtrLineWidth, rAttrs->Get( XATTR_LINEWIDTH ).GetValue(), m_ePoolUnit );
}
else
m_pMtrLineWidth->SetText( "" );
@@ -1247,7 +1247,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
if ( rAttrs->GetItemState( XATTR_LINECOLOR ) != SfxItemState::DONTCARE )
{
- Color aCol = static_cast<const XLineColorItem&>( rAttrs->Get( XATTR_LINECOLOR ) ).GetColorValue();
+ Color aCol = rAttrs->Get( XATTR_LINECOLOR ).GetColorValue();
m_pLbColor->SelectEntry( aCol );
}
@@ -1260,7 +1260,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
// #86265# select entry using list and polygon, not string
bool bSelected(false);
- const basegfx::B2DPolyPolygon& rItemPolygon = static_cast<const XLineStartItem&>(rAttrs->Get(XATTR_LINESTART)).GetLineStartValue();
+ const basegfx::B2DPolyPolygon& rItemPolygon = rAttrs->Get(XATTR_LINESTART).GetLineStartValue();
for(long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
{
@@ -1292,7 +1292,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
// #86265# select entry using list and polygon, not string
bool bSelected(false);
- const basegfx::B2DPolyPolygon& rItemPolygon = static_cast<const XLineEndItem&>(rAttrs->Get(XATTR_LINEEND)).GetLineEndValue();
+ const basegfx::B2DPolyPolygon& rItemPolygon = rAttrs->Get(XATTR_LINEEND).GetLineEndValue();
for(long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
{
@@ -1323,7 +1323,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
else if( rAttrs->GetItemState( XATTR_LINESTARTWIDTH ) != SfxItemState::DONTCARE )
{
SetMetricValue( *m_pMtrStartWidth,
- static_cast<const XLineStartWidthItem&>( rAttrs->Get( XATTR_LINESTARTWIDTH ) ).GetValue(),
+ rAttrs->Get( XATTR_LINESTARTWIDTH ).GetValue(),
m_ePoolUnit );
}
else
@@ -1337,7 +1337,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
else if( rAttrs->GetItemState( XATTR_LINEENDWIDTH ) != SfxItemState::DONTCARE )
{
SetMetricValue( *m_pMtrEndWidth,
- static_cast<const XLineEndWidthItem&>( rAttrs->Get( XATTR_LINEENDWIDTH ) ).GetValue(),
+ rAttrs->Get( XATTR_LINEENDWIDTH ).GetValue(),
m_ePoolUnit );
}
else
@@ -1352,7 +1352,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
m_pTsbCenterStart->EnableTriState( false );
- if( static_cast<const XLineStartCenterItem&>( rAttrs->Get( XATTR_LINESTARTCENTER ) ).GetValue() )
+ if( rAttrs->Get( XATTR_LINESTARTCENTER ).GetValue() )
m_pTsbCenterStart->SetState( TRISTATE_TRUE );
else
m_pTsbCenterStart->SetState( TRISTATE_FALSE );
@@ -1371,7 +1371,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
m_pTsbCenterEnd->EnableTriState( false );
- if( static_cast<const XLineEndCenterItem&>( rAttrs->Get( XATTR_LINEENDCENTER ) ).GetValue() )
+ if( rAttrs->Get( XATTR_LINEENDCENTER ).GetValue() )
m_pTsbCenterEnd->SetState( TRISTATE_TRUE );
else
m_pTsbCenterEnd->SetState( TRISTATE_FALSE );
@@ -1384,7 +1384,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
// Transparency
if( rAttrs->GetItemState( XATTR_LINETRANSPARENCE ) != SfxItemState::DONTCARE )
{
- sal_uInt16 nTransp = static_cast<const XLineTransparenceItem&>( rAttrs->Get( XATTR_LINETRANSPARENCE ) ).GetValue();
+ sal_uInt16 nTransp = rAttrs->Get( XATTR_LINETRANSPARENCE ).GetValue();
m_pMtrTransparent->SetValue( nTransp );
ChangeTransparentHdl_Impl( *m_pMtrTransparent );
}
@@ -1414,7 +1414,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
}
else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINEJOINT))
{
- const css::drawing::LineJoint eLineJoint = static_cast<const XLineJointItem&>(rAttrs->Get(XATTR_LINEJOINT)).GetValue();
+ const css::drawing::LineJoint eLineJoint = rAttrs->Get(XATTR_LINEJOINT).GetValue();
switch(eLineJoint)
{
@@ -1439,7 +1439,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
}
else if(SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_LINECAP))
{
- const css::drawing::LineCap eLineCap(static_cast<const XLineCapItem&>(rAttrs->Get(XATTR_LINECAP)).GetValue());
+ const css::drawing::LineCap eLineCap(rAttrs->Get(XATTR_LINECAP).GetValue());
switch(eLineCap)
{
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 70f8bc9fd7af..dd2936a3acae 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -310,7 +310,7 @@ void SvxLineDefTabPage::Reset( const SfxItemSet* rAttrs )
case drawing::LineStyle_DASH:
{
- const XLineDashItem& rDashItem = static_cast<const XLineDashItem&>( rAttrs->Get( XATTR_LINEDASH ) );
+ const XLineDashItem& rDashItem = rAttrs->Get( XATTR_LINEDASH );
aDash = rDashItem.GetDashValue();
m_pLbLineStyles->SetNoSelection();
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 618858fdbf0b..c974cc605c97 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -187,7 +187,7 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet )
else
aString += aURL.getBase();
- sal_Int32 nPos = SearchPatternList( static_cast<const XFillBitmapItem&>( rSet.Get(XATTR_FILLBITMAP)).GetName() );
+ sal_Int32 nPos = SearchPatternList( rSet.Get(XATTR_FILLBITMAP).GetName() );
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( nPos ) );
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index a9b0880f4dde..c77b4375d307 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -99,27 +99,21 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA
case drawing::FillStyle_SOLID:
if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
{
- XFillColorItem aColorItem( static_cast<const XFillColorItem&>(
- m_rOutAttrs.Get( XATTR_FILLCOLOR ) ) );
- m_rXFSet.Put( aColorItem );
+ m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) );
}
break;
case drawing::FillStyle_GRADIENT:
if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
{
- XFillGradientItem aGradientItem( static_cast<const XFillGradientItem&>(
- m_rOutAttrs.Get( XATTR_FILLGRADIENT ) ) );
- m_rXFSet.Put( aGradientItem );
+ m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) );
}
break;
case drawing::FillStyle_HATCH:
if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
{
- XFillHatchItem aHatchItem( static_cast<const XFillHatchItem& >(
- m_rOutAttrs.Get( XATTR_FILLHATCH ) ) );
- m_rXFSet.Put( aHatchItem );
+ m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) );
}
break;
@@ -127,9 +121,7 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA
{
if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
{
- XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem& >(
- m_rOutAttrs.Get( XATTR_FILLBITMAP ) ) );
- m_rXFSet.Put( aBitmapItem );
+ m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) );
}
}
break;
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 04944de8b95b..4e54d74cc28a 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -507,17 +507,17 @@ bool SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet )
}
// Get fillstyle for preview
- rXFSet.Put ( static_cast<const XFillStyleItem&>( rSet.Get(XATTR_FILLSTYLE)) );
- rXFSet.Put ( static_cast<const XFillColorItem&>( rSet.Get(XATTR_FILLCOLOR)) );
- rXFSet.Put ( static_cast<const XFillGradientItem&>( rSet.Get(XATTR_FILLGRADIENT)) );
- rXFSet.Put ( static_cast<const XFillHatchItem&>( rSet.Get(XATTR_FILLHATCH)) );
- rXFSet.Put ( static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)) );
- rXFSet.Put ( static_cast<const XFillBitmapItem&>( rSet.Get(XATTR_FILLBITMAP)) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLSTYLE) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLCOLOR) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLGRADIENT) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLHATCH) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLBACKGROUND) );
+ rXFSet.Put ( rSet.Get(XATTR_FILLBITMAP) );
m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() );
- bBitmap = static_cast<const XFillStyleItem&>( rSet.Get(XATTR_FILLSTYLE) ).GetValue() == drawing::FillStyle_BITMAP;
+ bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP;
// show the right preview window
if ( bBitmap )
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 79624155282e..d404bf3b1df4 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -553,7 +553,7 @@ void EscherPropertyContainer::CreateFillProperties(
SfxItemSet aAttr( pObj->GetMergedItemSet() );
// tranparency with gradient. Means the third setting in transparency page is set
bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) &&
- static_cast<const XFillFloatTransparenceItem&>( aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled();
+ aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ).IsEnabled();
CreateFillProperties( rXPropSet, bEdge, bTransparentGradient );
}
}
@@ -851,7 +851,7 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, sLineName ) )
{
OUString aArrowStartName = *o3tl::doAccess<OUString>(aAny);
- sal_Int16 nWhich = bLineStart ? XATTR_LINESTART : XATTR_LINEEND;
+ sal_uInt16 nWhich = bLineStart ? sal_uInt16(XATTR_LINESTART) : sal_uInt16(XATTR_LINEEND);
OUString aApiName = SvxUnogetApiNameForItem(nWhich, aArrowStartName);
bool bIsMapped = true;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index c8a34061a990..27e0de3d2962 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7412,14 +7412,14 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{//vertical writing
xPropSet->setPropertyValue( "TextWritingMode" , Any( css::text::WritingMode_TB_RL ) );
}
- drawing::FillStyle eFillStyle(static_cast<const XFillStyleItem&>(pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
+ drawing::FillStyle eFillStyle(pObj->GetMergedItem( XATTR_FILLSTYLE ).GetValue());
css::drawing::FillStyle eFS( css::drawing::FillStyle_NONE );
switch( eFillStyle )
{
case drawing::FillStyle_SOLID :
{
eFS = css::drawing::FillStyle_SOLID;
- Color aFillColor( static_cast<const XFillColorItem&>(pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
+ Color aFillColor( pObj->GetMergedItem( XATTR_FILLCOLOR ).GetColorValue() );
sal_Int32 nFillColor( aFillColor.GetColor() );
xPropSet->setPropertyValue( "FillColor", Any( nFillColor ) );
}
@@ -7427,7 +7427,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
case drawing::FillStyle_GRADIENT :
{
eFS = css::drawing::FillStyle_GRADIENT;
- XGradient aXGradient(static_cast<const XFillGradientItem&>(pObj->GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aXGradient(pObj->GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue());
css::awt::Gradient aGradient;
aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle();
@@ -7451,7 +7451,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{
eFS = css::drawing::FillStyle_BITMAP;
- const XFillBitmapItem aXFillBitmapItem(static_cast<const XFillBitmapItem&>(pObj->GetMergedItem( XATTR_FILLBITMAP )));
+ const XFillBitmapItem aXFillBitmapItem(pObj->GetMergedItem( XATTR_FILLBITMAP ));
OUString aURL( UNO_NAME_GRAPHOBJ_URLPREFIX);
aURL += OStringToOUString(
aXFillBitmapItem.GetGraphicObject().GetUniqueID(),
@@ -7459,8 +7459,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) );
- const XFillBmpStretchItem aStretchItem(static_cast<const XFillBmpStretchItem&>(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH )));
- const XFillBmpTileItem aTileItem(static_cast<const XFillBmpTileItem&>(pObj->GetMergedItem( XATTR_FILLBMP_TILE )));
+ const XFillBmpStretchItem aStretchItem(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
+ const XFillBmpTileItem aTileItem(pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
if( aTileItem.GetValue() )
xPropSet->setPropertyValue( "FillBitmapMode", Any( css::drawing::BitmapMode_REPEAT ) );
else if( aStretchItem.GetValue() )
@@ -7478,7 +7478,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
xPropSet->setPropertyValue( "FillStyle", Any( eFS ) );
if ( eFillStyle != drawing::FillStyle_NONE )
{
- sal_Int16 nFillTransparence( static_cast<const XFillTransparenceItem&>(pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
+ sal_Int16 nFillTransparence( pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ).GetValue() );
xPropSet->setPropertyValue( "FillTransparence", Any( nFillTransparence ) );
}
}
@@ -7491,17 +7491,17 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable > const
{
try
{
- drawing::LineStyle eLineStyle(static_cast<const XLineStyleItem&>(pLine->GetMergedItem( XATTR_LINESTYLE )).GetValue());
+ drawing::LineStyle eLineStyle(pLine->GetMergedItem( XATTR_LINESTYLE ).GetValue());
css::table::BorderLine2 aBorderLine;
switch( eLineStyle )
{
case drawing::LineStyle_DASH :
case drawing::LineStyle_SOLID :
{
- Color aLineColor( static_cast<const XLineColorItem&>(pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
+ Color aLineColor( pLine->GetMergedItem( XATTR_LINECOLOR ).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
// Avoid width = 0, the min value should be 1.
- sal_Int32 nLineWidth = std::max(sal_Int32(1), static_cast<const XLineWidthItem&>(pLine->GetMergedItem(XATTR_LINEWIDTH)) .GetValue() / 4);
+ sal_Int32 nLineWidth = std::max(sal_Int32(1), pLine->GetMergedItem(XATTR_LINEWIDTH) .GetValue() / 4);
aBorderLine.LineWidth = static_cast< sal_Int16 >( nLineWidth );
aBorderLine.LineStyle = eLineStyle == drawing::LineStyle_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
}
diff --git a/include/svl/typedwhich.hxx b/include/svl/typedwhich.hxx
index 2c2141250d02..cb22d48ebdc3 100644
--- a/include/svl/typedwhich.hxx
+++ b/include/svl/typedwhich.hxx
@@ -19,7 +19,7 @@
template <class T> class TypedWhichId final
{
public:
- constexpr TypedWhichId(sal_uInt16 nWhich)
+ explicit constexpr TypedWhichId(sal_uInt16 nWhich)
: mnWhich(nWhich)
{
}
diff --git a/include/svx/xdef.hxx b/include/svx/xdef.hxx
index 7fd5dbab0096..af2aba56d2ac 100644
--- a/include/svx/xdef.hxx
+++ b/include/svx/xdef.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SVX_XDEF_HXX
+#include <svl/typedwhich.hxx>
+
/*************************************************************************
|*
|* Adding an attribute: Copy line, above which you want to add something,
@@ -28,65 +30,113 @@
|*
\************************************************************************/
+class SfxMetricItem;
+class XFillAttrSetItem;
+class XFillBackgroundItem;
+class XFillBitmapItem;
+class XFillBmpPosItem;
+class XFillBmpPosOffsetXItem;
+class XFillBmpPosOffsetYItem;
+class XFillBmpSizeLogItem;
+class XFillBmpSizeYItem;
+class XFillBmpStretchItem;
+class XFillBmpTileItem;
+class XFillBmpTileOffsetXItem;
+class XFillBmpTileOffsetYItem;
+class XFillColorItem;
+class XFillFloatTransparenceItem;
+class XFillGradientItem;
+class XFillHatchItem;
+class XFillStyleItem;
+class XFillTransparenceItem;
+class XFormTextAdjustItem;
+class XFormTextDistanceItem;
+class XFormTextHideFormItem;
+class XFormTextMirrorItem;
+class XFormTextOutlineItem;
+class XFormTextShadowColorItem;
+class XFormTextShadowItem;
+class XFormTextShadowTranspItem;
+class XFormTextShadowXValItem;
+class XFormTextShadowYValItem;
+class XFormTextStartItem;
+class XFormTextStyleItem;
+class XGradientStepCountItem;
+class XLineAttrSetItem;
+class XLineCapItem;
+class XLineColorItem;
+class XLineDashItem;
+class XLineEndCenterItem;
+class XLineEndItem;
+class XLineEndWidthItem;
+class XLineJointItem;
+class XLineStartCenterItem;
+class XLineStartItem;
+class XLineStartWidthItem;
+class XLineStyleItem;
+class XLineTransparenceItem;
+class XLineWidthItem;
+class XSecondaryFillColorItem;
+
#define COL_DEFAULT_SHAPE_FILLING 0x729fcf
#define COL_DEFAULT_SHAPE_STROKE 0x3465a4
#define XATTR_START 1000
#define XATTR_LINE_FIRST XATTR_START /* V3: 1000 V2: 1000 */
-#define XATTR_LINESTYLE XATTR_LINE_FIRST
-#define XATTR_LINEDASH (XATTR_LINE_FIRST + 1) /* V3: 1001 V2: 1001 */
-#define XATTR_LINEWIDTH (XATTR_LINE_FIRST + 2) /* V3: 1002 V2: 1002 */
-#define XATTR_LINECOLOR (XATTR_LINE_FIRST + 3) /* V3: 1003 V2: 1003 */
-#define XATTR_LINESTART (XATTR_LINE_FIRST + 4) /* V3: 1004 V2: 1004 */
-#define XATTR_LINEEND (XATTR_LINE_FIRST + 5) /* V3: 1005 V2: 1005 */
-#define XATTR_LINESTARTWIDTH (XATTR_LINE_FIRST + 6) /* V3: 1006 V2: 1006 */
-#define XATTR_LINEENDWIDTH (XATTR_LINE_FIRST + 7) /* V3: 1007 V2: 1007 */
-#define XATTR_LINESTARTCENTER (XATTR_LINE_FIRST + 8) /* V3: 1008 V2: 1008 */
-#define XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
-#define XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
-#define XATTR_LINEJOINT (XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
-#define XATTR_LINECAP (XATTR_LINE_FIRST + 12) /* V3: 1012 */
+#define XATTR_LINESTYLE TypedWhichId<XLineStyleItem>(XATTR_LINE_FIRST)
+#define XATTR_LINEDASH TypedWhichId<XLineDashItem>(XATTR_LINE_FIRST + 1) /* V3: 1001 V2: 1001 */
+#define XATTR_LINEWIDTH TypedWhichId<XLineWidthItem>(XATTR_LINE_FIRST + 2) /* V3: 1002 V2: 1002 */
+#define XATTR_LINECOLOR TypedWhichId<XLineColorItem>(XATTR_LINE_FIRST + 3) /* V3: 1003 V2: 1003 */
+#define XATTR_LINESTART TypedWhichId<XLineStartItem>(XATTR_LINE_FIRST + 4) /* V3: 1004 V2: 1004 */
+#define XATTR_LINEEND TypedWhichId<XLineEndItem>(XATTR_LINE_FIRST + 5) /* V3: 1005 V2: 1005 */
+#define XATTR_LINESTARTWIDTH TypedWhichId<XLineStartWidthItem>(XATTR_LINE_FIRST + 6) /* V3: 1006 V2: 1006 */
+#define XATTR_LINEENDWIDTH TypedWhichId<XLineEndWidthItem>(XATTR_LINE_FIRST + 7) /* V3: 1007 V2: 1007 */
+#define XATTR_LINESTARTCENTER TypedWhichId<XLineStartCenterItem>(XATTR_LINE_FIRST + 8) /* V3: 1008 V2: 1008 */
+#define XATTR_LINEENDCENTER TypedWhichId<XLineEndCenterItem>(XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
+#define XATTR_LINETRANSPARENCE TypedWhichId<XLineTransparenceItem>(XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
+#define XATTR_LINEJOINT TypedWhichId<XLineJointItem>(XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
+#define XATTR_LINECAP TypedWhichId<XLineCapItem>(XATTR_LINE_FIRST + 12) /* V3: 1012 */
#define XATTR_LINE_LAST XATTR_LINECAP
-#define XATTRSET_LINE (XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
+#define XATTRSET_LINE TypedWhichId<XLineAttrSetItem>(XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
-#define XATTR_FILL_FIRST (XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
-#define XATTR_FILLSTYLE XATTR_FILL_FIRST
-#define XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1) /* V3: 1019 V2: 1019 */
-#define XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2) /* V3: 1020 V2: 1020 */
-#define XATTR_FILLHATCH (XATTR_FILL_FIRST + 3) /* V3: 1021 V2: 1021 */
-#define XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4) /* V3: 1022 V2: 1022 */
-#define XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5) /* V3: 1023 V2: 1023 */
-#define XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6) /* V3: 1024 V2: 1024 */
-#define XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7) /* V3: 1025 V2: 1025 */
-#define XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8) /* V3: 1026 V2: 1026 */
-#define XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9) /* V3: 1027 V2: 1027 */
-#define XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10) /* V3: 1028 V2: 1028 */
-#define XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11) /* V3: 1029 V2: 1029 */
-#define XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12) /* V3: 1030 */
-#define XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13) /* V3: 1031 */
-#define XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14) /* V3: 1032 */
-#define XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15) /* V3: 1033 */
-#define XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16) /* V3: 1034 */
-#define XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17) /* V3: 1041 */
-#define XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18) /* V3: 1042 */
-#define XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19) /* V3: 1043 */
-#define XATTR_FILL_LAST XATTR_FILLBACKGROUND
-#define XATTRSET_FILL (XATTR_FILL_LAST + 1) /* V3: 1047 V2: 1030 */
+#define XATTR_FILL_FIRST sal_uInt16(XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
+#define XATTR_FILLSTYLE TypedWhichId<XFillStyleItem>(XATTR_FILL_FIRST)
+#define XATTR_FILLCOLOR TypedWhichId<XFillColorItem>(XATTR_FILL_FIRST + 1) /* V3: 1019 V2: 1019 */
+#define XATTR_FILLGRADIENT TypedWhichId<XFillGradientItem>(XATTR_FILL_FIRST + 2) /* V3: 1020 V2: 1020 */
+#define XATTR_FILLHATCH TypedWhichId<XFillHatchItem>(XATTR_FILL_FIRST + 3) /* V3: 1021 V2: 1021 */
+#define XATTR_FILLBITMAP TypedWhichId<XFillBitmapItem>(XATTR_FILL_FIRST + 4) /* V3: 1022 V2: 1022 */
+#define XATTR_FILLTRANSPARENCE TypedWhichId<XFillTransparenceItem>(XATTR_FILL_FIRST + 5) /* V3: 1023 V2: 1023 */
+#define XATTR_GRADIENTSTEPCOUNT TypedWhichId<XGradientStepCountItem>(XATTR_FILL_FIRST + 6) /* V3: 1024 V2: 1024 */
+#define XATTR_FILLBMP_TILE TypedWhichId<XFillBmpTileItem>(XATTR_FILL_FIRST + 7) /* V3: 1025 V2: 1025 */
+#define XATTR_FILLBMP_POS TypedWhichId<XFillBmpPosItem>(XATTR_FILL_FIRST + 8) /* V3: 1026 V2: 1026 */
+#define XATTR_FILLBMP_SIZEX TypedWhichId<SfxMetricItem>(XATTR_FILL_FIRST + 9) /* V3: 1027 V2: 1027 */
+#define XATTR_FILLBMP_SIZEY TypedWhichId<XFillBmpSizeYItem>(XATTR_FILL_FIRST + 10) /* V3: 1028 V2: 1028 */
+#define XATTR_FILLFLOATTRANSPARENCE TypedWhichId<XFillFloatTransparenceItem>(XATTR_FILL_FIRST + 11) /* V3: 1029 V2: 1029 */
+#define XATTR_SECONDARYFILLCOLOR TypedWhichId<XSecondaryFillColorItem>(XATTR_FILL_FIRST + 12) /* V3: 1030 */
+#define XATTR_FILLBMP_SIZELOG TypedWhichId<XFillBmpSizeLogItem>(XATTR_FILL_FIRST + 13) /* V3: 1031 */
+#define XATTR_FILLBMP_TILEOFFSETX TypedWhichId<XFillBmpTileOffsetXItem>(XATTR_FILL_FIRST + 14) /* V3: 1032 */
+#define XATTR_FILLBMP_TILEOFFSETY TypedWhichId<XFillBmpTileOffsetYItem>(XATTR_FILL_FIRST + 15) /* V3: 1033 */
+#define XATTR_FILLBMP_STRETCH TypedWhichId<XFillBmpStretchItem>(XATTR_FILL_FIRST + 16) /* V3: 1034 */
+#define XATTR_FILLBMP_POSOFFSETX TypedWhichId<XFillBmpPosOffsetXItem>(XATTR_FILL_FIRST + 17) /* V3: 1041 */
+#define XATTR_FILLBMP_POSOFFSETY TypedWhichId<XFillBmpPosOffsetYItem>(XATTR_FILL_FIRST + 18) /* V3: 1042 */
+#define XATTR_FILLBACKGROUND TypedWhichId<XFillBackgroundItem>(XATTR_FILL_FIRST + 19) /* V3: 1043 */
+#define XATTR_FILL_LAST sal_uInt16(XATTR_FILLBACKGROUND)
+#define XATTRSET_FILL TypedWhichId<XFillAttrSetItem>(XATTR_FILL_LAST + 1) /* V3: 1047 V2: 1030 */
#define XATTR_TEXT_FIRST (XATTRSET_FILL + 1)
-#define XATTR_FORMTXTSTYLE XATTR_TEXT_FIRST /* V3: 1048 V2: 1031 */
-#define XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1) /* V3: 1049 V2: 1032 */
-#define XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2) /* V3: 1050 V2: 1033 */
-#define XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3) /* V3: 1051 V2: 1034 */
-#define XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4) /* V3: 1052 V2: 1035 */
-#define XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5) /* V3: 1053 V2: 1036 */
-#define XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6) /* V3: 1054 V2: 1037 */
-#define XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7) /* V3: 1055 V2: 1038 */
-#define XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8) /* V3: 1056 V2: 1039 */
-#define XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9) /* V3: 1057 V2: 1040 */
-#define XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10) /* V3: 1059 V2: 1042 */
-#define XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11) /* V3: 1060 V2: 1043 */
+#define XATTR_FORMTXTSTYLE TypedWhichId<XFormTextStyleItem>(XATTR_TEXT_FIRST) /* V3: 1048 V2: 1031 */
+#define XATTR_FORMTXTADJUST TypedWhichId<XFormTextAdjustItem>(XATTR_TEXT_FIRST + 1) /* V3: 1049 V2: 1032 */
+#define XATTR_FORMTXTDISTANCE TypedWhichId<XFormTextDistanceItem>(XATTR_TEXT_FIRST + 2) /* V3: 1050 V2: 1033 */
+#define XATTR_FORMTXTSTART TypedWhichId<XFormTextStartItem>(XATTR_TEXT_FIRST + 3) /* V3: 1051 V2: 1034 */
+#define XATTR_FORMTXTMIRROR TypedWhichId<XFormTextMirrorItem>(XATTR_TEXT_FIRST + 4) /* V3: 1052 V2: 1035 */
+#define XATTR_FORMTXTOUTLINE TypedWhichId<XFormTextOutlineItem>(XATTR_TEXT_FIRST + 5) /* V3: 1053 V2: 1036 */
+#define XATTR_FORMTXTSHADOW TypedWhichId<XFormTextShadowItem>(XATTR_TEXT_FIRST + 6) /* V3: 1054 V2: 1037 */
+#define XATTR_FORMTXTSHDWCOLOR TypedWhichId<XFormTextShadowColorItem>(XATTR_TEXT_FIRST + 7) /* V3: 1055 V2: 1038 */
+#define XATTR_FORMTXTSHDWXVAL TypedWhichId<XFormTextShadowXValItem>(XATTR_TEXT_FIRST + 8) /* V3: 1056 V2: 1039 */
+#define XATTR_FORMTXTSHDWYVAL TypedWhichId<XFormTextShadowYValItem>(XATTR_TEXT_FIRST + 9) /* V3: 1057 V2: 1040 */
+#define XATTR_FORMTXTHIDEFORM TypedWhichId<XFormTextHideFormItem>(XATTR_TEXT_FIRST + 10) /* V3: 1059 V2: 1042 */
+#define XATTR_FORMTXTSHDWTRANSP TypedWhichId<XFormTextShadowTranspItem>(XATTR_TEXT_FIRST + 11) /* V3: 1060 V2: 1043 */
#define XATTR_TEXT_LAST XATTR_FORMTXTSHDWTRANSP
#define XATTR_END XATTR_TEXT_LAST
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 92f347e1d07f..e8170d41284a 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -130,7 +130,7 @@ static bool lcl_HasThickLine( const SdrObject& rObj )
{
// thin lines get width 0 -> everything greater 0 is a thick line
- return static_cast<const XLineWidthItem&>(rObj.GetMergedItem(XATTR_LINEWIDTH)).GetValue() > 0;
+ return rObj.GetMergedItem(XATTR_LINEWIDTH).GetValue() > 0;
}
ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
@@ -401,9 +401,9 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
const SfxItemSet& rSet = pObject->GetMergedItemSet();
bool bObjStartAlien =
- lcl_IsOtherTab( static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
+ lcl_IsOtherTab( rSet.Get(XATTR_LINESTART).GetLineStartValue() );
bool bObjEndAlien =
- lcl_IsOtherTab( static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
+ lcl_IsOtherTab( rSet.Get(XATTR_LINEEND).GetLineEndValue() );
bool bStartHit = bStartAlien ? bObjStartAlien :
( !bObjStartAlien && aStartRect.IsInside(pObject->GetPoint(0)) );
@@ -427,9 +427,9 @@ bool ScDetectiveFunc::IsNonAlienArrow( const SdrObject* pObject )
const SfxItemSet& rSet = pObject->GetMergedItemSet();
bool bObjStartAlien =
- lcl_IsOtherTab( static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
+ lcl_IsOtherTab( rSet.Get(XATTR_LINESTART).GetLineStartValue() );
bool bObjEndAlien =
- lcl_IsOtherTab( static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
+ lcl_IsOtherTab( rSet.Get(XATTR_LINEEND).GetLineEndValue() );
return !bObjStartAlien && !bObjEndAlien;
}
@@ -1580,7 +1580,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
FindFrameForObject( pObject, rSource ); // modifies rSource
}
- ColorData nObjColor = static_cast<const XLineColorItem&>(pObject->GetMergedItem(XATTR_LINECOLOR)).GetColorValue().GetColor();
+ ColorData nObjColor = pObject->GetMergedItem(XATTR_LINECOLOR).GetColorValue().GetColor();
if ( nObjColor == GetErrorColor() && nObjColor != GetArrowColor() )
rRedLine = true;
}
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 0082e1c0e0b3..fcd3d102659b 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1209,8 +1209,8 @@ XclExpNote::XclExpNote(const XclExpRoot& rRoot, const ScAddress& rScPos,
mbLocked = pCaption->IsMoveProtect() || pCaption->IsResizeProtect();
// AutoFill style would change if Postit.cxx object creation values are changed
- OUString aCol(GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR).GetValue());
- mbAutoFill = aCol.isEmpty() && (GETITEM(aItemSet, XFillStyleItem, XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_SOLID);
+ OUString aCol(aItemSet.Get(XATTR_FILLCOLOR).GetValue());
+ mbAutoFill = aCol.isEmpty() && (aItemSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_SOLID);
mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
}
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 671f81d9acaf..d3ae4c990850 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -270,7 +270,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject* pObj, sal
// determine line width and calculate with it the line end width
if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = static_cast<const XLineWidthItem&>( aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if( nValue > 0 )
nWidth = nValue * 3;
}
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 3614a9668408..8fe7ceb1b98a 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2638,8 +2638,8 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
const SfxItemSet& rObjItemSet = pObj->GetMergedItemSet();
- drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(rObjItemSet.Get(XATTR_FILLSTYLE)).GetValue();
- drawing::LineStyle eLineStyle = static_cast<const XLineStyleItem&>(rObjItemSet.Get(XATTR_LINESTYLE)).GetValue();
+ drawing::FillStyle eFillStyle = rObjItemSet.Get(XATTR_FILLSTYLE).GetValue();
+ drawing::LineStyle eLineStyle = rObjItemSet.Get(XATTR_LINESTYLE).GetValue();
if ( ( eFillStyle == drawing::FillStyle_NONE ) && ( eLineStyle == drawing::LineStyle_NONE ) )
bDontAnimateInvisibleShape = true;
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index 69174d372454..15c8f5cd11c1 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -52,10 +52,10 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
- const drawing::LineStyle eLineStyle1 = static_cast<const XLineStyleItem&>( aSet1.Get( XATTR_LINESTYLE ) ).GetValue();
- const drawing::LineStyle eLineStyle2 = static_cast<const XLineStyleItem&>( aSet2.Get( XATTR_LINESTYLE ) ).GetValue();
- const drawing::FillStyle eFillStyle1 = static_cast<const XFillStyleItem&>( aSet1.Get( XATTR_FILLSTYLE ) ).GetValue();
- const drawing::FillStyle eFillStyle2 = static_cast<const XFillStyleItem&>( aSet2.Get( XATTR_FILLSTYLE ) ).GetValue();
+ const drawing::LineStyle eLineStyle1 = aSet1.Get( XATTR_LINESTYLE ).GetValue();
+ const drawing::LineStyle eLineStyle2 = aSet2.Get( XATTR_LINESTYLE ).GetValue();
+ const drawing::FillStyle eFillStyle1 = aSet1.Get( XATTR_FILLSTYLE ).GetValue();
+ const drawing::FillStyle eFillStyle2 = aSet2.Get( XATTR_FILLSTYLE ).GetValue();
if ( ( ( eLineStyle1 == drawing::LineStyle_NONE ) || ( eLineStyle2 == drawing::LineStyle_NONE ) ) &&
( ( eFillStyle1 != drawing::FillStyle_SOLID ) || ( eFillStyle2 != drawing::FillStyle_SOLID ) ) )
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index e10b37b53c0e..e46293693ae6 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -586,7 +586,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj
// determine line width and calculate with it the line end width
if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = static_cast<const XLineWidthItem&>( aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if( nValue > 0 )
nWidth = nValue * 3;
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 5c72bc6463d2..dc005c0e968d 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -327,7 +327,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
// applying style sheet for background objects
pObj->SetStyleSheet(pSheet, false);
SfxItemSet& rSet = pSheet->GetItemSet();
- const XFillStyleItem& rFillStyle = static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE));
+ const XFillStyleItem& rFillStyle = rSet.Get(XATTR_FILLSTYLE);
if ( bForceFillStyle )
{
if (rFillStyle.GetValue() == drawing::FillStyle_NONE)
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 95714ad45553..94523658c2e7 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -50,8 +50,6 @@ using namespace com::sun::star;
namespace sd {
-#define ITEMVALUE( ItemSet, Id, Cast ) ( static_cast<const Cast&>( (ItemSet).Get( (Id) ) ).GetValue() )
-
FuMorph::FuMorph (
ViewShell* pViewSh,
::sd::Window* pWin,
@@ -354,10 +352,10 @@ void FuMorph::ImpInsertPolygons(
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
- const drawing::LineStyle eLineStyle1 = ITEMVALUE( aSet1, XATTR_LINESTYLE, XLineStyleItem );
- const drawing::LineStyle eLineStyle2 = ITEMVALUE( aSet2, XATTR_LINESTYLE, XLineStyleItem );
- const drawing::FillStyle eFillStyle1 = ITEMVALUE( aSet1, XATTR_FILLSTYLE, XFillStyleItem );
- const drawing::FillStyle eFillStyle2 = ITEMVALUE( aSet2, XATTR_FILLSTYLE, XFillStyleItem );
+ const drawing::LineStyle eLineStyle1 = aSet1.Get(XATTR_LINESTYLE).GetValue();
+ const drawing::LineStyle eLineStyle2 = aSet2.Get(XATTR_LINESTYLE).GetValue();
+ const drawing::FillStyle eFillStyle1 = aSet1.Get(XATTR_FILLSTYLE).GetValue();
+ const drawing::FillStyle eFillStyle2 = aSet2.Get(XATTR_FILLSTYLE).GetValue();
if ( bAttributeFade )
{
@@ -365,13 +363,11 @@ void FuMorph::ImpInsertPolygons(
{
bLineWidth = bLineColor = true;
- aStartLineCol = static_cast< XLineColorItem const & >(
- aSet1.Get(XATTR_LINECOLOR)).GetColorValue();
- aEndLineCol = static_cast< XLineColorItem const & >(
- aSet2.Get(XATTR_LINECOLOR)).GetColorValue();
+ aStartLineCol = aSet1.Get(XATTR_LINECOLOR).GetColorValue();
+ aEndLineCol = aSet2.Get(XATTR_LINECOLOR).GetColorValue();
- nStartLineWidth = ITEMVALUE( aSet1, XATTR_LINEWIDTH, XLineWidthItem );
- nEndLineWidth = ITEMVALUE( aSet2, XATTR_LINEWIDTH, XLineWidthItem );
+ nStartLineWidth = aSet1.Get(XATTR_LINEWIDTH).GetValue();
+ nEndLineWidth = aSet2.Get(XATTR_LINEWIDTH).GetValue();
}
else if ( ( eLineStyle1 == drawing::LineStyle_NONE ) && ( eLineStyle2 == drawing::LineStyle_NONE ) )
bIgnoreLine = true;
@@ -379,10 +375,8 @@ void FuMorph::ImpInsertPolygons(
if ( ( eFillStyle1 == drawing::FillStyle_SOLID ) && ( eFillStyle2 == drawing::FillStyle_SOLID ) )
{
bFillColor = true;
- aStartFillCol = static_cast< XFillColorItem const & >(
- aSet1.Get(XATTR_FILLCOLOR)).GetColorValue();
- aEndFillCol = static_cast< XFillColorItem const & >(
- aSet2.Get(XATTR_FILLCOLOR)).GetColorValue();
+ aStartFillCol = aSet1.Get(XATTR_FILLCOLOR).GetColorValue();
+ aEndFillCol = aSet2.Get(XATTR_FILLCOLOR).GetColorValue();
}
else if ( ( eFillStyle1 == drawing::FillStyle_NONE ) && ( eFillStyle2 == drawing::FillStyle_NONE ) )
bIgnoreFill = true;
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index fa14378f2da0..040701cfc286 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -180,7 +180,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
// Only this page, get attributes for background fill
const SfxItemSet& rBackgroundAttributes = pPage->getSdrPageProperties().GetItemSet();
- if(drawing::FillStyle_NONE != static_cast<const XFillStyleItem&>(rBackgroundAttributes.Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE != rBackgroundAttributes.Get(XATTR_FILLSTYLE).GetValue())
{
// page attributes are used, take them
rMergedAttr.Put(rBackgroundAttributes);
@@ -188,7 +188,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
else
{
if(pStyleSheet
- && drawing::FillStyle_NONE != static_cast<const XFillStyleItem&>(pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue())
+ && drawing::FillStyle_NONE != pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE).GetValue())
{
// if the page has no fill style, use the settings from the
// background stylesheet (if used)
@@ -294,12 +294,10 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
const sal_uInt16 nId = GetSlotID();
if (nId == SID_SAVE_BACKGROUND)
{
- const XFillStyleItem& rStyleItem =
- static_cast<const XFillStyleItem&>(aMergedAttr.Get(XATTR_FILLSTYLE));
+ const XFillStyleItem& rStyleItem = aMergedAttr.Get(XATTR_FILLSTYLE);
if (drawing::FillStyle_BITMAP == (drawing::FillStyle)rStyleItem.GetValue())
{
- const XFillBitmapItem& rBitmap =
- static_cast<const XFillBitmapItem&>(aMergedAttr.Get(XATTR_FILLBITMAP));
+ const XFillBitmapItem& rBitmap = aMergedAttr.Get(XATTR_FILLBITMAP);
const GraphicObject& rGraphicObj = rBitmap.GetGraphicObject();
GraphicHelper::ExportGraphic(pParent, rGraphicObj.GetGraphic(), "");
}
@@ -441,7 +439,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
SdPage *pPage = mpDoc->GetSdPage(i, ePageKind);
const SfxItemSet& rFillAttributes = pPage->getSdrPageProperties().GetItemSet();
- if(drawing::FillStyle_NONE != static_cast<const XFillStyleItem&>(rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE != rFillAttributes.Get(XATTR_FILLSTYLE).GetValue())
{
SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc, *pPage, rFillAttributes);
pUndoGroup->AddAction(pBackgroundObjUndoAction);
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index cf8c8d8d4571..33998e04180e 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -1200,7 +1200,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
aSet.Put(pObj->GetMergedItemSet());
- const XFillStyleItem& rFillStyle = static_cast<const XFillStyleItem&>( aSet.Get(XATTR_FILLSTYLE) );
+ const XFillStyleItem& rFillStyle = aSet.Get(XATTR_FILLSTYLE);
bFilled = rFillStyle.GetValue() != drawing::FillStyle_NONE;
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 60a6e7bb07ca..10f25204c810 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2556,7 +2556,7 @@ void SdDrawPage::getBackground( Any& rValue ) throw()
{
const SfxItemSet& rFillAttributes = GetPage()->getSdrPageProperties().GetItemSet();
- if(drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE == rFillAttributes.Get(XATTR_FILLSTYLE).GetValue())
{
// no fill set (switched off by drawing::FillStyle_NONE), clear rValue to represent this
rValue.clear();
@@ -2969,7 +2969,7 @@ void SdMasterPage::getBackground( Any& rValue )
// should NOT happen and is an error
const SfxItemSet& rFallbackItemSet(SvxFmDrawPage::mpPage->getSdrPageProperties().GetItemSet());
- if(drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(rFallbackItemSet.Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE == rFallbackItemSet.Get(XATTR_FILLSTYLE).GetValue())
{
rValue <<= Reference< beans::XPropertySet >(
new SdUnoPageBackground(GetModel()->GetDoc(), &rFallbackItemSet));
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index c91aa9edf0e0..f7cdadca4563 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1586,7 +1586,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SfxItemSet aMergedAttr(GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
SdStyleSheet* pStyleSheet = pPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
MergePageBackgroundFilling(pPage, pStyleSheet, meEditMode == EditMode::MasterPage, aMergedAttr);
- if (drawing::FillStyle_BITMAP == static_cast<const XFillStyleItem&>(aMergedAttr.Get(XATTR_FILLSTYLE)).GetValue())
+ if (drawing::FillStyle_BITMAP == aMergedAttr.Get(XATTR_FILLSTYLE).GetValue())
{
bDisableSaveBackground = false;
}
@@ -1696,7 +1696,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
rSet.Put(aPageItem);
const SfxItemSet &rPageAttr = pPage->getSdrPageProperties().GetItemSet();
- drawing::FillStyle eXFS = (drawing::FillStyle) static_cast<const XFillStyleItem*>( rPageAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue();
+ drawing::FillStyle eXFS = (drawing::FillStyle) rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue();
XFillStyleItem aFillStyleItem( eXFS );
aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
rSet.Put(aFillStyleItem);
@@ -1705,7 +1705,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
{
case drawing::FillStyle_SOLID:
{
- Color aColor = static_cast<const XFillColorItem*>( rPageAttr.GetItem( XATTR_FILLCOLOR ) )->GetColorValue();
+ Color aColor = rPageAttr.GetItem( XATTR_FILLCOLOR )->GetColorValue();
XFillColorItem aFillColorItem( OUString(), aColor );
aFillColorItem.SetWhich( SID_ATTR_PAGE_COLOR );
rSet.Put( aFillColorItem );
@@ -1714,7 +1714,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
case drawing::FillStyle_GRADIENT:
{
- const XFillGradientItem *pGradient = static_cast<const XFillGradientItem*>( rPageAttr.GetItem( XATTR_FILLGRADIENT ) );
+ const XFillGradientItem *pGradient = rPageAttr.GetItem( XATTR_FILLGRADIENT );
XFillGradientItem aFillGradientItem( pGradient->GetName(), pGradient->GetGradientValue(), SID_ATTR_PAGE_GRADIENT );
rSet.Put( aFillGradientItem );
}
@@ -1722,7 +1722,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
case drawing::FillStyle_HATCH:
{
- const XFillHatchItem *pFillHatchItem( static_cast<const XFillHatchItem*>( rPageAttr.GetItem( XATTR_FILLHATCH ) ) );
+ const XFillHatchItem *pFillHatchItem( rPageAttr.GetItem( XATTR_FILLHATCH ) );
XFillHatchItem aFillHatchItem( pFillHatchItem->GetName(), pFillHatchItem->GetHatchValue());
aFillHatchItem.SetWhich( SID_ATTR_PAGE_HATCH );
rSet.Put( aFillHatchItem );
@@ -1731,7 +1731,7 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
case drawing::FillStyle_BITMAP:
{
- const XFillBitmapItem *pFillBitmapItem = static_cast<const XFillBitmapItem*>( rPageAttr.GetItem( XATTR_FILLBITMAP ) );
+ const XFillBitmapItem *pFillBitmapItem = rPageAttr.GetItem( XATTR_FILLBITMAP );
XFillBitmapItem aFillBitmapItem( pFillBitmapItem->GetName(), pFillBitmapItem->GetGraphicObject() );
aFillBitmapItem.SetWhich( SID_ATTR_PAGE_BITMAP );
rSet.Put( aFillBitmapItem );
@@ -1769,7 +1769,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
{
case SID_ATTR_PAGE_FILLSTYLE:
{
- XFillStyleItem aFSItem( static_cast<const XFillStyleItem&>(pArgs->Get( XATTR_FILLSTYLE )) );
+ XFillStyleItem aFSItem( pArgs->Get( XATTR_FILLSTYLE ) );
drawing::FillStyle eXFS = aFSItem.GetValue();
if ( eXFS == drawing::FillStyle_NONE )
@@ -1779,7 +1779,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
case SID_ATTR_PAGE_COLOR:
{
- XFillColorItem aColorItem( static_cast<const XFillColorItem&>(pArgs->Get( XATTR_FILLCOLOR )) );
+ XFillColorItem aColorItem( pArgs->Get( XATTR_FILLCOLOR ) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
rPageProperties.PutItem( aColorItem );
}
@@ -1787,7 +1787,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
case SID_ATTR_PAGE_GRADIENT:
{
- XFillGradientItem aGradientItem( static_cast<const XFillGradientItem&>(pArgs->Get( XATTR_FILLGRADIENT )) );
+ XFillGradientItem aGradientItem( pArgs->Get( XATTR_FILLGRADIENT ) );
// MigrateItemSet guarantees unique gradient names
SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
@@ -1801,7 +1801,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
case SID_ATTR_PAGE_HATCH:
{
- XFillHatchItem aHatchItem( static_cast<const XFillHatchItem&>(pArgs->Get( XATTR_FILLHATCH )) );
+ XFillHatchItem aHatchItem( pArgs->Get( XATTR_FILLHATCH ) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_HATCH ) );
rPageProperties.PutItem( aHatchItem );
}
@@ -1809,7 +1809,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
case SID_ATTR_PAGE_BITMAP:
{
- XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem&>(pArgs->Get( XATTR_FILLBITMAP )) );
+ XFillBitmapItem aBitmapItem( pArgs->Get( XATTR_FILLBITMAP ) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_BITMAP ) );
rPageProperties.PutItem( aBitmapItem );
}
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index c691d4ef0b12..c3a55f55f031 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -812,7 +812,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
{
case SID_GETFILLSTYLE :
{
- const XFillStyleItem &rFillStyleItem = static_cast<const XFillStyleItem &>(aAttr.Get (XATTR_FILLSTYLE));
+ const XFillStyleItem &rFillStyleItem = aAttr.Get (XATTR_FILLSTYLE);
rSet.Put (SfxUInt32Item (nWhich, (long) rFillStyleItem.GetValue ()));
break;
@@ -820,7 +820,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
case SID_GETLINESTYLE :
{
- const XLineStyleItem &rLineStyleItem = static_cast<const XLineStyleItem &>( aAttr.Get (XATTR_LINESTYLE) );
+ const XLineStyleItem &rLineStyleItem = aAttr.Get (XATTR_LINESTYLE);
rSet.Put (SfxUInt32Item (nWhich, (long) rLineStyleItem.GetValue ()));
break;
@@ -828,7 +828,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
case SID_GETLINEWIDTH :
{
- const XLineWidthItem &rLineWidthItem = static_cast<const XLineWidthItem &>( aAttr.Get (XATTR_LINEWIDTH) );
+ const XLineWidthItem &rLineWidthItem = aAttr.Get (XATTR_LINEWIDTH);
rSet.Put (SfxUInt32Item (nWhich, (long) rLineWidthItem.GetValue ()));
break;
@@ -845,7 +845,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
{
case 1 :
{
- const XLineColorItem &rLineColorItem = static_cast<const XLineColorItem &>( aAttr.Get (XATTR_LINECOLOR) );
+ const XLineColorItem &rLineColorItem = aAttr.Get (XATTR_LINECOLOR);
aColor = rLineColorItem.GetColorValue ();
break;
@@ -853,7 +853,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
case 2 :
{
- const XFillColorItem &rFillColorItem = static_cast<const XFillColorItem &>( aAttr.Get (XATTR_FILLCOLOR) );
+ const XFillColorItem &rFillColorItem = aAttr.Get (XATTR_FILLCOLOR);
aColor = rFillColorItem.GetColorValue ();
break;
@@ -862,7 +862,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
case 3 :
case 4 :
{
- const XFillGradientItem &rFillGradientItem = static_cast<const XFillGradientItem &>( aAttr.Get (XATTR_FILLGRADIENT) );
+ const XFillGradientItem &rFillGradientItem = aAttr.Get (XATTR_FILLGRADIENT);
const XGradient &rGradient = rFillGradientItem.GetGradientValue ();
aColor = (rWhatKind.GetValue () == 3)
@@ -873,7 +873,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
case 5:
{
- const XFillHatchItem &rFillHatchItem = static_cast<const XFillHatchItem &>( aAttr.Get (XATTR_FILLHATCH) );
+ const XFillHatchItem &rFillHatchItem = aAttr.Get (XATTR_FILLHATCH);
const XHatch &rHatch = rFillHatchItem.GetHatchValue ();
aColor = rHatch.GetColor ();
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index 78007e4e3649..0212473ddffb 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -51,8 +51,6 @@ using namespace ::com::sun::star;
namespace sd {
-#define ITEMVALUE(ItemSet,Id,Cast) static_cast<const Cast&>((ItemSet).Get(Id)).GetValue()
-
/**
* Handle SfxRequests for EffekteWindow
*/
@@ -144,7 +142,7 @@ void DrawViewShell::AssignFrom3DWindow()
// Determine if a FILL attribute is set.
// If not, hard set a fill attribute
- drawing::FillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem );
+ drawing::FillStyle eFillStyle = aSet.Get(XATTR_FILLSTYLE).GetValue();
if(eFillStyle == drawing::FillStyle_NONE)
aSet.Put(XFillStyleItem (drawing::FillStyle_SOLID));
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 24cde44a6dd8..a850126f0891 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -991,8 +991,8 @@ bool View::IsMorphingAllowed() const
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
- const drawing::FillStyle eFillStyle1 = static_cast<const XFillStyleItem&>( aSet1.Get( XATTR_FILLSTYLE ) ).GetValue();
- const drawing::FillStyle eFillStyle2 = static_cast<const XFillStyleItem&>( aSet2.Get( XATTR_FILLSTYLE ) ).GetValue();
+ const drawing::FillStyle eFillStyle1 = aSet1.Get( XATTR_FILLSTYLE ).GetValue();
+ const drawing::FillStyle eFillStyle2 = aSet2.Get( XATTR_FILLSTYLE ).GetValue();
if( ( eFillStyle1 == drawing::FillStyle_NONE || eFillStyle1 == drawing::FillStyle_SOLID ) &&
( eFillStyle2 == drawing::FillStyle_NONE || eFillStyle2 == drawing::FillStyle_SOLID ) )
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 9b029ec9ed09..4df02ee52385 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -680,7 +680,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) );
ReadXFillExchangeData( *xStm, aFillData );
- const Color aColor( static_cast<const XFillColorItem&>( aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ) ).GetColorValue() );
+ const Color aColor( aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ).GetColorValue() );
static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, true );
nRet = nDropAction;
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 00a6456edc8c..24e22a0f0dc5 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -1334,11 +1334,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
XFillAttrSetItem* pSetItem = aFillData.GetXFillAttrSetItem();
SfxItemSet rSet = pSetItem->GetItemSet();
- drawing::FillStyle eFill = static_cast<const XFillStyleItem&>( rSet.Get( XATTR_FILLSTYLE ) ).GetValue();
+ drawing::FillStyle eFill = rSet.Get( XATTR_FILLSTYLE ).GetValue();
if( eFill == drawing::FillStyle_SOLID || eFill == drawing::FillStyle_NONE )
{
- const XFillColorItem& rColItem = static_cast<const XFillColorItem&>( rSet.Get( XATTR_FILLCOLOR ) );
+ const XFillColorItem& rColItem = rSet.Get( XATTR_FILLCOLOR );
Color aColor( rColItem.GetColorValue() );
OUString aName( rColItem.GetName() );
SfxItemSet aSet( mrDoc.GetPool() );
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index ca42063e3096..e39e85e7fa05 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -702,8 +702,8 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
nXRef ( 0x80000000 ),
nYRef ( 0x80000000 ),
nColorData ( 0 ),
- bFilled ( static_cast<const XFillStyleItem&>(pAObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue() != drawing::FillStyle_NONE ),
- bStroked ( static_cast<const XLineStyleItem&>(pAObj->GetMergedItem( XATTR_LINESTYLE )).GetValue() != drawing::LineStyle_NONE ),
+ bFilled ( pAObj->GetMergedItem( XATTR_FILLSTYLE ).GetValue() != drawing::FillStyle_NONE ),
+ bStroked ( pAObj->GetMergedItem( XATTR_LINESTYLE ).GetValue() != drawing::LineStyle_NONE ),
bFlipH ( false ),
bFlipV ( false )
{
@@ -1388,14 +1388,14 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex
void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274
{
XLineStartItem aLineStart;
- aLineStart.SetLineStartValue(static_cast<const XLineEndItem&>(pObj->GetMergedItem( XATTR_LINEEND )).GetLineEndValue());
- XLineStartWidthItem aLineStartWidth(static_cast<const XLineEndWidthItem&>(pObj->GetMergedItem( XATTR_LINEENDWIDTH )).GetValue());
- XLineStartCenterItem aLineStartCenter(static_cast<const XLineEndCenterItem&>(pObj->GetMergedItem( XATTR_LINEENDCENTER )).GetValue());
+ aLineStart.SetLineStartValue(pObj->GetMergedItem( XATTR_LINEEND ).GetLineEndValue());
+ XLineStartWidthItem aLineStartWidth(pObj->GetMergedItem( XATTR_LINEENDWIDTH ).GetValue());
+ XLineStartCenterItem aLineStartCenter(pObj->GetMergedItem( XATTR_LINEENDCENTER ).GetValue());
XLineEndItem aLineEnd;
- aLineEnd.SetLineEndValue(static_cast<const XLineStartItem&>(pObj->GetMergedItem( XATTR_LINESTART )).GetLineStartValue());
- XLineEndWidthItem aLineEndWidth(static_cast<const XLineStartWidthItem&>(pObj->GetMergedItem( XATTR_LINESTARTWIDTH )).GetValue());
- XLineEndCenterItem aLineEndCenter(static_cast<const XLineStartCenterItem&>(pObj->GetMergedItem( XATTR_LINESTARTCENTER )).GetValue());
+ aLineEnd.SetLineEndValue(pObj->GetMergedItem( XATTR_LINESTART ).GetLineStartValue());
+ XLineEndWidthItem aLineEndWidth(pObj->GetMergedItem( XATTR_LINESTARTWIDTH ).GetValue());
+ XLineEndCenterItem aLineEndCenter(pObj->GetMergedItem( XATTR_LINESTARTCENTER ).GetValue());
pObj->SetMergedItem( aLineStart );
pObj->SetMergedItem( aLineStartWidth );
@@ -2147,7 +2147,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC
{
if ( !rObj.IsLine() )
{
- const drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue();
+ const drawing::FillStyle eFillStyle = rObj.GetMergedItem(XATTR_FILLSTYLE).GetValue();
switch( eFillStyle )
{
default:
@@ -2157,7 +2157,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC
if ( nColorCount || rObj.GetBrightness() != 0.0 )
{
aFillColor = GetColorData(
- static_cast<const XFillColorItem&>(rCustomShapeSet.Get( XATTR_FILLCOLOR )).GetColorValue(),
+ rCustomShapeSet.Get( XATTR_FILLCOLOR ).GetColorValue(),
std::min(nColorIndex, nColorCount-1), rObj.GetBrightness() );
rObj.SetMergedItem( XFillColorItem( "", aFillColor ) );
}
@@ -2165,7 +2165,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC
}
case drawing::FillStyle_GRADIENT:
{
- XGradient aXGradient(static_cast<const XFillGradientItem&>(rObj.GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aXGradient(rObj.GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue());
if ( nColorCount || rObj.GetBrightness() != 0.0 )
{
aXGradient.SetStartColor(
@@ -2183,7 +2183,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC
}
case drawing::FillStyle_HATCH:
{
- XHatch aXHatch(static_cast<const XFillHatchItem&>(rObj.GetMergedItem(XATTR_FILLHATCH)).GetHatchValue());
+ XHatch aXHatch(rObj.GetMergedItem(XATTR_FILLHATCH).GetHatchValue());
if ( nColorCount || rObj.GetBrightness() != 0.0 )
{
aXHatch.SetColor(
@@ -2199,7 +2199,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC
{
if ( nColorCount || rObj.GetBrightness() != 0.0 )
{
- Bitmap aBitmap(static_cast<const XFillBitmapItem&>(rObj.GetMergedItem(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
+ Bitmap aBitmap(rObj.GetMergedItem(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
aBitmap.Adjust(
static_cast< short > ( GetLuminanceChange(
@@ -2251,8 +2251,8 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
for(SdrPathObj* pObj : vObjectList)
{
- const drawing::LineStyle eLineStyle =static_cast<const XLineStyleItem&>(pObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
- const drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(pObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue();
+ const drawing::LineStyle eLineStyle = pObj->GetMergedItem(XATTR_LINESTYLE).GetValue();
+ const drawing::FillStyle eFillStyle = pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue();
// #i40600# if bLineGeometryNeededOnly is set, linestyle does not matter
if( !bLineGeometryNeededOnly && ( drawing::LineStyle_NONE == eLineStyle ) && ( drawing::FillStyle_NONE == eFillStyle ) )
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 9a048049c370..bbc9ad4f7320 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -57,7 +57,6 @@
#include <svx/xlntrit.hxx>
#include <svx/xfltrit.hxx>
-#define ITEMVALUE(ItemSet,Id,Cast) (static_cast<const Cast&>((ItemSet).Get(Id))).GetValue()
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -331,7 +330,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
drawing::ShadeMode eShadeMode( GetShadeMode( rGeometryItem, drawing::ShadeMode_FLAT ) );
bool bUseExtrusionColor = GetBool( rGeometryItem, "Color", false );
- drawing::FillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) );
+ drawing::FillStyle eFillStyle( aSet.Get(XATTR_FILLSTYLE).GetValue() );
pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem( 0 ) );
aSet.Put( makeSvx3DPercentDiagonalItem( 0 ) );
aSet.Put( Svx3DTextureModeItem( 1 ) );
@@ -371,8 +370,8 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
while( aIter.IsMore() )
{
const SdrObject* pNext = aIter.Next();
- bool bIsPlaceholderObject = (static_cast<const XFillStyleItem&>(pNext->GetMergedItem( XATTR_FILLSTYLE )).GetValue() == drawing::FillStyle_NONE )
- && (static_cast<const XLineStyleItem&>(pNext->GetMergedItem( XATTR_LINESTYLE )).GetValue() == drawing::LineStyle_NONE );
+ bool bIsPlaceholderObject = (pNext->GetMergedItem( XATTR_FILLSTYLE ).GetValue() == drawing::FillStyle_NONE )
+ && (pNext->GetMergedItem( XATTR_LINESTYLE ).GetValue() == drawing::LineStyle_NONE );
basegfx::B2DPolyPolygon aPolyPoly;
SfxItemSet aLocalSet(aSet);
drawing::FillStyle aLocalFillStyle(eFillStyle);
@@ -388,7 +387,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
// invisible (all this 'hidden' logic should be migrated to primitives).
if(!bMultipleSubObjects)
{
- const drawing::FillStyle eStyle(static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue());
+ const drawing::FillStyle eStyle(rSet.Get(XATTR_FILLSTYLE).GetValue());
if(drawing::FillStyle_NONE == eStyle)
{
@@ -435,9 +434,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
// switch from line to fill, copy line attr to fill attr (color, transparence)
aLocalSet.Put(XLineWidthItem(0));
aLocalSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
- aLocalSet.Put(XFillColorItem(OUString(), static_cast<const XLineColorItem&>(aLocalSet.Get(XATTR_LINECOLOR)).GetColorValue()));
+ aLocalSet.Put(XFillColorItem(OUString(), aLocalSet.Get(XATTR_LINECOLOR).GetColorValue()));
aLocalSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
- aLocalSet.Put(XFillTransparenceItem(static_cast<const XLineTransparenceItem&>(aLocalSet.Get(XATTR_LINETRANSPARENCE)).GetValue()));
+ aLocalSet.Put(XFillTransparenceItem(aLocalSet.Get(XATTR_LINETRANSPARENCE).GetValue()));
aLocalFillStyle = drawing::FillStyle_SOLID;
}
}
@@ -486,10 +485,10 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
else if ( bUseTwoFillStyles )
{
BitmapEx aFillBmp;
- bool bFillBmpTile = static_cast<const XFillBmpTileItem&>(p3DObj->GetMergedItem( XATTR_FILLBMP_TILE )).GetValue();
+ bool bFillBmpTile = p3DObj->GetMergedItem( XATTR_FILLBMP_TILE ).GetValue();
if ( bFillBmpTile )
{
- const XFillBitmapItem& rBmpItm = static_cast<const XFillBitmapItem&>(p3DObj->GetMergedItem(XATTR_FILLBITMAP));
+ const XFillBitmapItem& rBmpItm = p3DObj->GetMergedItem(XATTR_FILLBITMAP);
aFillBmp = rBmpItm.GetGraphicObject().GetGraphic().GetBitmapEx();
// #i122777# old adaption of FillStyle bitmap size to 5-times the original size; this is not needed
@@ -511,7 +510,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
{
if ( aSnapRect != aBoundRect && aSnapRect.GetWidth() > 0 && aSnapRect.GetHeight() > 0)
{
- const XFillBitmapItem& rBmpItm = static_cast<const XFillBitmapItem&>(p3DObj->GetMergedItem(XATTR_FILLBITMAP));
+ const XFillBitmapItem& rBmpItm = p3DObj->GetMergedItem(XATTR_FILLBITMAP);
aFillBmp = rBmpItm.GetGraphicObject().GetGraphic().GetBitmapEx();
Size aBmpSize( aFillBmp.GetSizePixel() );
double fXScale = (double)aBoundRect.GetWidth() / (double)aSnapRect.GetWidth();
@@ -531,7 +530,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
p3DObj->NbcSetLayer( pShape2d->GetLayer() );
p3DObj->SetMergedItemSet( aLocalSet );
if ( bUseExtrusionColor )
- p3DObj->SetMergedItem( XFillColorItem( "", static_cast<const XSecondaryFillColorItem&>(pCustomShape->GetMergedItem( XATTR_SECONDARYFILLCOLOR )).GetColorValue() ) );
+ p3DObj->SetMergedItem( XFillColorItem( "", pCustomShape->GetMergedItem( XATTR_SECONDARYFILLCOLOR ).GetColorValue() ) );
p3DObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) );
p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) );
@@ -554,7 +553,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
}
else if ( aLocalFillStyle == drawing::FillStyle_NONE )
{
- const XLineColorItem& rLineColor = static_cast<const XLineColorItem&>(p3DObj->GetMergedItem( XATTR_LINECOLOR ));
+ const XLineColorItem& rLineColor = p3DObj->GetMergedItem( XATTR_LINECOLOR );
p3DObj->SetMergedItem( XFillColorItem( "", rLineColor.GetColorValue() ) );
p3DObj->SetMergedItem( makeSvx3DDoubleSidedItem( true ) );
p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) );
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 9a4834847dbe..3a8289d23538 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -567,7 +567,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(XATTR_FILLSTYLE);
if(eState != SfxItemState::DONTCARE)
{
- drawing::FillStyle eXFS = (drawing::FillStyle)static_cast<const XFillStyleItem&>(rAttrs.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eXFS = (drawing::FillStyle)rAttrs.Get(XATTR_FILLSTYLE).GetValue();
bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH);
}
@@ -1492,7 +1492,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(XATTR_FILLCOLOR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const XFillColorItem&>(rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue();
+ aColor = rAttrs.Get(XATTR_FILLCOLOR).GetColorValue();
SvxColorListBox* pLb = m_pLbMatColor;
if( aColor != pLb->GetSelectEntryColor() )
{
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 8c63c38f2923..2403e9b4431b 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -68,8 +68,6 @@
using namespace com::sun::star;
-#define ITEMVALUE(ItemSet,Id,Cast) (static_cast<const Cast&>((ItemSet).Get(Id))).GetValue()
-
// Migrate Marking
@@ -677,9 +675,9 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj)
if(dynamic_cast<const SdrPathObj*>( pObj) != nullptr)
{
const SfxItemSet& rSet = pObj->GetMergedItemSet();
- sal_Int32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
- drawing::LineStyle eLineStyle = (drawing::LineStyle)static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue();
- drawing::FillStyle eFillStyle = ITEMVALUE(rSet, XATTR_FILLSTYLE, XFillStyleItem);
+ sal_Int32 nLineWidth = rSet.Get(XATTR_LINEWIDTH).GetValue();
+ drawing::LineStyle eLineStyle = (drawing::LineStyle)rSet.Get(XATTR_LINESTYLE).GetValue();
+ drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
if(static_cast<SdrPathObj*>(pObj)->IsClosed()
&& eLineStyle == drawing::LineStyle_SOLID
@@ -710,7 +708,7 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo
// Get Itemset of the original object
SfxItemSet aSet(pObj->GetMergedItemSet());
- drawing::FillStyle eFillStyle = ITEMVALUE(aSet, XATTR_FILLSTYLE, XFillStyleItem);
+ drawing::FillStyle eFillStyle = aSet.Get(XATTR_FILLSTYLE).GetValue();
// line style turned off
aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
@@ -730,7 +728,7 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo
// Fill color must be the color line, because the object was
// previously just a line
- Color aColorLine = static_cast<const XLineColorItem&>(aSet.Get(XATTR_LINECOLOR)).GetColorValue();
+ Color aColorLine = aSet.Get(XATTR_LINECOLOR).GetColorValue();
aSet.Put(XFillColorItem(OUString(), aColorLine));
}
@@ -1054,8 +1052,8 @@ void E3dView::DoDepthArrange(E3dScene const * pScene, double fDepth)
const basegfx::B2DPolyPolygon aExtrudePoly(
basegfx::utils::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon()));
const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet();
- const drawing::FillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
- const Color aLocalColor = static_cast<const XFillColorItem&>(rLocalSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ const drawing::FillStyle eLocalFillStyle = rLocalSet.Get(XATTR_FILLSTYLE).GetValue();
+ const Color aLocalColor = rLocalSet.Get(XATTR_FILLCOLOR).GetColorValue();
// sort in ExtrudeObj
if(pLayer)
@@ -1080,13 +1078,13 @@ void E3dView::DoDepthArrange(E3dScene const * pScene, double fDepth)
// second criteria: is another fillstyle or color used?
const SfxItemSet& rCompareSet = pAct->mpObj->GetMergedItemSet();
- drawing::FillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem);
+ drawing::FillStyle eCompareFillStyle = rCompareSet.Get(XATTR_FILLSTYLE).GetValue();
if(eLocalFillStyle == eCompareFillStyle)
{
if(eLocalFillStyle == drawing::FillStyle_SOLID)
{
- Color aCompareColor = static_cast<const XFillColorItem&>(rCompareSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ Color aCompareColor = rCompareSet.Get(XATTR_FILLCOLOR).GetColorValue();
if(aCompareColor == aLocalColor)
{
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 4118b3cdad90..110aadbd0cdd 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -86,7 +86,7 @@ namespace
}
else
{
- nRetval = (sal_uInt8)((static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE)).GetValue() * 255) / 100);
+ nRetval = (sal_uInt8)((rSet.Get(XATTR_LINETRANSPARENCE).GetValue() * 255) / 100);
}
return nRetval;
@@ -103,13 +103,13 @@ namespace
}
else
{
- const Color aLineColor(static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR)).GetColorValue());
+ const Color aLineColor(rSet.Get(XATTR_LINECOLOR).GetColorValue());
aColorAttribute = aLineColor.getBColor();
}
- const sal_uInt32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
- const css::drawing::LineJoint eLineJoint = static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT)).GetValue();
- const css::drawing::LineCap eLineCap = static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP)).GetValue();
+ const sal_uInt32 nLineWidth = rSet.Get(XATTR_LINEWIDTH).GetValue();
+ const css::drawing::LineJoint eLineJoint = rSet.Get(XATTR_LINEJOINT).GetValue();
+ const css::drawing::LineCap eLineCap = rSet.Get(XATTR_LINECAP).GetValue();
return drawinglayer::attribute::LineAttribute(
aColorAttribute,
@@ -120,17 +120,17 @@ namespace
drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
{
- const css::drawing::LineStyle eLineStyle = static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue();
+ const css::drawing::LineStyle eLineStyle = rSet.Get(XATTR_LINESTYLE).GetValue();
double fFullDotDashLen(0.0);
::std::vector< double > aDotDashArray;
if(css::drawing::LineStyle_DASH == eLineStyle)
{
- const XDash& rDash = static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH)).GetDashValue();
+ const XDash& rDash = rSet.Get(XATTR_LINEDASH).GetDashValue();
if(rDash.GetDots() || rDash.GetDashes())
{
- const sal_uInt32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
+ const sal_uInt32 nLineWidth = rSet.Get(XATTR_LINEWIDTH).GetValue();
fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, (double)nLineWidth);
}
}
@@ -167,19 +167,19 @@ namespace drawinglayer
bool mbFormTextOutline : 1; // show contour of objects
explicit ImpSdrFormTextAttribute(const SfxItemSet& rSet)
- : mnFormTextDistance(static_cast<const XFormTextDistanceItem&>(rSet.Get(XATTR_FORMTXTDISTANCE)).GetValue()),
- mnFormTextStart(static_cast<const XFormTextStartItem&>(rSet.Get(XATTR_FORMTXTSTART)).GetValue()),
- mnFormTextShdwXVal(static_cast<const XFormTextShadowXValItem&>(rSet.Get(XATTR_FORMTXTSHDWXVAL)).GetValue()),
- mnFormTextShdwYVal(static_cast<const XFormTextShadowYValItem&>(rSet.Get(XATTR_FORMTXTSHDWYVAL)).GetValue()),
- mnFormTextShdwTransp(static_cast<const XFormTextShadowTranspItem&>(rSet.Get(XATTR_FORMTXTSHDWTRANSP)).GetValue()),
- meFormTextStyle(static_cast<const XFormTextStyleItem&>(rSet.Get(XATTR_FORMTXTSTYLE)).GetValue()),
- meFormTextAdjust(static_cast<const XFormTextAdjustItem&>(rSet.Get(XATTR_FORMTXTADJUST)).GetValue()),
- meFormTextShadow(static_cast<const XFormTextShadowItem&>(rSet.Get(XATTR_FORMTXTSHADOW)).GetValue()),
- maFormTextShdwColor(static_cast<const XFormTextShadowColorItem&>(rSet.Get(XATTR_FORMTXTSHDWCOLOR)).GetColorValue()),
+ : mnFormTextDistance(rSet.Get(XATTR_FORMTXTDISTANCE).GetValue()),
+ mnFormTextStart(rSet.Get(XATTR_FORMTXTSTART).GetValue()),
+ mnFormTextShdwXVal(rSet.Get(XATTR_FORMTXTSHDWXVAL).GetValue()),
+ mnFormTextShdwYVal(rSet.Get(XATTR_FORMTXTSHDWYVAL).GetValue()),
+ mnFormTextShdwTransp(rSet.Get(XATTR_FORMTXTSHDWTRANSP).GetValue()),
+ meFormTextStyle(rSet.Get(XATTR_FORMTXTSTYLE).GetValue()),
+ meFormTextAdjust(rSet.Get(XATTR_FORMTXTADJUST).GetValue()),
+ meFormTextShadow(rSet.Get(XATTR_FORMTXTSHADOW).GetValue()),
+ maFormTextShdwColor(rSet.Get(XATTR_FORMTXTSHDWCOLOR).GetColorValue()),
maOutline(),
maShadowOutline(),
- mbFormTextMirror(static_cast<const XFormTextMirrorItem&>(rSet.Get(XATTR_FORMTXTMIRROR)).GetValue()),
- mbFormTextOutline(static_cast<const XFormTextOutlineItem&>(rSet.Get(XATTR_FORMTXTOUTLINE)).GetValue())
+ mbFormTextMirror(rSet.Get(XATTR_FORMTXTMIRROR).GetValue()),
+ mbFormTextOutline(rSet.Get(XATTR_FORMTXTOUTLINE).GetValue())
{
if(getFormTextOutline())
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index e9345ffcb808..413d4abd0785 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -111,7 +111,7 @@ namespace sdr
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 Color aShadowColor(rShadColItem.GetColorValue());
- const drawing::FillStyle eShadowStyle = static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE)).GetValue();
+ const drawing::FillStyle eShadowStyle = rItemSet.Get(XATTR_FILLSTYLE).GetValue();
// Create own ItemSet and modify as needed
// Always hide lines for special calc shadow
@@ -121,7 +121,7 @@ namespace sdr
if(drawing::FillStyle_HATCH == eShadowStyle)
{
// #41666# Hatch color is set hard to shadow color
- XHatch aHatch = static_cast<const XFillHatchItem&>(rItemSet.Get(XATTR_FILLHATCH)).GetHatchValue();
+ XHatch aHatch = rItemSet.Get(XATTR_FILLHATCH).GetHatchValue();
aHatch.SetColor(aShadowColor);
aSet.Put(XFillHatchItem(OUString(),aHatch));
}
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index e68d05fb673e..799b525493df 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -47,6 +47,11 @@
#include <svx/sdsxyitm.hxx>
#include <svx/sdshcitm.hxx>
#include <svx/sdshtitm.hxx>
+#include <svx/xflbmsxy.hxx>
+#include <svx/xflbtoxy.hxx>
+#include <svx/xflboxy.hxx>
+#include <svx/xflbmtit.hxx>
+#include <svx/xflbstit.hxx>
#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
#include <basegfx/polygon/b2dlinegeometry.hxx>
#include <svx/svdotext.hxx>
@@ -64,6 +69,7 @@
#include <svx/sdtfchim.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdmodel.hxx>
+#include <svx/xflbmsli.hxx>
#include <editeng/editstat.hxx>
#include <drawinglayer/attribute/fillhatchattribute.hxx>
#include <drawinglayer/attribute/fillgradientattribute.hxx>
@@ -215,11 +221,11 @@ namespace drawinglayer
{
attribute::SdrLineAttribute createNewSdrLineAttribute(const SfxItemSet& rSet)
{
- const css::drawing::LineStyle eStyle(static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue());
+ const css::drawing::LineStyle eStyle(rSet.Get(XATTR_LINESTYLE).GetValue());
if(drawing::LineStyle_NONE != eStyle)
{
- sal_uInt16 nTransparence(static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE)).GetValue());
+ sal_uInt16 nTransparence(rSet.Get(XATTR_LINETRANSPARENCE).GetValue());
if(nTransparence > 100)
{
@@ -228,16 +234,16 @@ namespace drawinglayer
if(100 != nTransparence)
{
- const sal_uInt32 nWidth(static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue());
- const Color aColor(static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR)).GetColorValue());
- const css::drawing::LineJoint eJoint(static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT)).GetValue());
- const css::drawing::LineCap eCap(static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP)).GetValue());
+ const sal_uInt32 nWidth(rSet.Get(XATTR_LINEWIDTH).GetValue());
+ const Color aColor(rSet.Get(XATTR_LINECOLOR).GetColorValue());
+ const css::drawing::LineJoint eJoint(rSet.Get(XATTR_LINEJOINT).GetValue());
+ const css::drawing::LineCap eCap(rSet.Get(XATTR_LINECAP).GetValue());
::std::vector< double > aDotDashArray;
double fFullDotDashLen(0.0);
if(drawing::LineStyle_DASH == eStyle)
{
- const XDash& rDash = static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH)).GetDashValue();
+ const XDash& rDash = rSet.Get(XATTR_LINEDASH).GetDashValue();
if(rDash.GetDots() || rDash.GetDashes())
{
@@ -263,8 +269,8 @@ namespace drawinglayer
const SfxItemSet& rSet,
double fWidth)
{
- const sal_Int32 nTempStartWidth(static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue());
- const sal_Int32 nTempEndWidth(static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue());
+ const sal_Int32 nTempStartWidth(rSet.Get(XATTR_LINESTARTWIDTH).GetValue());
+ const sal_Int32 nTempEndWidth(rSet.Get(XATTR_LINEENDWIDTH).GetValue());
basegfx::B2DPolyPolygon aStartPolyPolygon;
basegfx::B2DPolyPolygon aEndPolyPolygon;
double fStartWidth(0.0);
@@ -287,12 +293,12 @@ namespace drawinglayer
if(0.0 != fStartWidth)
{
- aStartPolyPolygon = basegfx::B2DPolyPolygon(static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue());
+ aStartPolyPolygon = basegfx::B2DPolyPolygon(rSet.Get(XATTR_LINESTART).GetLineStartValue());
if(aStartPolyPolygon.count() && aStartPolyPolygon.getB2DPolygon(0).count())
{
bStartActive = true;
- bStartCentered = static_cast<const XLineStartCenterItem&>(rSet.Get(XATTR_LINESTARTCENTER)).GetValue();
+ bStartCentered = rSet.Get(XATTR_LINESTARTCENTER).GetValue();
}
}
}
@@ -310,12 +316,12 @@ namespace drawinglayer
if(0.0 != fEndWidth)
{
- aEndPolyPolygon = basegfx::B2DPolyPolygon(static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue());
+ aEndPolyPolygon = basegfx::B2DPolyPolygon(rSet.Get(XATTR_LINEEND).GetLineEndValue());
if(aEndPolyPolygon.count() && aEndPolyPolygon.getB2DPolygon(0).count())
{
bEndActive = true;
- bEndCentered = static_cast<const XLineEndCenterItem&>(rSet.Get(XATTR_LINEENDCENTER)).GetValue();
+ bEndCentered = rSet.Get(XATTR_LINEENDCENTER).GetValue();
}
}
}
@@ -345,7 +351,7 @@ namespace drawinglayer
if(nTransparence)
{
- sal_uInt16 nFillTransparence(static_cast<const XFillTransparenceItem&>(rSet.Get(XATTR_FILLTRANSPARENCE)).GetValue());
+ sal_uInt16 nFillTransparence(rSet.Get(XATTR_FILLTRANSPARENCE).GetValue());
if(nFillTransparence > 100)
{
@@ -378,9 +384,9 @@ namespace drawinglayer
attribute::SdrFillAttribute createNewSdrFillAttribute(const SfxItemSet& rSet)
{
- const drawing::FillStyle eStyle(static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue());
+ const drawing::FillStyle eStyle(rSet.Get(XATTR_FILLSTYLE).GetValue());
- sal_uInt16 nTransparence(static_cast<const XFillTransparenceItem&>(rSet.Get(XATTR_FILLTRANSPARENCE)).GetValue());
+ sal_uInt16 nTransparence(rSet.Get(XATTR_FILLTRANSPARENCE).GetValue());
if(nTransparence > 100)
{
@@ -411,7 +417,7 @@ namespace drawinglayer
if(100 != nTransparence)
{
- const Color aColor(static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)).GetColorValue());
+ const Color aColor(rSet.Get(XATTR_FILLCOLOR).GetColorValue());
attribute::FillGradientAttribute aGradient;
attribute::FillHatchAttribute aHatch;
attribute::SdrFillGraphicAttribute aFillGraphic;
@@ -425,7 +431,7 @@ namespace drawinglayer
}
case drawing::FillStyle_GRADIENT :
{
- XGradient aXGradient(static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aXGradient(rSet.Get(XATTR_FILLGRADIENT).GetGradientValue());
const Color aStartColor(aXGradient.GetStartColor());
const sal_uInt16 nStartIntens(aXGradient.GetStartIntens());
@@ -455,13 +461,13 @@ namespace drawinglayer
(double)aXGradient.GetAngle() * F_PI1800,
aStart,
aEnd,
- static_cast<const XGradientStepCountItem&>(rSet.Get(XATTR_GRADIENTSTEPCOUNT)).GetValue());
+ rSet.Get(XATTR_GRADIENTSTEPCOUNT).GetValue());
break;
}
case drawing::FillStyle_HATCH :
{
- const XHatch& rHatch(static_cast<const XFillHatchItem&>(rSet.Get(XATTR_FILLHATCH)).GetHatchValue());
+ const XHatch& rHatch(rSet.Get(XATTR_FILLHATCH).GetHatchValue());
const Color aColorB(rHatch.GetColor());
aHatch = attribute::FillHatchAttribute(
@@ -470,7 +476,7 @@ namespace drawinglayer
(double)rHatch.GetAngle() * F_PI1800,
aColorB.getBColor(),
3, // same default as VCL, a minimum of three discrete units (pixels) offset
- static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)).GetValue());
+ rSet.Get(XATTR_FILLBACKGROUND).GetValue());
break;
}
@@ -564,7 +570,7 @@ namespace drawinglayer
return attribute::SdrTextAttribute(
rText,
aOutlinerParaObject,
- static_cast<const XFormTextStyleItem&>(rSet.Get(XATTR_FORMTXTSTYLE)).GetValue(),
+ rSet.Get(XATTR_FORMTXTSTYLE).GetValue(),
pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),
pRight ? *pRight : rTextObj.GetTextRightDistance(),
@@ -574,7 +580,7 @@ namespace drawinglayer
static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
rTextObj.IsFitToSize(),
rTextObj.IsAutoFit(),
- static_cast<const XFormTextHideFormItem&>(rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
+ rSet.Get(XATTR_FORMTXTHIDEFORM).GetValue(),
SdrTextAniKind::Blink == eAniKind,
SdrTextAniKind::Scroll == eAniKind || SdrTextAniKind::Alternate == eAniKind || SdrTextAniKind::Slide == eAniKind,
bInEditMode,
@@ -626,7 +632,7 @@ namespace drawinglayer
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(const SfxItemSet& rSet)
{
- Graphic aGraphic(static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic());
+ Graphic aGraphic(rSet.Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic());
if(!(GraphicType::Bitmap == aGraphic.GetType() || GraphicType::GdiMetafile == aGraphic.GetType()))
{
@@ -685,14 +691,14 @@ namespace drawinglayer
// get size
const basegfx::B2DVector aSize(
- (double) static_cast<const SfxMetricItem&>(rSet.Get(XATTR_FILLBMP_SIZEX)).GetValue(),
- (double) static_cast<const SfxMetricItem&>(rSet.Get(XATTR_FILLBMP_SIZEY)).GetValue());
+ (double) rSet.Get(XATTR_FILLBMP_SIZEX).GetValue(),
+ (double) rSet.Get(XATTR_FILLBMP_SIZEY).GetValue());
const basegfx::B2DVector aOffset(
- (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_TILEOFFSETX)).GetValue(),
- (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_TILEOFFSETY)).GetValue());
+ (double) rSet.Get(XATTR_FILLBMP_TILEOFFSETX).GetValue(),
+ (double) rSet.Get(XATTR_FILLBMP_TILEOFFSETY).GetValue());
const basegfx::B2DVector aOffsetPosition(
- (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_POSOFFSETX)).GetValue(),
- (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_POSOFFSETY)).GetValue());
+ (double) rSet.Get(XATTR_FILLBMP_POSOFFSETX).GetValue(),
+ (double) rSet.Get(XATTR_FILLBMP_POSOFFSETY).GetValue());
return attribute::SdrFillGraphicAttribute(
aGraphic,
@@ -701,9 +707,9 @@ namespace drawinglayer
aOffset,
aOffsetPosition,
RectPointToB2DVector(rSet.GetItem<XFillBmpPosItem>(XATTR_FILLBMP_POS)->GetValue()),
- static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_TILE)).GetValue(),
- static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_STRETCH)).GetValue(),
- static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_SIZELOG)).GetValue());
+ rSet.Get(XATTR_FILLBMP_TILE).GetValue(),
+ rSet.Get(XATTR_FILLBMP_STRETCH).GetValue(),
+ rSet.Get(XATTR_FILLBMP_SIZELOG).GetValue());
}
attribute::SdrShadowTextAttribute createNewSdrShadowTextAttribute(
diff --git a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx
index c565f983e8c6..5a60993b9649 100644
--- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx
+++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx
@@ -115,7 +115,7 @@ namespace drawinglayer
}
// get object color
- const ::basegfx::BColor aObjectColor(static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)).GetColorValue().getBColor());
+ const ::basegfx::BColor aObjectColor(rSet.Get(XATTR_FILLCOLOR).GetColorValue().getBColor());
// get specular color
const ::basegfx::BColor aSpecular(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue().getBColor());
diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx
index e419ea44b50f..506a342cc9ca 100644
--- a/svx/source/sdr/properties/properties.cxx
+++ b/svx/source/sdr/properties/properties.cxx
@@ -162,7 +162,7 @@ namespace sdr
const bool bFillHatch = rItemSet.GetItemState(XATTR_FILLHATCH, false) == SfxItemState::SET;
if( bFillBitmap || bFillGradient || bFillHatch )
{
- const XFillStyleItem* pFillStyleItem = dynamic_cast< const XFillStyleItem* >( rItemSet.GetItem(XATTR_FILLSTYLE) );
+ const XFillStyleItem* pFillStyleItem = rItemSet.GetItem(XATTR_FILLSTYLE);
if( pFillStyleItem )
{
if( bFillBitmap && (pFillStyleItem->GetValue() != drawing::FillStyle_BITMAP) )
diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
index a25cb3570c70..eba958d7ce80 100644
--- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx
+++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
@@ -87,7 +87,7 @@ namespace sdr
const SdrPage* pCorrectPage = &GetOwnerPage();
const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties();
- if(drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE == pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE).GetValue())
{
pCorrectPage = &GetUsedPage();
pCorrectProperties = &pCorrectPage->getSdrPageProperties();
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index bb9b66ad7beb..2570ee7bcc82 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -738,8 +738,8 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
if(bUseSolidDragging)
{
const SfxItemSet& rSet = pAktCreate->GetMergedItemSet();
- const drawing::FillStyle eFill(static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue());
- const drawing::LineStyle eLine(static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue());
+ const drawing::FillStyle eFill(rSet.Get(XATTR_FILLSTYLE).GetValue());
+ const drawing::LineStyle eLine(rSet.Get(XATTR_LINESTYLE).GetValue());
if(drawing::LineStyle_NONE == eLine && drawing::FillStyle_NONE == eFill)
{
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 48466c060487..be0d4d140eec 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -518,7 +518,7 @@ void SdrEditView::CheckPossibilities()
if(SfxItemState::DONTCARE != eState)
{
// If state is not DONTCARE, test the item
- drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
if(eFillStyle != drawing::FillStyle_GRADIENT)
{
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index fa3f7e43b2eb..cf04b96e9010 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1032,7 +1032,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(bLineWidthChange)
{
- nNewLineWidth = static_cast<const XLineWidthItem&>(aAttr.Get(XATTR_LINEWIDTH)).GetValue();
+ nNewLineWidth = aAttr.Get(XATTR_LINEWIDTH).GetValue();
}
for (size_t nm=0; nm<nMarkCount; ++nm)
@@ -1081,7 +1081,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(bLineWidthChange)
{
- nOldLineWidth = static_cast<const XLineWidthItem&>(pObj->GetMergedItem(XATTR_LINEWIDTH)).GetValue();
+ nOldLineWidth = pObj->GetMergedItem(XATTR_LINEWIDTH).GetValue();
}
// set attributes at object
@@ -1095,7 +1095,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
{
if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH))
{
- const sal_Int32 nValAct(static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue());
+ const sal_Int32 nValAct(rSet.Get(XATTR_LINESTARTWIDTH).GetValue());
const sal_Int32 nValNewStart(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
pObj->SetMergedItem(XLineStartWidthItem(nValNewStart));
@@ -1103,7 +1103,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH))
{
- const sal_Int32 nValAct(static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue());
+ const sal_Int32 nValAct(rSet.Get(XATTR_LINEENDWIDTH).GetValue());
const sal_Int32 nValNewEnd(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
pObj->SetMergedItem(XLineEndWidthItem(nValNewEnd));
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 64a26a2553db..25a8eeb6c50e 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1361,8 +1361,8 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
ImpCopyAttributes(pAttrObj, pPath);
// If LineStyle of pAttrObj is drawing::LineStyle_NONE force to drawing::LineStyle_SOLID to make visible.
- const drawing::LineStyle eLineStyle = static_cast<const XLineStyleItem&>(pAttrObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
- const drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(pAttrObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue();
+ const drawing::LineStyle eLineStyle = pAttrObj->GetMergedItem(XATTR_LINESTYLE).GetValue();
+ const drawing::FillStyle eFillStyle = pAttrObj->GetMergedItem(XATTR_FILLSTYLE).GetValue();
// Take fill style/closed state of pAttrObj in account when deciding to change the line style
bool bIsClosedPathObj(dynamic_cast<const SdrPathObj*>( pAttrObj) != nullptr && static_cast<const SdrPathObj*>(pAttrObj)->IsClosed());
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 9ad0fb266378..807e31fc6da9 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -246,28 +246,28 @@ bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
{
- drawing::FillStyle eFill=static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eFill=rSet.Get(XATTR_FILLSTYLE).GetValue();
bool bRetval = false;
switch(eFill)
{
case drawing::FillStyle_SOLID:
{
- rCol = static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ rCol = rSet.Get(XATTR_FILLCOLOR).GetColorValue();
bRetval = true;
break;
}
case drawing::FillStyle_HATCH:
{
- Color aCol1(static_cast<const XFillHatchItem&>(rSet.Get(XATTR_FILLHATCH)).GetHatchValue().GetColor());
+ Color aCol1(rSet.Get(XATTR_FILLHATCH).GetHatchValue().GetColor());
Color aCol2(COL_WHITE);
// when hatched background is activated, use object fill color as hatch color
- bool bFillHatchBackground = static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)).GetValue();
+ bool bFillHatchBackground = rSet.Get(XATTR_FILLBACKGROUND).GetValue();
if(bFillHatchBackground)
{
- aCol2 = static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ aCol2 = rSet.Get(XATTR_FILLCOLOR).GetColorValue();
}
const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor()));
@@ -277,7 +277,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
break;
}
case drawing::FillStyle_GRADIENT: {
- const XGradient& rGrad=static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue();
+ const XGradient& rGrad=rSet.Get(XATTR_FILLGRADIENT).GetGradientValue();
Color aCol1(rGrad.GetStartColor());
Color aCol2(rGrad.GetEndColor());
const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor()));
@@ -288,7 +288,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
}
case drawing::FillStyle_BITMAP:
{
- Bitmap aBitmap(static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
+ Bitmap aBitmap(rSet.Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
const Size aSize(aBitmap.GetSizePixel());
const sal_uInt32 nWidth = aSize.Width();
const sal_uInt32 nHeight = aSize.Height();
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 20333046bb89..59c669382b37 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1348,9 +1348,9 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, bool bSetItemOnObject, bool
aGradTransVector.aCol2 = pColHdl2->GetColor();
if(IsGradient())
- aOldGradTransGradient.aGradient = static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue();
+ aOldGradTransGradient.aGradient = rSet.Get(XATTR_FILLGRADIENT).GetGradientValue();
else
- aOldGradTransGradient.aGradient = static_cast<const XFillFloatTransparenceItem&>(rSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetGradientValue();
+ aOldGradTransGradient.aGradient = rSet.Get(XATTR_FILLFLOATTRANSPARENCE).GetGradientValue();
// transform vector data to gradient
GradTransformer::VecToGrad(aGradTransVector, aGradTransGradient, aOldGradTransGradient, _pObj, bMoveSingleHandle, bMoveFirstHandle);
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 072b0ca84478..d1d5544c8994 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1079,8 +1079,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
if(SfxItemState::SET != rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, false))
{
// add this item, it's not yet there
- XFillFloatTransparenceItem aNewItem(
- static_cast<const XFillFloatTransparenceItem&>(rSet.Get(XATTR_FILLFLOATTRANSPARENCE)));
+ XFillFloatTransparenceItem aNewItem(rSet.Get(XATTR_FILLFLOATTRANSPARENCE));
XGradient aGrad = aNewItem.GetGradientValue();
aNewItem.SetEnabled(true);
@@ -1106,7 +1105,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
GradTransVector aGradTransVector;
GradTransGradient aGradTransGradient;
- aGradTransGradient.aGradient = static_cast<const XFillFloatTransparenceItem&>(rSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetGradientValue();
+ aGradTransGradient.aGradient = rSet.Get(XATTR_FILLFLOATTRANSPARENCE).GetGradientValue();
GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj);
// build handles
@@ -1138,7 +1137,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
{
SdrObject* pObj = GetMarkedObjectByIndex(0);
const SfxItemSet& rSet = pObj->GetMergedItemSet();
- drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eFillStyle = rSet.Get(XATTR_FILLSTYLE).GetValue();
if(eFillStyle == drawing::FillStyle_GRADIENT)
{
@@ -1148,7 +1147,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
GradTransGradient aGradTransGradient;
Size aHdlSize(15, 15);
- aGradTransGradient.aGradient = static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue();
+ aGradTransGradient.aGradient = rSet.Get(XATTR_FILLGRADIENT).GetGradientValue();
GradTransformer::GradToVec(aGradTransGradient, aGradTransVector, pObj);
// build handles
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index c16be0657ea4..a1c62229b792 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -230,11 +230,11 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
while(aIterator.IsMore())
{
SdrObject* pObj = aIterator.Next();
- drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(pObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eFillStyle = pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue();
if(!bLineUsed)
{
- drawing::LineStyle eLineStyle = static_cast<const XLineStyleItem&>(pObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
+ drawing::LineStyle eLineStyle = pObj->GetMergedItem(XATTR_LINESTYLE).GetValue();
if(drawing::LineStyle_NONE != eLineStyle)
{
@@ -301,7 +301,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
// gradient and transparency like shadow
if(bGradientFillUsed)
{
- XGradient aGradient(static_cast<const XFillGradientItem&>(rOriginalSet.Get(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aGradient(rOriginalSet.Get(XATTR_FILLGRADIENT).GetGradientValue());
sal_uInt8 nStartLuminance(aGradient.GetStartColor().GetLuminance());
sal_uInt8 nEndLuminance(aGradient.GetEndColor().GetLuminance());
@@ -334,7 +334,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
// hatch and transparency like shadow
if(bHatchFillUsed)
{
- XHatch aHatch(static_cast<const XFillHatchItem&>(rOriginalSet.Get(XATTR_FILLHATCH)).GetHatchValue());
+ XHatch aHatch(rOriginalSet.Get(XATTR_FILLHATCH).GetHatchValue());
aHatch.SetColor(aShadowColor);
aTempSet.Put(XFillHatchItem(aHatch));
aTempSet.Put(XFillTransparenceItem(nShadowTransparence));
@@ -343,7 +343,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
// bitmap and transparency like shadow
if(bBitmapFillUsed)
{
- GraphicObject aGraphicObject(static_cast<const XFillBitmapItem&>(rOriginalSet.Get(XATTR_FILLBITMAP)).GetGraphicObject());
+ GraphicObject aGraphicObject(rOriginalSet.Get(XATTR_FILLBITMAP).GetGraphicObject());
const BitmapEx aBitmapEx(aGraphicObject.GetGraphic().GetBitmapEx());
Bitmap aBitmap(aBitmapEx.GetBitmap());
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 08e27c156d94..c042d6aa35e1 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -150,12 +150,12 @@ sal_Int32 SdrAttrObj::ImpGetLineWdt() const
bool SdrAttrObj::HasFill() const
{
- return bClosedObj && static_cast<const XFillStyleItem&>(GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE)).GetValue() != drawing::FillStyle_NONE;
+ return bClosedObj && GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE).GetValue() != drawing::FillStyle_NONE;
}
bool SdrAttrObj::HasLine() const
{
- return static_cast<const XLineStyleItem&>(GetProperties().GetObjectItemSet().Get(XATTR_LINESTYLE)).GetValue() != drawing::LineStyle_NONE;
+ return GetProperties().GetObjectItemSet().Get(XATTR_LINESTYLE).GetValue() != drawing::LineStyle_NONE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 020c75655be8..4744dd2c1d9b 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -927,7 +927,7 @@ void SdrObject::SingleObjectPainter(OutputDevice& rOut) const
bool SdrObject::LineGeometryUsageIsNecessary() const
{
- drawing::LineStyle eXLS = (drawing::LineStyle)static_cast<const XLineStyleItem&>(GetMergedItem(XATTR_LINESTYLE)).GetValue();
+ drawing::LineStyle eXLS = (drawing::LineStyle)GetMergedItem(XATTR_LINESTYLE).GetValue();
return (eXLS != drawing::LineStyle_NONE);
}
@@ -2379,7 +2379,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas
if(aMergedLineFillPolyPolygon.count() || (bForceLineDash && aMergedHairlinePolyPolygon.count()))
{
SfxItemSet aSet(pRet->GetMergedItemSet());
- drawing::FillStyle eOldFillStyle = static_cast<const XFillStyleItem&>(aSet.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eOldFillStyle = aSet.Get(XATTR_FILLSTYLE).GetValue();
SdrPathObj* aLinePolygonPart = nullptr;
SdrPathObj* aLineHairlinePart = nullptr;
bool bBuildGroup(false);
@@ -2393,8 +2393,8 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas
// correct item properties
aSet.Put(XLineWidthItem(0));
aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
- Color aColorLine = static_cast<const XLineColorItem&>(aSet.Get(XATTR_LINECOLOR)).GetColorValue();
- sal_uInt16 nTransLine = static_cast<const XLineTransparenceItem&>(aSet.Get(XATTR_LINETRANSPARENCE)).GetValue();
+ Color aColorLine = aSet.Get(XATTR_LINECOLOR).GetColorValue();
+ sal_uInt16 nTransLine = aSet.Get(XATTR_LINETRANSPARENCE).GetValue();
aSet.Put(XFillColorItem(OUString(), aColorLine));
aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
aSet.Put(XFillTransparenceItem(nTransLine));
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 6d93e8b04452..2b03fa71b1ec 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -165,25 +165,25 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const
if(!bNeed)
{
// XPoly is necessary for everything that isn't LineSolid or LineNone
- drawing::LineStyle eLine = static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue();
+ drawing::LineStyle eLine = rSet.Get(XATTR_LINESTYLE).GetValue();
bNeed = eLine != drawing::LineStyle_NONE && eLine != drawing::LineStyle_SOLID;
// XPoly is necessary for thick lines
if(!bNeed && eLine != drawing::LineStyle_NONE)
- bNeed = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue() != 0;
+ bNeed = rSet.Get(XATTR_LINEWIDTH).GetValue() != 0;
// XPoly is necessary for circle arcs with line ends
if(!bNeed && meCircleKind == OBJ_CARC)
{
// start of the line is here if StartPolygon, StartWidth!=0
- bNeed=static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue().count() != 0 &&
- static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue() != 0;
+ bNeed=rSet.Get(XATTR_LINESTART).GetLineStartValue().count() != 0 &&
+ rSet.Get(XATTR_LINESTARTWIDTH).GetValue() != 0;
if(!bNeed)
{
// end of the line is here if EndPolygon, EndWidth!=0
- bNeed = static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue().count() != 0 &&
- static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue() != 0;
+ bNeed = rSet.Get(XATTR_LINEEND).GetLineEndValue().count() != 0 &&
+ rSet.Get(XATTR_LINEENDWIDTH).GetValue() != 0;
}
}
}
@@ -191,7 +191,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const
// XPoly is necessary if Fill !=None and !=Solid
if(!bNeed && meCircleKind != OBJ_CARC)
{
- drawing::FillStyle eFill=static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue();
+ drawing::FillStyle eFill=rSet.Get(XATTR_FILLSTYLE).GetValue();
bNeed = eFill != drawing::FillStyle_NONE && eFill != drawing::FillStyle_SOLID;
}
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 81eee47621f7..7fce613f2aad 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -369,21 +369,21 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
bool bPfeileAussen = false;
const SfxItemSet& rSet = GetObjectItemSet();
- sal_Int32 nLineWdt = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue(); // line width
+ sal_Int32 nLineWdt = rSet.Get(XATTR_LINEWIDTH).GetValue(); // line width
rPol.nLineWdt2 = (nLineWdt + 1) / 2;
- nArrow1Wdt = static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue();
+ nArrow1Wdt = rSet.Get(XATTR_LINESTARTWIDTH).GetValue();
if(nArrow1Wdt < 0)
nArrow1Wdt = -nLineWdt * nArrow1Wdt / 100; // <0 = relative
- nArrow2Wdt = static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue();
+ nArrow2Wdt = rSet.Get(XATTR_LINEENDWIDTH).GetValue();
if(nArrow2Wdt < 0)
nArrow2Wdt = -nLineWdt * nArrow2Wdt / 100; // <0 = relative
- basegfx::B2DPolyPolygon aPol1(static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue());
- basegfx::B2DPolyPolygon aPol2(static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue());
- bArrow1Center = static_cast<const XLineStartCenterItem&>(rSet.Get(XATTR_LINESTARTCENTER)).GetValue();
- bArrow2Center = static_cast<const XLineEndCenterItem&>(rSet.Get(XATTR_LINEENDCENTER)).GetValue();
+ basegfx::B2DPolyPolygon aPol1(rSet.Get(XATTR_LINESTART).GetLineStartValue());
+ basegfx::B2DPolyPolygon aPol2(rSet.Get(XATTR_LINEEND).GetLineEndValue());
+ bArrow1Center = rSet.Get(XATTR_LINESTARTCENTER).GetValue();
+ bArrow2Center = rSet.Get(XATTR_LINEENDCENTER).GetValue();
nArrow1Len = impGetLineStartEndDistance(aPol1, nArrow1Wdt, bArrow1Center) - 1;
nArrow2Len = impGetLineStartEndDistance(aPol2, nArrow2Wdt, bArrow2Center) - 1;
@@ -1166,7 +1166,7 @@ SdrObject* SdrMeasureObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
{
// four lines, middle line with gap, so there are two lines used
// which have one arrow each
- sal_Int32 nEndWidth = static_cast<const XLineEndWidthItem&>(aSet.Get(XATTR_LINEENDWIDTH)).GetValue();
+ sal_Int32 nEndWidth = aSet.Get(XATTR_LINEENDWIDTH).GetValue();
aSet.Put(XLineEndWidthItem(0));
aPolyPoly.clear();
@@ -1196,7 +1196,7 @@ SdrObject* SdrMeasureObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
else if(nCount == 5)
{
// five lines, first two are the outer ones
- sal_Int32 nEndWidth = static_cast<const XLineEndWidthItem&>(aSet.Get(XATTR_LINEENDWIDTH)).GetValue();
+ sal_Int32 nEndWidth = aSet.Get(XATTR_LINEENDWIDTH).GetValue();
aSet.Put(XLineEndWidthItem(0));
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index f6ef59cdddf8..a780086a9dda 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1795,13 +1795,13 @@ long SdrTextObj::GetMaxTextFrameWidth() const
bool SdrTextObj::IsFontwork() const
{
return !bTextFrame // Default is FALSE
- && static_cast<const XFormTextStyleItem&>(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE)).GetValue() != XFormTextStyle::NONE;
+ && GetObjectItemSet().Get(XATTR_FORMTXTSTYLE).GetValue() != XFormTextStyle::NONE;
}
bool SdrTextObj::IsHideContour() const
{
return !bTextFrame // Default is: no, don't HideContour; HideContour not together with TextFrames
- && static_cast<const XFormTextHideFormItem&>(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM)).GetValue();
+ && GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM).GetValue();
}
bool SdrTextObj::IsContourTextFrame() const
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 97d76f6075ea..53a202e8c8be 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -888,14 +888,14 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
Color aOriginalBackColor(rOutliner.GetBackgroundColor());
const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet();
- if (drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+ if (drawing::FillStyle_NONE == pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
{
SdrPage *pOwnerPage = GetPage();
if (pOwnerPage)
{
pBackgroundFillSet = &pOwnerPage->getSdrPageProperties().GetItemSet();
- if (drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+ if (drawing::FillStyle_NONE == pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
{
if (!pOwnerPage->IsMasterPage() && pOwnerPage->TRG_HasMasterPage())
{
@@ -905,7 +905,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
}
}
- if (drawing::FillStyle_NONE != static_cast<const XFillStyleItem&>(pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue())
+ if (drawing::FillStyle_NONE != pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
{
Color aColor(rOutliner.GetBackgroundColor());
GetDraftFillColor(*pBackgroundFillSet, aColor);
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 30b6c306348b..eb6a7a972ca0 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1705,7 +1705,7 @@ Color SdrPage::GetPageBackgroundColor( SdrPageView const * pView, bool bScreenDi
if(!IsMasterPage() && TRG_HasMasterPage())
{
- if(drawing::FillStyle_NONE == static_cast<const XFillStyleItem&>(pBackgroundFill->Get(XATTR_FILLSTYLE)).GetValue())
+ if(drawing::FillStyle_NONE == pBackgroundFill->Get(XATTR_FILLSTYLE).GetValue())
{
pBackgroundFill = &TRG_GetMasterPage().getSdrPageProperties().GetItemSet();
}
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index b56cab644fe2..feff4152a52d 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -409,7 +409,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void)
if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE )
{
drawing::LineStyle eXLS = (drawing::LineStyle)
- static_cast<const XLineStyleItem&>(aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue();
+ aAttrSet.Get( XATTR_LINESTYLE ).GetValue();
if ( eXLS == drawing::LineStyle_NONE )
{
XLineStyleItem aXLineStyleItem( drawing::LineStyle_SOLID );
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index cbb57ccab32b..791f4ee4a729 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -1161,7 +1161,7 @@ void getExtrusionColorState( SdrView const * pSdrView, SfxItemSet& rSet )
if( bUseColor )
{
- const XSecondaryFillColorItem& rItem = *static_cast<const XSecondaryFillColorItem*>(&(pObj->GetMergedItem( XATTR_SECONDARYFILLCOLOR )));
+ const XSecondaryFillColorItem& rItem = pObj->GetMergedItem( XATTR_SECONDARYFILLCOLOR );
aColor = rItem.GetColorValue();
}
else
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index a62b083f0eb2..8a19f5d1c510 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -151,7 +151,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI
sal_uInt16 getTransparenceForSvxBrushItem(const SfxItemSet& rSourceSet, bool bSearchInParents)
{
- sal_uInt16 nFillTransparence(static_cast< const XFillTransparenceItem& >(rSourceSet.Get(XATTR_FILLTRANSPARENCE, bSearchInParents)).GetValue());
+ sal_uInt16 nFillTransparence(rSourceSet.Get(XATTR_FILLTRANSPARENCE, bSearchInParents).GetValue());
const SfxPoolItem* pGradientItem = nullptr;
if(SfxItemState::SET == rSourceSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, bSearchInParents, &pGradientItem)
@@ -170,7 +170,7 @@ sal_uInt16 getTransparenceForSvxBrushItem(const SfxItemSet& rSourceSet, bool bSe
SvxBrushItem getSvxBrushItemForSolid(const SfxItemSet& rSourceSet, bool bSearchInParents, sal_uInt16 nBackgroundID)
{
- Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
+ Color aFillColor(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents).GetColorValue());
// get evtl. mixed transparence
const sal_uInt16 nFillTransparence(getTransparenceForSvxBrushItem(rSourceSet, bSearchInParents));
@@ -195,7 +195,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
if(!pXFillStyleItem || drawing::FillStyle_NONE == pXFillStyleItem->GetValue())
{
// no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have drawing::FillStyle_NONE)
- Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
+ Color aFillColor(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents).GetColorValue());
// for writerfilter: when fill style is none, then don't allow anything other than 0 or auto.
if (!bXMLImportHack && aFillColor.GetColor() != 0)
@@ -225,7 +225,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
case drawing::FillStyle_GRADIENT:
{
// cannot be directly supported, but do the best possible
- const XGradient aXGradient(static_cast< const XFillGradientItem& >(rSourceSet.Get(XATTR_FILLGRADIENT)).GetGradientValue());
+ const XGradient aXGradient(rSourceSet.Get(XATTR_FILLGRADIENT).GetGradientValue());
const basegfx::BColor aStartColor(aXGradient.GetStartColor().getBColor() * (aXGradient.GetStartIntens() * 0.01));
const basegfx::BColor aEndColor(aXGradient.GetEndColor().getBColor() * (aXGradient.GetEndIntens() * 0.01));
@@ -251,8 +251,8 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
case drawing::FillStyle_HATCH:
{
// cannot be directly supported, but do the best possible
- const XHatch& rHatch(static_cast< const XFillHatchItem& >(rSourceSet.Get(XATTR_FILLHATCH)).GetHatchValue());
- const bool bFillBackground(static_cast< const XFillBackgroundItem& >(rSourceSet.Get(XATTR_FILLBACKGROUND)).GetValue());
+ const XHatch& rHatch(rSourceSet.Get(XATTR_FILLHATCH).GetHatchValue());
+ const bool bFillBackground(rSourceSet.Get(XATTR_FILLBACKGROUND).GetValue());
if(bFillBackground)
{
@@ -285,13 +285,13 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
case drawing::FillStyle_BITMAP:
{
// create SvxBrushItem with bitmap info and flags
- const XFillBitmapItem& rBmpItm = static_cast< const XFillBitmapItem& >(rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents));
+ const XFillBitmapItem& rBmpItm = rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents);
const Graphic aGraphic(rBmpItm.GetGraphicObject().GetGraphic());
// continue idependent of evtl. GraphicType::NONE as aGraphic.GetType(), we still need to rescue positions
SvxGraphicPosition aSvxGraphicPosition(GPOS_NONE);
- const XFillBmpStretchItem& rStretchItem = static_cast< const XFillBmpStretchItem& >(rSourceSet.Get(XATTR_FILLBMP_STRETCH, bSearchInParents));
- const XFillBmpTileItem& rTileItem = static_cast< const XFillBmpTileItem& >(rSourceSet.Get(XATTR_FILLBMP_TILE, bSearchInParents));
+ const XFillBmpStretchItem& rStretchItem = rSourceSet.Get(XATTR_FILLBMP_STRETCH, bSearchInParents);
+ const XFillBmpTileItem& rTileItem = rSourceSet.Get(XATTR_FILLBMP_TILE, bSearchInParents);
if(rTileItem.GetValue())
{
@@ -303,7 +303,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
}
else
{
- const XFillBmpPosItem& rPosItem = static_cast< const XFillBmpPosItem& >(rSourceSet.Get(XATTR_FILLBMP_POS, bSearchInParents));
+ const XFillBmpPosItem& rPosItem = rSourceSet.Get(XATTR_FILLBMP_POS, bSearchInParents);
switch(rPosItem.GetValue())
{
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index b1578b520698..7294394dd7e5 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -97,8 +97,8 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper
{
case OWN_ATTR_FILLBMP_MODE:
{
- const XFillBmpStretchItem* pStretchItem = static_cast<const XFillBmpStretchItem*>(&pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = static_cast<const XFillBmpTileItem*>(&pPool->GetDefaultItem(XATTR_FILLBMP_TILE));
+ const XFillBmpStretchItem* pStretchItem = &pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH);
+ const XFillBmpTileItem* pTileItem = &pPool->GetDefaultItem(XATTR_FILLBMP_TILE);
if( pTileItem && pTileItem->GetValue() )
{
rValue <<= drawing::BitmapMode_REPEAT;
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 52576b596a3d..24358b2f41b0 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1832,7 +1832,7 @@ OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rIntern
{
OUString aNew = rInternalName;
- if( nWhich == XATTR_LINECOLOR )
+ if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
{
if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameResId, SvxUnoColorNameDefResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew, true))
{
@@ -1865,7 +1865,7 @@ OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rA
{
OUString aNew = rApiName;
- if( nWhich == XATTR_LINECOLOR )
+ if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
{
if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameDefResId, SvxUnoColorNameResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew, false))
{
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 98bb162a0b0d..ed19d6b359bf 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1492,7 +1492,7 @@ bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName,
return false;
const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nPos);
- if( XATTR_LINEEND == nWID )
+ if( sal_uInt16(XATTR_LINEEND) == nWID )
{
XLineEndItem aLEItem(rName, pEntry->GetLineEnd());
rSet.Put( aLEItem );
@@ -1542,7 +1542,7 @@ bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName,
case XATTR_LINESTART:
{
const basegfx::B2DPolyPolygon aEmptyPoly;
- if( nWID == XATTR_LINEEND )
+ if( nWID == sal_uInt16(XATTR_LINEEND) )
rSet.Put( XLineEndItem( "", aEmptyPoly ) );
else
rSet.Put( XLineStartItem( "", aEmptyPoly ) );
@@ -2720,8 +2720,8 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
{
const SfxItemSet& rObjItemSet = mpObj->GetMergedItemSet();
- const XFillBmpStretchItem* pStretchItem = static_cast<const XFillBmpStretchItem*>(&rObjItemSet.Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = static_cast<const XFillBmpTileItem*>(&rObjItemSet.Get(XATTR_FILLBMP_TILE));
+ const XFillBmpStretchItem* pStretchItem = &rObjItemSet.Get(XATTR_FILLBMP_STRETCH);
+ const XFillBmpTileItem* pTileItem = &rObjItemSet.Get(XATTR_FILLBMP_TILE);
if( pTileItem && pTileItem->GetValue() )
{
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 895a7d06d422..f4f185de8ec3 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1104,7 +1104,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool1->GetItem2( XATTR_LINESTART, nSurrogate ));
+ const XLineStartItem* pItem = pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -1126,7 +1126,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool1->GetItem2( XATTR_LINEEND, nSurrogate ));
+ const XLineEndItem* pItem = pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -1150,7 +1150,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool2->GetItem2( XATTR_LINESTART, nSurrogate ));
+ const XLineStartItem* pItem = pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -1171,7 +1171,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool2->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool2->GetItem2( XATTR_LINEEND, nSurrogate ));
+ const XLineEndItem* pItem = pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -1205,7 +1205,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 ));
+ const XLineStartItem* pItem = pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
if( pItem && !pItem->GetName().isEmpty() )
{
@@ -1228,7 +1228,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 ));
+ const XLineEndItem* pItem = pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
if( pItem && !pItem->GetName().isEmpty() )
{
@@ -1358,7 +1358,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool1->GetItem2( XATTR_LINESTART, nSurrogate ));
+ const XLineStartItem* pItem = pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -1380,7 +1380,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool1->GetItem2( XATTR_LINEEND, nSurrogate ));
+ const XLineEndItem* pItem = pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -1404,7 +1404,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool2->GetItem2( XATTR_LINESTART, nSurrogate ));
+ const XLineStartItem* pItem = pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -1425,7 +1425,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool2->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool2->GetItem2( XATTR_LINEEND, nSurrogate ));
+ const XLineEndItem* pItem = pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -1459,7 +1459,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineStartItem* pItem = static_cast<const XLineStartItem*>(pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 ));
+ const XLineStartItem* pItem = pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
if( pItem && !pItem->GetName().isEmpty() )
{
@@ -1482,7 +1482,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineEndItem* pItem = static_cast<const XLineEndItem*>(pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 ));
+ const XLineEndItem* pItem = pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
if( pItem && !pItem->GetName().isEmpty() )
{
diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx
index 478ffa394b47..68f7d5bb1818 100644
--- a/svx/source/xoutdev/xexch.cxx
+++ b/svx/source/xoutdev/xexch.cxx
@@ -92,7 +92,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData )
rIStm.ReadUInt32( nItemCount );
- if( nItemCount > ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 ) )
+ if( nItemCount > sal_uInt16( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 ) )
nItemCount = ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 );
for( sal_uInt32 i = 0; i < nItemCount; i++ )
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 9308d78c5afe..267c1f3793d4 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -947,7 +947,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj, sal_uInt1
// determine line width and calculate with it the line end width
if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = static_cast<const XLineWidthItem&>( aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if( nValue > 0 )
nWidth = nValue * 3;
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 74ab2b12b891..314338a7084e 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6443,7 +6443,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
// thus need to check the model data itself for FillStyle (do not rely on
// SdrAllFillAttributesHelper since it already contains optimized information,
// e.g. transparency leads to no fill)
- const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue());
+ const drawing::FillStyle eFillStyle(GetAttrSet()->Get(XATTR_FILLSTYLE).GetValue());
if(drawing::FillStyle_NONE != eFillStyle)
{
@@ -7360,7 +7360,7 @@ bool SwFrame::GetBackgroundBrush(
{
// maybe optimized already when 100% transparency is used somewhere, need to test
// XFillStyleItem directly from the model data
- const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrame->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue());
+ const drawing::FillStyle eFillStyle(pFrame->GetAttrSet()->Get(XATTR_FILLSTYLE).GetValue());
if(drawing::FillStyle_NONE != eFillStyle)
{
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index d907daa6ce6a..8ae5042534d0 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2266,8 +2266,8 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
- const XFillBmpStretchItem* pStretchItem = dynamic_cast< const XFillBmpStretchItem* >(&rSet.Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = dynamic_cast< const XFillBmpTileItem* >(&rSet.Get(XATTR_FILLBMP_TILE));
+ const XFillBmpStretchItem* pStretchItem = &rSet.Get(XATTR_FILLBMP_STRETCH);
+ const XFillBmpTileItem* pTileItem = &rSet.Get(XATTR_FILLBMP_TILE);
if( pTileItem && pTileItem->GetValue() )
{
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 6ad3ede2bdc3..c755f8ba7dd7 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -461,8 +461,8 @@ void SwXParagraph::Impl::GetSinglePropertyValue_Impl(
}
case OWN_ATTR_FILLBMP_MODE:
{
- const XFillBmpStretchItem* pStretchItem = dynamic_cast< const XFillBmpStretchItem* >(&rSet.Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = dynamic_cast< const XFillBmpTileItem* >(&rSet.Get(XATTR_FILLBMP_TILE));
+ const XFillBmpStretchItem* pStretchItem = &rSet.Get(XATTR_FILLBMP_STRETCH);
+ const XFillBmpTileItem* pTileItem = &rSet.Get(XATTR_FILLBMP_TILE);
if( pTileItem && pTileItem->GetValue() )
{
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index d8be7da3f44d..966e8b0af2a6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1606,7 +1606,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemProp
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, rValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
uno::Any aValue(rValue);
const auto nMemberId(lcl_TranslateMetric(rEntry, m_pDoc, aValue));
@@ -1620,7 +1620,7 @@ void SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>(const SfxItemPropertySimpleE
}
else if(MID_GRAFURL == nMemberId)
{
- if(XATTR_FILLBITMAP == rEntry.nWID)
+ if(sal_uInt16(XATTR_FILLBITMAP) == rEntry.nWID)
{
// Bitmap also has the MID_GRAFURL mode where a Bitmap URL is used
const Graphic aNullGraphic;
@@ -1980,10 +1980,10 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
// these explicit std::mem_fn() calls shouldn't be needed, but apparently MSVC is currently too stupid for C++11 again
{ FN_UNO_HIDDEN, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>) },
{ FN_UNO_STYLE_INTEROP_GRAB_BAG, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>) },
- { XATTR_FILLGRADIENT, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLHATCH, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLBITMAP, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLFLOATTRANSPARENCE, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
+ { XATTR_FILLGRADIENT, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
+ { XATTR_FILLHATCH, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
+ { XATTR_FILLBITMAP, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
+ { XATTR_FILLFLOATTRANSPARENCE, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
{ RES_BACKGROUND, std::mem_fn(&SwXStyle::SetPropertyValue<RES_BACKGROUND>) },
{ OWN_ATTR_FILLBMP_MODE, std::mem_fn(&SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>) },
{ RES_PAPER_BIN, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PAPER_BIN>) },
@@ -2284,10 +2284,10 @@ uno::Any SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>(const SfxItemProperty
{
PrepareStyleBase(rBase);
const SfxItemSet& rSet = rBase.GetItemSet();
- const XFillBmpTileItem* pTileItem = dynamic_cast<const XFillBmpTileItem*>(&rSet.Get(XATTR_FILLBMP_TILE));
+ const XFillBmpTileItem* pTileItem = &rSet.Get(XATTR_FILLBMP_TILE);
if(pTileItem && pTileItem->GetValue())
return uno::makeAny(drawing::BitmapMode_REPEAT);
- const XFillBmpStretchItem* pStretchItem = dynamic_cast<const XFillBmpStretchItem*>(&rSet.Get(XATTR_FILLBMP_STRETCH));
+ const XFillBmpStretchItem* pStretchItem = &rSet.Get(XATTR_FILLBMP_STRETCH);
if(pStretchItem && pStretchItem->GetValue())
return uno::makeAny(drawing::BitmapMode_STRETCH);
return uno::makeAny(drawing::BitmapMode_NO_REPEAT);
@@ -3974,8 +3974,8 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
}
case OWN_ATTR_FILLBMP_MODE:
{
- const XFillBmpStretchItem* pStretchItem = dynamic_cast< const XFillBmpStretchItem* >(&mpSet->Get(XATTR_FILLBMP_STRETCH));
- const XFillBmpTileItem* pTileItem = dynamic_cast< const XFillBmpTileItem* >(&mpSet->Get(XATTR_FILLBMP_TILE));
+ const XFillBmpStretchItem* pStretchItem = &mpSet->Get(XATTR_FILLBMP_STRETCH);
+ const XFillBmpTileItem* pTileItem = &mpSet->Get(XATTR_FILLBMP_TILE);
if( pTileItem && pTileItem->GetValue() )
{
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 3df710abde87..8b71164dc1e9 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -262,11 +262,11 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
// BGCOLOR
drawing::FillStyle eFillStyle =
- static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE)).GetValue();
+ rItemSet.Get(XATTR_FILLSTYLE).GetValue();
if( drawing::FillStyle_SOLID==eFillStyle )
{
const Color& rFillColor =
- static_cast<const XFillColorItem&>(rItemSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ rItemSet.Get(XATTR_FILLCOLOR).GetColorValue();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).append("=");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 6609a6cb129b..63044c1f8247 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1223,7 +1223,7 @@ void RtfExport::OutColorTable()
nMaxItem = rPool.GetItemCount2(XATTR_FILLCOLOR);
for (sal_uInt32 i = 0; i < nMaxItem; ++i)
{
- if (auto pItem = static_cast<const XFillColorItem*>(rPool.GetItem2(XATTR_FILLCOLOR, i)))
+ if (auto pItem = rPool.GetItem2(XATTR_FILLCOLOR, i))
InsColor(pItem->GetColorValue());
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 96255010573c..f03331909aaf 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1668,8 +1668,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
{
// Now, that we know there is a line style we will make use the
// parameter given to us when calling the method... :-)
- const Color aLineColor = static_cast< XLineColorItem const & >(
- rOldSet.Get(XATTR_LINECOLOR)).GetColorValue();
+ const Color aLineColor = rOldSet.Get(XATTR_LINECOLOR).GetColorValue();
nLineThick = WW8ITEMVALUE(rOldSet, XATTR_LINEWIDTH, XLineWidthItem);
if( !nLineThick )
@@ -1813,8 +1812,8 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
case drawing::FillStyle_SOLID:
case drawing::FillStyle_GRADIENT:
{
- const Color aColor = static_cast< XFillColorItem const & >(
- rOldSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ const Color aColor =
+ rOldSet.Get(XATTR_FILLCOLOR).GetColorValue();
aBrushItem.SetColor(aColor);
if (bBrushItemOk) // has trans
@@ -1827,7 +1826,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
break;
case drawing::FillStyle_BITMAP:
{
- GraphicObject aGrfObj(static_cast< XFillBitmapItem const & >(rOldSet.Get(XATTR_FILLBITMAP)).GetGraphicObject());
+ GraphicObject aGrfObj(rOldSet.Get(XATTR_FILLBITMAP).GetGraphicObject());
const bool bTile(WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE, SfxBoolItem));
if(bBrushItemOk) // has trans
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 1ec7292ceba4..c5180e3038ae 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -875,8 +875,8 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit)
// Get currently used FillStyle and remember, also need the XFillFloatTransparenceItem
// to decide if gradient transparence is used
- const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pSet->Get(XATTR_FILLSTYLE)).GetValue());
- const bool bUseFloatTransparence(static_cast< const XFillFloatTransparenceItem& >(pSet->Get(XATTR_FILLFLOATTRANSPARENCE)).IsEnabled());
+ const drawing::FillStyle eFillStyle(pSet->Get(XATTR_FILLSTYLE).GetValue());
+ const bool bUseFloatTransparence(pSet->Get(XATTR_FILLFLOATTRANSPARENCE).IsEnabled());
for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() )
{
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index ce47eafd7e15..cb6b7d6b8259 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -242,9 +242,9 @@ namespace SwLangHelper
bool bIsSingleScriptType = true;
switch (SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ))
{
- case SvtScriptType::LATIN : nLangWhichId = pEditEngine ? EE_CHAR_LANGUAGE : RES_CHRATR_LANGUAGE; break;
- case SvtScriptType::ASIAN : nLangWhichId = pEditEngine ? EE_CHAR_LANGUAGE_CJK : RES_CHRATR_CJK_LANGUAGE; break;
- case SvtScriptType::COMPLEX : nLangWhichId = pEditEngine ? EE_CHAR_LANGUAGE_CTL : RES_CHRATR_CTL_LANGUAGE; break;
+ case SvtScriptType::LATIN : nLangWhichId = pEditEngine ? sal_uInt16(EE_CHAR_LANGUAGE) : sal_uInt16(RES_CHRATR_LANGUAGE); break;
+ case SvtScriptType::ASIAN : nLangWhichId = pEditEngine ? sal_uInt16(EE_CHAR_LANGUAGE_CJK) : sal_uInt16(RES_CHRATR_CJK_LANGUAGE); break;
+ case SvtScriptType::COMPLEX : nLangWhichId = pEditEngine ? sal_uInt16(EE_CHAR_LANGUAGE_CTL) : sal_uInt16(RES_CHRATR_CTL_LANGUAGE); break;
default:
bIsSingleScriptType = false;
OSL_FAIL("unexpected case" );
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index b3a6829a1c95..c866213a36b5 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1132,7 +1132,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
case SID_ATTR_PAGE_FILLSTYLE:
{
- XFillStyleItem aFSItem( static_cast<const XFillStyleItem&>(pReqArgs->Get( XATTR_FILLSTYLE )) );
+ XFillStyleItem aFSItem( pReqArgs->Get( XATTR_FILLSTYLE ) );
drawing::FillStyle eXFS = aFSItem.GetValue();
if ( eXFS == drawing::FillStyle_NONE )
@@ -1142,7 +1142,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_COLOR:
{
- XFillColorItem aColorItem( static_cast<const XFillColorItem&>(pReqArgs->Get( XATTR_FILLCOLOR )) );
+ XFillColorItem aColorItem( pReqArgs->Get( XATTR_FILLCOLOR ) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_SOLID ) );
rMaster.SetFormatAttr( aColorItem );
}
@@ -1150,7 +1150,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_GRADIENT:
{
- XFillGradientItem aGradientItem( static_cast<const XFillGradientItem&>(pReqArgs->Get( XATTR_FILLGRADIENT )) );
+ XFillGradientItem aGradientItem( pReqArgs->Get( XATTR_FILLGRADIENT ) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
rMaster.SetFormatAttr( aGradientItem );
}
@@ -1158,7 +1158,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_HATCH:
{
- XFillHatchItem aHatchItem( static_cast<const XFillHatchItem&>(pReqArgs->Get( XATTR_FILLHATCH )) );
+ XFillHatchItem aHatchItem( pReqArgs->Get( XATTR_FILLHATCH ) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_HATCH ) );
rMaster.SetFormatAttr( aHatchItem );
}
@@ -1166,7 +1166,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_BITMAP:
{
- XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem&>(pReqArgs->Get( XATTR_FILLBITMAP )) );
+ XFillBitmapItem aBitmapItem( pReqArgs->Get( XATTR_FILLBITMAP ) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_BITMAP ) );
rMaster.SetFormatAttr( aBitmapItem );
}
@@ -2309,8 +2309,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_ATTR_PAGE_BITMAP:
{
SfxItemSet aSet = rDesc.GetMaster().GetAttrSet();
- drawing::FillStyle eXFS = (drawing::FillStyle) ( static_cast<const XFillStyleItem*>(
- aSet.GetItem(XATTR_FILLSTYLE) )->GetValue() );
+ drawing::FillStyle eXFS = (drawing::FillStyle)
+ aSet.GetItem(XATTR_FILLSTYLE)->GetValue();
XFillStyleItem aFillStyleItem( eXFS );
aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
rSet.Put(aFillStyleItem);