Kaydet (Commit) c80e3417 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:cstylecast: unotools

Change-Id: I04af756527ff42ad83a1b68730230864233c4fac
üst 64089f77
......@@ -131,7 +131,7 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
sal_Int32 nMode = SvtExtendedSecurityOptions::OPEN_WITHSECURITYCHECK;
if ( seqValues[nProperty] >>= nMode )
m_eOpenHyperlinkMode = (SvtExtendedSecurityOptions::OpenHyperlinkMode)nMode;
m_eOpenHyperlinkMode = static_cast<SvtExtendedSecurityOptions::OpenHyperlinkMode>(nMode);
else {
OSL_FAIL("Wrong type for Open mode!");
}
......
......@@ -930,7 +930,7 @@ FontWeight FontSubstConfiguration::getSubstWeight( const css::uno::Reference< XN
catch (const WrappedTargetException&)
{
}
return (FontWeight)( weight >= 0 ? pWeightNames[weight].nEnum : WEIGHT_DONTKNOW );
return static_cast<FontWeight>( weight >= 0 ? pWeightNames[weight].nEnum : WEIGHT_DONTKNOW );
}
FontWidth FontSubstConfiguration::getSubstWidth( const css::uno::Reference< XNameAccess >& rFont,
......@@ -957,7 +957,7 @@ FontWidth FontSubstConfiguration::getSubstWidth( const css::uno::Reference< XNam
catch (const WrappedTargetException&)
{
}
return (FontWidth)( width >= 0 ? pWidthNames[width].nEnum : WIDTH_DONTKNOW );
return static_cast<FontWidth>( width >= 0 ? pWidthNames[width].nEnum : WIDTH_DONTKNOW );
}
ImplFontAttrs FontSubstConfiguration::getSubstType( const css::uno::Reference< XNameAccess >& rFont,
......
......@@ -377,7 +377,7 @@ void SvtSecurityOptions_Impl::SetProperty( sal_Int32 nProperty, const Any& rValu
{
sal_Int32 nMode = 0;
rValue >>= nMode;
m_eBasicMode = (EBasicSecurityMode)nMode;
m_eBasicMode = static_cast<EBasicSecurityMode>(nMode);
m_bROBasicMode = bRO;
}
break;
......
......@@ -302,7 +302,7 @@ css::i18n::DirectionProperty CharClass::getCharacterDirection( const OUString& r
try
{
if ( xCC.is() )
return (css::i18n::DirectionProperty)xCC->getCharacterDirection( rStr, nPos );
return static_cast<css::i18n::DirectionProperty>(xCC->getCharacterDirection( rStr, nPos ));
}
catch ( const Exception& )
{
......@@ -316,7 +316,7 @@ css::i18n::UnicodeScript CharClass::getScript( const OUString& rStr, sal_Int32 n
try
{
if ( xCC.is() )
return (css::i18n::UnicodeScript) xCC->getScript( rStr, nPos );
return static_cast<css::i18n::UnicodeScript>(xCC->getScript( rStr, nPos ));
}
catch ( const Exception& )
{
......
......@@ -144,7 +144,7 @@ void TransliterationWrapper::loadModuleImpl() const
try
{
if ( xTrans.is() )
xTrans->loadModule( (TransliterationModules)nType, aLanguageTag.getLocale() );
xTrans->loadModule( static_cast<TransliterationModules>(nType), aLanguageTag.getLocale() );
}
catch ( const Exception& e )
{
......
......@@ -277,7 +277,7 @@ bool utl::UCBContentHelper::MakeFolder(
"unotools.ucbhelper",
"UCBContentHelper::MakeFolder(" << title
<< ") InteractiveIOException \"" << e
<< "\", code " << + (sal_Int32)e.Code);
<< "\", code " << + static_cast<sal_Int32>(e.Code));
}
} catch (css::ucb::NameClashException const &) {
exists = true;
......
......@@ -1226,7 +1226,7 @@ ErrCode UcbLockBytes::Flush() const
ErrCode UcbLockBytes::SetSize (sal_uInt64 const nNewSize)
{
SvLockBytesStat aStat;
Stat( &aStat, (SvLockBytesStatFlag) 0 );
Stat( &aStat, SvLockBytesStatFlag(0) );
std::size_t nSize = aStat.nSize;
if ( nSize > nNewSize )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment