coverity#1415610 avoid Unchecked dynamic_cast

Change-Id: Id37e121d3f0de9067fdce8462db7162f3e80d1ac
This commit is contained in:
Caolán McNamara 2017-07-23 19:09:15 +01:00
parent 08ff9e0cc4
commit 458c609503
2 changed files with 4 additions and 5 deletions

View File

@ -419,7 +419,6 @@ void ExportDialog::GetGraphicStream()
if ( mxGraphic.is() )
{
SvMemoryStream* pTempStream = dynamic_cast<SvMemoryStream*>( mpTempStream );
Graphic aGraphic( mxGraphic );
if ( aGraphic.GetType() == GraphicType::Bitmap )
@ -440,9 +439,9 @@ void ExportDialog::GetGraphicStream()
const sal_uInt16 nFilter = rFilter.GetExportFormatNumberForShortName( maExt );
if ( rFilter.IsExportPixelFormat( nFilter ) )
{
pTempStream->SetResizeOffset(1024);
pTempStream->SetStreamSize(1024);
rFilter.ExportGraphic( aGraphic, "", *pTempStream, nFilter, &aNewFilterData );
mpTempStream->SetResizeOffset(1024);
mpTempStream->SetStreamSize(1024);
rFilter.ExportGraphic( aGraphic, "", *mpTempStream, nFilter, &aNewFilterData );
if ( mnFormat == FORMAT_JPG )
{

View File

@ -118,7 +118,7 @@ private:
sal_Int16 mnFormat;
sal_Int32 mnMaxFilesizeForRealtimePreview;
SvStream* mpTempStream;
SvMemoryStream* mpTempStream;
Bitmap maBitmap;
css::awt::Size maOriginalSize; // the original graphic size in 1/100mm