summaryrefslogtreecommitdiff
path: root/sd/source/ui/app
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-15 09:03:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-15 09:03:36 +0100
commite1bdc38a0b8861281f4111fa78b39f76be6e14e7 (patch)
treeee847ac020c48c91148072603dd1706bb719fd83 /sd/source/ui/app
parent5cd41952cdb1c3c14cd48858d382d8bd95f602ff (diff)
More loplugin:cstylecast: sd
Change-Id: I77ed2793aad62377ec6fc2513e06e2371c1c77ad
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/app/sdmod2.cxx8
-rw-r--r--sd/source/ui/app/sdpopup.cxx18
3 files changed, 14 insertions, 14 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 2a155733d71f..7bdede6cd75a 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -124,7 +124,7 @@ void SdModule::Execute(SfxRequest& rReq)
const SfxPoolItem* pItem;
if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_ATTR_METRIC, true, &pItem ) )
{
- FieldUnit eUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ FieldUnit eUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
switch( eUnit )
{
case FUNIT_MM: // only the units which are also in the dialog
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 395ca9eb7eaa..9c514395387a 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -480,13 +480,13 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
nDefTab = pOptions->GetDefTab();
pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, nDefTab ) );
- FieldUnit nMetric = (FieldUnit)0xffff;
+ FieldUnit nMetric = FieldUnit(0xffff);
if( pFrameView)
nMetric = pDoc->GetUIUnit();
else
- nMetric = (FieldUnit)pOptions->GetMetric();
+ nMetric = static_cast<FieldUnit>(pOptions->GetMetric());
- if( nMetric == (FieldUnit)0xffff )
+ if( nMetric == FieldUnit(0xffff) )
nMetric = GetFieldUnit();
pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast<sal_uInt16>(nMetric) ) );
@@ -719,7 +719,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
// Only if also the document type matches...
if( pDocSh && pDoc && eDocType == pDoc->GetDocumentType() )
{
- FieldUnit eUIUnit = (FieldUnit) pOptions->GetMetric();
+ FieldUnit eUIUnit = static_cast<FieldUnit>(pOptions->GetMetric());
pDoc->SetUIUnit(eUIUnit);
if (pViewShell)
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index f5c77ab55d5a..08a1c06db958 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -85,7 +85,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
aDateField.SetFormat( SvxDateFormat::F ); // Dienstag, 13.Februar 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- CheckItem( (sal_uInt16) ( pDateField->GetFormat() ) + 1 ); // - 2 + 3 !
+ CheckItem( static_cast<sal_uInt16>( pDateField->GetFormat() ) + 1 ); // - 2 + 3 !
}
else if( dynamic_cast< const SvxExtTimeField *>( pField ) != nullptr )
{
@@ -119,7 +119,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
//SvxTimeFormat::HH12_MM_SS_AMPM, // 01:49:38 PM
//SvxTimeFormat::HH12_MM_SS_00_AMPM // 01:49:38.78 PM
- CheckItem( (sal_uInt16) ( pTimeField->GetFormat() ) + 1 ); // - 2 + 3 !
+ CheckItem( static_cast<sal_uInt16>( pTimeField->GetFormat() ) + 1 ); // - 2 + 3 !
}
else if( dynamic_cast< const SvxExtFileField *>( pField ) != nullptr )
{
@@ -136,7 +136,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
InsertItem( nID++, SdResId( STR_FILEFORMAT_PATH ), nStyle );
InsertItem( nID++, SdResId( STR_FILEFORMAT_NAME ), nStyle );
- CheckItem( (sal_uInt16) ( pFileField->GetFormat() ) + 3 );
+ CheckItem( static_cast<sal_uInt16>( pFileField->GetFormat() ) + 3 );
}
else if( dynamic_cast< const SvxAuthorField *>( pField ) != nullptr )
{
@@ -150,10 +150,10 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
for( sal_uInt16 i = 0; i < 4; i++ )
{
- aAuthorField.SetFormat( (SvxAuthorFormat) i );
+ aAuthorField.SetFormat( static_cast<SvxAuthorFormat>(i) );
InsertItem( nID++, aAuthorField.GetFormatted(), nStyle );
}
- CheckItem( (sal_uInt16) ( pAuthorField->GetFormat() ) + 3 );
+ CheckItem( static_cast<sal_uInt16>( pAuthorField->GetFormat() ) + 3 );
}
}
@@ -183,7 +183,7 @@ SvxFieldData* SdFieldPopup::GetField()
if( IsItemChecked( i ) )
break;
}
- eFormat = (SvxDateFormat) ( i - 1 );
+ eFormat = static_cast<SvxDateFormat>( i - 1 );
if( pDateField->GetFormat() != eFormat ||
pDateField->GetType() != eType )
@@ -216,7 +216,7 @@ SvxFieldData* SdFieldPopup::GetField()
if( IsItemChecked( i ) )
break;
}
- eFormat = (SvxTimeFormat) ( i - 1 );
+ eFormat = static_cast<SvxTimeFormat>( i - 1 );
if( pTimeField->GetFormat() != eFormat ||
pTimeField->GetType() != eType )
@@ -250,7 +250,7 @@ SvxFieldData* SdFieldPopup::GetField()
if( IsItemChecked( i ) )
break;
}
- eFormat = (SvxFileFormat) ( i - 3 );
+ eFormat = static_cast<SvxFileFormat>( i - 3 );
if( pFileField->GetFormat() != eFormat ||
pFileField->GetType() != eType )
@@ -289,7 +289,7 @@ SvxFieldData* SdFieldPopup::GetField()
if( IsItemChecked( i ) )
break;
}
- eFormat = (SvxAuthorFormat) ( i - 3 );
+ eFormat = static_cast<SvxAuthorFormat>( i - 3 );
if( pAuthorField->GetFormat() != eFormat ||
pAuthorField->GetType() != eType )