summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/undo/areasave.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index 3d50fba4f826..a46adae4017c 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -156,12 +156,12 @@ std::unique_ptr<ScAreaLinkSaveCollection> ScAreaLinkSaveCollection::CreateFromDo
for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = rLinks[i].get();
- if (dynamic_cast<const ScAreaLink*>( pBase) != nullptr)
+ if (auto pAreaLink = dynamic_cast<ScAreaLink*>( pBase))
{
if (!pColl)
pColl.reset(new ScAreaLinkSaveCollection);
- pColl->push_back( ScAreaLinkSaver( *static_cast<ScAreaLink*>(pBase ) ) );
+ pColl->push_back( ScAreaLinkSaver( *pAreaLink ) );
}
}
}