summaryrefslogtreecommitdiff
path: root/sd/source
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 /sd/source
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 'sd/source')
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx4
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx4
-rw-r--r--sd/source/ui/app/optsitem.cxx4
-rw-r--r--sd/source/ui/app/sdmod2.cxx2
-rw-r--r--sd/source/ui/dlg/present.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx3
-rw-r--r--sd/source/ui/docshell/docshel2.cxx2
-rw-r--r--sd/source/ui/func/futext.cxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx10
-rw-r--r--sd/source/ui/view/drtxtob.cxx2
11 files changed, 19 insertions, 20 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 8b2fa727dbb9..c3d296878ab3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1803,7 +1803,7 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste
FSHelperPtr pFS
= openFragmentStreamWithSerializer( OUStringBuffer()
.append( "ppt/slideLayouts/slideLayout" )
- .append( (sal_Int32) mnLayoutFileIdMax )
+ .append( mnLayoutFileIdMax )
.append( ".xml" )
.makeStringAndClear(),
"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml" );
@@ -2178,7 +2178,7 @@ void PowerPointExport::WriteTheme( sal_Int32 nThemeNum )
{
FSHelperPtr pFS = openFragmentStreamWithSerializer( OUStringBuffer()
.append( "ppt/theme/theme" )
- .append( (sal_Int32) nThemeNum + 1 )
+ .append( nThemeNum + 1 )
.append( ".xml" )
.makeStringAndClear(),
"application/vnd.openxmlformats-officedocument.theme+xml" );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 22b21c66c063..7e67d544226e 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2800,8 +2800,8 @@ void AnimationImporter::importTargetElementContainer( const Atom* pAtom, Any& rT
rTarget <<= aParaTarget;
rSubType = ShapeAnimationSubType::ONLY_TEXT;
- dump( " paragraph %d,", (sal_Int32)nPara);
- dump( " %d characters", (sal_Int32)end );
+ dump( " paragraph %d,", nPara);
+ dump( " %d characters", end );
}
}
}
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index b13b7ec456df..3643af570c78 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -954,8 +954,8 @@ bool SdOptionsZoom::WriteData( Any* pValues ) const
GetScale( x, y );
- pValues[ 0 ] <<= (sal_Int32) x;
- pValues[ 1 ] <<= (sal_Int32) y;
+ pValues[ 0 ] <<= x;
+ pValues[ 1 ] <<= y;
return true;
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 88b261a8fe60..f6e25fc72c94 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -307,7 +307,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
}
else if( pDoc )
{
- nPageCount = (sal_uInt16)pDoc->GetActiveSdPageCount();
+ nPageCount = pDoc->GetActiveSdPageCount();
}
}
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 58ff4cafb6c8..c4788163f413 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -91,7 +91,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
if( pCustomShowList )
{
- sal_uInt16 nPosToSelect = (sal_uInt16) pCustomShowList->GetCurPos();
+ sal_uInt16 nPosToSelect = pCustomShowList->GetCurPos();
SdCustomShow* pCustomShow;
// fill Listbox with CustomShows
for( pCustomShow = pCustomShowList->First();
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 2700f8ee94eb..a1e6019ee567 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -420,8 +420,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
if ( m_pLbMetric->IsValueChangedFromSaved() )
{
sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pLbMetric->GetEntryData( nMPos ));
- rAttrs->Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ),
- (sal_uInt16)nFieldUnit ) );
+ rAttrs->Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ), nFieldUnit ) );
bModified = true;
}
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index f43bc1a71d2d..cecf385fd9c7 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -76,7 +76,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
if( nullptr == pSelectedPage )
{
SdPage* pPage = nullptr;
- sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PageKind::Standard);
+ sal_uInt16 nPageCnt = mpDoc->GetSdPageCount(PageKind::Standard);
for (sal_uInt16 i = 0; i < nPageCnt; i++)
{
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 3b6757000e77..9b7bbb1558d2 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -240,7 +240,7 @@ void FuText::DoExecute( SfxRequest& )
&& SID_TEXTEDIT == nSlotId
&& SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (sal_uInt16)static_cast<const SfxUInt16Item&>(pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && static_cast<const SfxUInt16Item&>(pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Selection by doubleclick -> don't allow QuickDrag
bQuickDrag = false;
@@ -1273,7 +1273,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
&& SID_TEXTEDIT == nSlotId
&& SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (sal_uInt16) static_cast<const SfxUInt16Item&>( pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && static_cast<const SfxUInt16Item&>( pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// selection wit double click -> do not allow QuickDrag
bQuickDrag = false;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index d86f4a9a7def..ba51319c0108 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1332,7 +1332,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
sal_Int16 nMeasureUnit = 0;
SvxMapUnitToMeasureUnit( pEmbeddedObj->GetMapUnit(), nMeasureUnit );
- aAny <<= (sal_Int16)nMeasureUnit;
+ aAny <<= nMeasureUnit;
}
break;
case WID_MODEL_FORBCHARS:
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 3b7eb5c0d81c..785c771c27af 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -648,7 +648,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
GetPage()->SetAutoLayout( (AutoLayout)nValue, true );
break;
case WID_PAGE_DURATION:
- GetPage()->SetTime((sal_Int32)nValue);
+ GetPage()->SetTime(nValue);
break;
}
break;
@@ -1026,16 +1026,16 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny = getNavigationOrder();
break;
case WID_PAGE_LEFT:
- aAny <<= (sal_Int32)( GetPage()->GetLftBorder() );
+ aAny <<= GetPage()->GetLftBorder();
break;
case WID_PAGE_RIGHT:
- aAny <<= (sal_Int32)( GetPage()->GetRgtBorder() );
+ aAny <<= GetPage()->GetRgtBorder();
break;
case WID_PAGE_TOP:
- aAny <<= (sal_Int32)( GetPage()->GetUppBorder() );
+ aAny <<= GetPage()->GetUppBorder();
break;
case WID_PAGE_BOTTOM:
- aAny <<= (sal_Int32)( GetPage()->GetLwrBorder() );
+ aAny <<= GetPage()->GetLwrBorder();
break;
case WID_PAGE_WIDTH:
aAny <<= (sal_Int32)( GetPage()->GetSize().getWidth() );
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index c46dc8aa174b..5be13466ac6c 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -564,7 +564,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
rSet.InvalidateItem(EE_PARA_LRSPACE);
rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
}
- sal_uInt16 nLineSpace = (sal_uInt16) static_cast<const SvxLineSpacingItem&>( aAttrSet.
+ sal_uInt16 nLineSpace = static_cast<const SvxLineSpacingItem&>( aAttrSet.
Get( EE_PARA_SBL ) ).GetPropLineSpace();
switch( nLineSpace )
{