diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 10:50:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 15:10:51 +0100 |
commit | 31ee230b6efac9a6a60ceb5c2367ae9a5cf98929 (patch) | |
tree | c7ff6f56f5295caa88bda7ceb2036691e3db5c36 /sc/source/ui/docshell/docsh6.cxx | |
parent | 5a242f651c8ae8d53ac67f5059f64629303848ab (diff) |
Related: tdf#94814 some cleanup of static_cast following dynamic_cast
to the same type
Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af
Diffstat (limited to 'sc/source/ui/docshell/docsh6.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 737423695da7..0a012928f572 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -354,9 +354,8 @@ void ScDocShell::UpdateLinks() { --k; ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[k]; - if (dynamic_cast<const ScTableLink*>( pBase) != nullptr) + if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase)) { - ScTableLink* pTabLink = static_cast<ScTableLink*>(pBase); if (pTabLink->IsUsed()) aNames.insert(pTabLink->GetFileName()); else // nicht mehr benutzt -> loeschen @@ -418,9 +417,8 @@ bool ScDocShell::ReloadTabLinks() for (size_t i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; - if (dynamic_cast<const ScTableLink*>( pBase) != nullptr) + if (ScTableLink* pTabLink = dynamic_cast<ScTableLink*>(pBase)) { - ScTableLink* pTabLink = static_cast<ScTableLink*>(pBase); // pTabLink->SetAddUndo(sal_False); //! Undo's zusammenfassen // Painting only after Update() makes no sense: |