summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-18 09:51:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-18 10:52:59 +0200
commit41a967af06a9584a997e11079c3c931d34158c09 (patch)
tree494ca16d2d6148ad54ceacec4ab170f57efd8dd2 /sw
parent1b6ecb1dc544b7a462948a1c85d4bfc6f08865b8 (diff)
Extend loplugin:redundantcast to trivial reinterpret_cast from T to itself
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/swfont.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index b0195ff8d718..8e2272b1ff8a 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -753,7 +753,7 @@ TextAndReading SwTOXTable::GetText_Impl(SwRootFrame const*const) const
if( pNd )
{
const SwTableNode* pTableNd =
- reinterpret_cast<const SwTableNode*>(pNd->FindTableNode());
+ pNd->FindTableNode();
if (pTableNd)
{
return TextAndReading(pTableNd->GetTable().GetFrameFormat()->GetName(), OUString());
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 30cd44851081..0ed7baf87894 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -975,7 +975,7 @@ Size SwSubFont::GetTextSize_( SwDrawTextInfo& rInf )
{
// Robust: the font is supposed to be set already, but better safe than
// sorry...
- if ( !pLastFont || pLastFont->GetOwner() != reinterpret_cast<const void*>(m_nFontCacheId) ||
+ if ( !pLastFont || pLastFont->GetOwner() != m_nFontCacheId ||
!IsSameInstance( rInf.GetpOut()->GetFont() ) )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
@@ -1093,7 +1093,7 @@ void SwSubFont::DrawText_( SwDrawTextInfo &rInf, const bool bGrey )
pUnderFnt = rInf.GetUnderFnt();
}
- if( !pLastFont || pLastFont->GetOwner() != reinterpret_cast<const void*>(m_nFontCacheId) )
+ if( !pLastFont || pLastFont->GetOwner() != m_nFontCacheId )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
@@ -1218,7 +1218,7 @@ void SwSubFont::DrawStretchText_( SwDrawTextInfo &rInf )
pUnderFnt = rInf.GetUnderFnt();
}
- if ( !pLastFont || pLastFont->GetOwner() != reinterpret_cast<const void*>(m_nFontCacheId) )
+ if ( !pLastFont || pLastFont->GetOwner() != m_nFontCacheId )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
@@ -1283,7 +1283,7 @@ void SwSubFont::DrawStretchText_( SwDrawTextInfo &rInf )
TextFrameIndex SwSubFont::GetModelPositionForViewPoint_( SwDrawTextInfo& rInf )
{
- if ( !pLastFont || pLastFont->GetOwner() != reinterpret_cast<const void*>(m_nFontCacheId) )
+ if ( !pLastFont || pLastFont->GetOwner() != m_nFontCacheId )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );