summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-23 09:47:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-23 09:48:10 +0000
commited76d1d3504c92bff6bb3e6417e4440572fcd959 (patch)
tree6d06b4a20bef5acf0c1a4118685f09acdd27fbb7 /svx
parenta61c4ae9cef23a53ea88f957e090bd5ee9b28ca6 (diff)
loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 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/EnhancedCustomShapeFontWork.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx4
-rw-r--r--svx/source/form/fmpgeimp.cxx2
-rw-r--r--svx/source/form/fmshell.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/form/formcontrolfactory.cxx6
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svdfmtf.cxx2
-rw-r--r--svx/source/svdraw/svdlayer.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx6
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/unodraw/unoshap4.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx4
16 files changed, 26 insertions, 26 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 18ed208865b3..076bfd075003 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -283,7 +283,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
for ( i = 0; i < rText.getLength(); i++ )
{
FWCharacterData aCharacterData;
- OUString aCharText( (sal_Unicode)rText[ i ] );
+ OUString aCharText( rText[ i ] );
if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, aCharText, 0, 0, -1, nWidth, pDXArry.get() ) )
{
sal_Int32 nTextWidth = pVirDev->GetTextWidth( aCharText);
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 14a35ef6d1f1..db2ef8918926 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1064,7 +1064,7 @@ void DbGridControl::StateChanged( StateChangedType nType )
Point aPoint = GetControlArea().TopLeft();
sal_uInt16 nX = (sal_uInt16)aPoint.X();
ArrangeControls(nX, (sal_uInt16)aPoint.Y());
- ReserveControlArea((sal_uInt16)nX);
+ ReserveControlArea(nX);
}
break;
case StateChangedType::ControlFont:
@@ -1270,7 +1270,7 @@ void DbGridControl::EnableNavigationBar(bool bEnable)
sal_uInt16 nX = (sal_uInt16)aPoint.X();
ArrangeControls(nX, (sal_uInt16)aPoint.Y());
- ReserveControlArea((sal_uInt16)nX);
+ ReserveControlArea(nX);
}
else
{
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 7ed87afc1257..5b74fffb0f21 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -599,7 +599,7 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
if (aCursorSource.isEmpty())
{
xFormProps->setPropertyValue(FM_PROP_COMMAND, makeAny(_rCursorSource));
- xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny((sal_Int32)nCommandType));
+ xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny(nCommandType));
}
}
}
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 46ded85224d6..d73936b3544f 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -751,7 +751,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
}
if ( nRecord != -1 )
- rController->execute( nSlot, "Position", makeAny( (sal_Int32)nRecord ) );
+ rController->execute( nSlot, "Position", makeAny( nRecord ) );
rReq.Done();
} break;
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index c8ba3be334e8..95ab5fa4fc34 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3267,7 +3267,7 @@ void FmXFormShell::CreateExternalView()
#endif
// remember the position within the columns
if (aRadioPositions.find(aGroupName) == aRadioPositions.end())
- aRadioPositions[aGroupName] = (sal_Int16)nAddedColumns;
+ aRadioPositions[aGroupName] = nAddedColumns;
// any further handling is done below
}
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 69768810846f..b86d281fc42e 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -168,7 +168,7 @@ namespace svxform
{
OUStringBuffer aBuffer( _rBaseLabel );
aBuffer.append( " " );
- aBuffer.append( (sal_Int32)i++ );
+ aBuffer.append( i++ );
sLabel = aBuffer.makeStringAndClear();
}
}
@@ -604,7 +604,7 @@ namespace svxform
if ( aProperty.Type.getTypeClass() == TypeClass_DOUBLE )
aValue <<= (double)nMinValue;
else if ( aProperty.Type.getTypeClass() == TypeClass_LONG )
- aValue <<= (sal_Int32)nMinValue;
+ aValue <<= nMinValue;
else
{
OSL_FAIL( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MinValue)!" );
@@ -616,7 +616,7 @@ namespace svxform
if ( aProperty.Type.getTypeClass() == TypeClass_DOUBLE )
aValue <<= (double)nMaxValue;
else if ( aProperty.Type.getTypeClass() == TypeClass_LONG )
- aValue <<= (sal_Int32)nMaxValue;
+ aValue <<= nMaxValue;
else
{
OSL_FAIL( "FormControlFactory::initializeFieldDependentProperties: unexpected property type (MaxValue)!" );
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index ca28596f8666..7a09e8a8c313 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -1622,7 +1622,7 @@ bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}
@@ -1643,7 +1643,7 @@ SfxPoolItem* SdrEdgeNode1HorzDistItem::Clone(SfxItemPool* /*pPool*/) const
bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}
@@ -1664,7 +1664,7 @@ SfxPoolItem* SdrEdgeNode1VertDistItem::Clone(SfxItemPool* /*pPool*/) const
bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}
@@ -1685,7 +1685,7 @@ SfxPoolItem* SdrEdgeNode2HorzDistItem::Clone(SfxItemPool* /*pPool*/) const
bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index ac7253de8196..adf930c3fba5 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1220,7 +1220,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile& rM
aXGradient.SetGradientStyle((css::awt::GradientStyle)rGrad.GetStyle());
aXGradient.SetStartColor(rGrad.GetStartColor());
aXGradient.SetEndColor(rGrad.GetEndColor());
- aXGradient.SetAngle((sal_uInt16)rGrad.GetAngle());
+ aXGradient.SetAngle(rGrad.GetAngle());
aXGradient.SetBorder(rGrad.GetBorder());
aXGradient.SetXOffset(rGrad.GetOfsX());
aXGradient.SetYOffset(rGrad.GetOfsY());
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 1b2cfd2a0838..33998f37796c 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -297,7 +297,7 @@ SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
sal_uInt16 j;
for (j=0; j<GetLayerCount(); j++)
{
- aSet.Set(GetLayer((sal_uInt16)j)->GetID());
+ aSet.Set(GetLayer(j)->GetID());
}
SdrLayerID i;
if (!bDown)
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 54a83bf509bb..91a03fad70a3 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1043,7 +1043,7 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag
{
sal_uInt16 nPntNum((sal_uInt16)pHdl->GetPointNum());
const XPolygon& rXPoly = aPathPolygon[(sal_uInt16)rDrag.GetHdl()->GetPolyNum()];
- sal_uInt16 nPointCount((sal_uInt16)rXPoly.GetPointCount());
+ sal_uInt16 nPointCount(rXPoly.GetPointCount());
bool bClose(IsClosed(meObjectKind));
if(bClose)
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index c7cabbe2a346..aac78aaa9495 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -715,7 +715,7 @@ void ExtrusionLightingWindow::SelectHdl(void* pControl)
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString(g_sExtrusionLightingDirection).copy(5);
- aArgs[0].Value <<= (sal_Int32)nDirection;
+ aArgs[0].Value <<= nDirection;
mrController.dispatchCommand( g_sExtrusionLightingDirection, aArgs );
@@ -850,7 +850,7 @@ IMPL_LINK_NOARG(ExtrusionSurfaceWindow, SelectHdl, ToolbarMenu*, void)
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString(g_sExtrusionSurface).copy(5);
- aArgs[0].Value <<= (sal_Int32)nSurface;
+ aArgs[0].Value <<= nSurface;
mrController.dispatchCommand( g_sExtrusionSurface, aArgs );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index b34387986f49..2d34ace6eef1 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -325,7 +325,7 @@ IMPL_LINK_NOARG(FontworkAlignmentWindow, SelectHdl, ToolbarMenu*, void)
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = msFontworkAlignment.copy(5);
- aArgs[0].Value <<= (sal_Int32)nAlignment;
+ aArgs[0].Value <<= nAlignment;
mrController.dispatchCommand( msFontworkAlignment, aArgs );
@@ -531,7 +531,7 @@ IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl,ToolbarMenu*, void)
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
- aArgs[0].Value <<= (sal_Int32)nCharacterSpacing;
+ aArgs[0].Value <<= nCharacterSpacing;
mrController.dispatchCommand( ".uno:FontworkCharacterSpacingDialog", aArgs );
}
@@ -549,7 +549,7 @@ IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl,ToolbarMenu*, void)
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
- aArgs[0].Value <<=( sal_Int32)nCharacterSpacing;
+ aArgs[0].Value <<= nCharacterSpacing;
mrController.dispatchCommand( msFontworkCharacterSpacing, aArgs );
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index fb5d9c76f464..d7a8e9d8053c 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -361,7 +361,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
aPageNumValue = " ";
break;
default:
- aPageNumValue += OUString::number( (sal_Int32)mnPageNumber );
+ aPageNumValue += OUString::number( mnPageNumber );
}
pInfo->SetRepresentation( aPageNumValue );
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 10e4ea814422..180cf7f817dd 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -940,7 +940,7 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
break;
case OWN_ATTR_MEDIA_VOLUMEDB:
- rValue <<= (sal_Int16) aItem.getVolumeDB();
+ rValue <<= aItem.getVolumeDB();
break;
case OWN_ATTR_MEDIA_ZOOM:
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 46a69cd8d2b2..c0c75d8e727a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2683,7 +2683,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
case OWN_ATTR_GLUEID_HEAD:
case OWN_ATTR_GLUEID_TAIL:
{
- rValue <<= (sal_Int32)pEdgeObj->getGluePointIndex( pProperty->nWID == OWN_ATTR_GLUEID_HEAD );
+ rValue <<= pEdgeObj->getGluePointIndex( pProperty->nWID == OWN_ATTR_GLUEID_HEAD );
break;
}
case OWN_ATTR_EDGE_POLYPOLYGONBEZIER:
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index f03453c8670e..9f42f5c2ad0c 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1941,7 +1941,7 @@ bool XLineStartWidthItem::GetPresentation
bool XLineStartWidthItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}
@@ -1989,7 +1989,7 @@ bool XLineEndWidthItem::GetPresentation
bool XLineEndWidthItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetValue();
+ rVal <<= GetValue();
return true;
}