diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 11:26:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 15:12:32 +0000 |
commit | 84568fa10a0aaff14b87f725604704f1907dc2e3 (patch) | |
tree | ecfa5ce0aafa2aacc8d43bc99f5da582b0388493 /svx | |
parent | dda1c7b6fabbda4cf40c21b5fb8cb30f7c1f0743 (diff) |
coverity#1399021 Unchecked dynamic_cast
Change-Id: I3befc9be20f8d414ec786f1a94f1f85ce94fb44b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 0be647033ae8..3e0e40f4fced 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -687,17 +687,16 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - std::unique_ptr< SdrView > pLocalView; - if( dynamic_cast<FmFormModel*>( mpDoc ) ) + std::unique_ptr<SdrView> xLocalView; + if (FmFormModel* pFormModel = dynamic_cast<FmFormModel*>(mpDoc)) { - pLocalView.reset( new FmFormView( dynamic_cast<FmFormModel*>( mpDoc ), aVDev ) ); + xLocalView.reset(new FmFormView(pFormModel, aVDev) ); } else { - pLocalView.reset( new SdrView( mpDoc, aVDev ) ); + xLocalView.reset(new SdrView(mpDoc, aVDev)); } - ScopedVclPtr<VirtualDevice> pVDev(CreatePageVDev( pPage, nWidthPix, nHeightPix )); if( pVDev ) |