summaryrefslogtreecommitdiff
path: root/framework/source/services
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:23 +0100
commitcf8b8cad053e0e9783cdc8f08ce886e2ae4b7eb0 (patch)
treeacb5e32f7abdb40975076487122c7fa1d05be0b7 /framework/source/services
parentfaf01b8d54737dfbb318709180966e84c7fd5614 (diff)
More loplugin:cstylecast: framework
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I8981ef6de675bf10c103e1af0afccd620762268d
Diffstat (limited to 'framework/source/services')
-rw-r--r--framework/source/services/autorecovery.cxx6
-rw-r--r--framework/source/services/frame.cxx4
-rw-r--r--framework/source/services/pathsettings.cxx2
-rw-r--r--framework/source/services/substitutepathvars.cxx6
-rw-r--r--framework/source/services/urltransformer.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index ed66677e1b22..8ba3e8487bad 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1185,7 +1185,7 @@ DispatchParams::DispatchParams()
DispatchParams::DispatchParams(const ::comphelper::SequenceAsHashMap& lArgs ,
const css::uno::Reference< css::uno::XInterface >& xOwner)
{
- m_nWorkingEntryID = lArgs.getUnpackedValueOrDefault(PROP_ENTRY_ID, (sal_Int32)-1 );
+ m_nWorkingEntryID = lArgs.getUnpackedValueOrDefault(PROP_ENTRY_ID, sal_Int32(-1) );
m_xProgress = lArgs.getUnpackedValueOrDefault(PROP_PROGRESS, css::uno::Reference< css::task::XStatusIndicator >());
m_sSavePath = lArgs.getUnpackedValueOrDefault(PROP_SAVEPATH, OUString() );
m_xHoldRefForAsyncOpAlive = xOwner;
@@ -2007,7 +2007,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
OUStringBuffer sIDBuf;
sIDBuf.append(RECOVERY_ITEM_BASE_IDENTIFIER);
- sIDBuf.append((sal_Int32)rInfo.ID);
+ sIDBuf.append(static_cast<sal_Int32>(rInfo.ID));
OUString sID = sIDBuf.makeStringAndClear();
// remove
@@ -4074,7 +4074,7 @@ bool AutoRecovery::impl_enoughDiscSpace(sal_Int32 nRequiredSpace)
}
sal_uInt64 nFreeMB = (nFreeSpace/1048576);
- return (nFreeMB >= (sal_uInt64)nRequiredSpace);
+ return (nFreeMB >= static_cast<sal_uInt64>(nRequiredSpace));
#endif // SIMULATE_FULL_DISC
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 4366c26b0944..2f2011d60364 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1970,7 +1970,7 @@ css::uno::Sequence< css::beans::Property > SAL_CALL Frame::getProperties()
SolarMutexGuard g;
- sal_Int32 c = (sal_Int32)m_lProps.size();
+ sal_Int32 c = static_cast<sal_Int32>(m_lProps.size());
css::uno::Sequence< css::beans::Property > lProps(c);
TPropInfoHash::const_iterator pIt;
@@ -3048,7 +3048,7 @@ void Frame::implts_setIconOnWindow()
)
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
- pWorkWindow->SetIcon( (sal_uInt16)nIcon );
+ pWorkWindow->SetIcon( static_cast<sal_uInt16>(nIcon) );
}
}
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index c16a5b1e95cd..ed73a08fae41 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1076,7 +1076,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
// SAFE ->
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
- sal_Int32 c = (sal_Int32)m_lPaths.size();
+ sal_Int32 c = static_cast<sal_Int32>(m_lPaths.size());
sal_Int32 i = 0;
m_lPropDesc.realloc(c*IDGROUP_COUNT);
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 72bcfb940b69..b41660242210 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -216,7 +216,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XComponentCon
// Example: WORK_PATH=c:\test, $(workdirurl)=WORK_PATH => WORK_PATH=$(workdirurl) and this cannot be substituted!
ReSubstFixedVarOrder aFixedVar;
aFixedVar.eVariable = PreDefVariable(i);
- aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[(sal_Int32)aFixedVar.eVariable].getLength();
+ aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[static_cast<sal_Int32>(aFixedVar.eVariable)].getLength();
m_aReSubstFixedVarOrder.push_back( aFixedVar );
}
}
@@ -594,7 +594,7 @@ OUString const & SubstitutePathVariables::impl_getSubstituteVariableValue( const
throw NoSuchElementException("Unknown variable!", static_cast<cppu::OWeakObject *>(this));
}
PreDefVariable nIndex = pNTOIIter->second;
- return m_aPreDefVars.m_FixedVar[(sal_Int32)nIndex];
+ return m_aPreDefVars.m_FixedVar[static_cast<sal_Int32>(nIndex)];
}
void SubstitutePathVariables::SetPredefinedPathVariables()
@@ -666,7 +666,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
m_aPreDefVars.m_FixedVar[ PREDEFVAR_VLANG ] = aLocaleStr;
// Set $(langid)
- m_aPreDefVars.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::number( (sal_uInt16)m_aPreDefVars.m_eLanguageType );
+ m_aPreDefVars.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::number( static_cast<sal_uInt16>(m_aPreDefVars.m_eLanguageType) );
// Set the other pre defined path variables
// Set $(work)
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index 493acda1fa4c..dec58037d19f 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -70,7 +70,7 @@ namespace
_rURL.User = _rParser.GetUser ( INetURLObject::DecodeMechanism::WithCharset );
_rURL.Password = _rParser.GetPass ( INetURLObject::DecodeMechanism::WithCharset );
_rURL.Server = _rParser.GetHost ( INetURLObject::DecodeMechanism::WithCharset );
- _rURL.Port = (sal_Int16)_rParser.GetPort();
+ _rURL.Port = static_cast<sal_Int16>(_rParser.GetPort());
sal_Int32 nCount = _rParser.getSegmentCount( false );
if ( nCount > 0 )