Improved loplugin:cstylecast to reference types: sfx2

Change-Id: I0e5be42d78130c34e6ec39c32d463ed15d59b377
This commit is contained in:
Stephan Bergmann
2017-06-03 21:11:10 +02:00
parent eaa689639f
commit 03f2dbfabf
2 changed files with 3 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
}
else
{
SotClipboardFormatId nClipId = ((SotStorage&)rStg).GetFormat();
SotClipboardFormatId nClipId = const_cast<SotStorage&>(rStg).GetFormat();
if ( nClipId != SotClipboardFormatId::NONE )
{
std::shared_ptr<const SfxFilter> pFilter = SfxFilterMatcher().GetFilter4ClipBoardId( nClipId );

View File

@@ -250,7 +250,7 @@ void SfxObjectShell::UpdateTime_Impl(
if (nDays==0)
{
// If no day between now and last editing - calculate time directly.
nAddTime = (const tools::Time&)aNow - (const tools::Time&)pImpl->nTime ;
nAddTime = static_cast<const tools::Time&>(aNow) - static_cast<const tools::Time&>(pImpl->nTime);
}
else if (nDays<=31)
{
@@ -261,7 +261,7 @@ void SfxObjectShell::UpdateTime_Impl(
// nAddTime = (24h - nTime) + (nDays * 24h) + aNow
--nDays;
nAddTime = nDays*n24Time.GetTime() ;
nAddTime += n24Time-(const tools::Time&)pImpl->nTime ;
nAddTime += n24Time-static_cast<const tools::Time&>(pImpl->nTime);
nAddTime += aNow ;
}