summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-03 21:11:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-05 21:18:05 +0200
commit03f2dbfabf2d1e8906ac7c3ec5d230facb0ec57c (patch)
tree6fc26169e7f72b5ac379dcf084cc3274c4ef9b29
parenteaa689639fb3e02c204ab3fa132f79aed5b598c7 (diff)
Improved loplugin:cstylecast to reference types: sfx2
Change-Id: I0e5be42d78130c34e6ec39c32d463ed15d59b377
-rw-r--r--sfx2/source/doc/docfilt.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index c7d1d219b609..8d8876bc9191 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -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 );
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index ca419ab37d64..36ac1f9faad1 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -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 ;
}