summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-08 19:12:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-09 12:57:31 +0100
commitee8e4083460dbb043149df1f44bff003dc3a5f80 (patch)
treed63e2cda13810bfe11a92550d152177ee6a217e8 /filter
parent0f1a89ed72994ce86da43ddef09426550e9e9145 (diff)
dynamic_cast followed by static_cast
Change-Id: I12e8e438e0a3b556e29b191374341ddd2e76a24b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109013 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 8129998aac6a..a69b7a31b615 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4000,18 +4000,18 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
}
pRet->SetLogicRect( rObjData.aBoundRect );
- if ( dynamic_cast<const SdrGrafObj* >(pRet) != nullptr )
+ if (SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>(pRet))
{
if( aLinkFileName.getLength() )
{
- static_cast<SdrGrafObj*>(pRet)->SetGraphicLink( aLinkFileName );
- Graphic aGraphic(static_cast<SdrGrafObj*>(pRet)->GetGraphic());
+ pGrafObj->SetGraphicLink( aLinkFileName );
+ Graphic aGraphic(pGrafObj->GetGraphic());
aGraphic.setOriginURL(aLinkFileName);
}
if ( bLinkGrf && !bGrfRead )
{
- Graphic aGraf(static_cast<SdrGrafObj*>(pRet)->GetGraphic());
+ Graphic aGraf(pGrafObj->GetGraphic());
lcl_ApplyCropping( *this, &rSet, aGraf );
}
}