summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-16 16:16:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-20 09:43:25 +0100
commit0f0049d77a0ee6ae936922213c7290d0bc4fee29 (patch)
tree21ec8c68606453166de7557afa394054907d9c85 /svx
parent21e85d591f344958c3ebee9422ba15dbd931f2cc (diff)
TypedWhichId for XATTR* constants
Change-Id: Ie9d637d701b77a549de3b00956f9c74ee8bd08c1 Reviewed-on: https://gerrit.libreoffice.org/44830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-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
33 files changed, 188 insertions, 186 deletions
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++ )