coverity#1415610 avoid Unchecked dynamic_cast
Change-Id: Id37e121d3f0de9067fdce8462db7162f3e80d1ac
This commit is contained in:
@@ -419,7 +419,6 @@ void ExportDialog::GetGraphicStream()
|
|||||||
|
|
||||||
if ( mxGraphic.is() )
|
if ( mxGraphic.is() )
|
||||||
{
|
{
|
||||||
SvMemoryStream* pTempStream = dynamic_cast<SvMemoryStream*>( mpTempStream );
|
|
||||||
Graphic aGraphic( mxGraphic );
|
Graphic aGraphic( mxGraphic );
|
||||||
|
|
||||||
if ( aGraphic.GetType() == GraphicType::Bitmap )
|
if ( aGraphic.GetType() == GraphicType::Bitmap )
|
||||||
@@ -440,9 +439,9 @@ void ExportDialog::GetGraphicStream()
|
|||||||
const sal_uInt16 nFilter = rFilter.GetExportFormatNumberForShortName( maExt );
|
const sal_uInt16 nFilter = rFilter.GetExportFormatNumberForShortName( maExt );
|
||||||
if ( rFilter.IsExportPixelFormat( nFilter ) )
|
if ( rFilter.IsExportPixelFormat( nFilter ) )
|
||||||
{
|
{
|
||||||
pTempStream->SetResizeOffset(1024);
|
mpTempStream->SetResizeOffset(1024);
|
||||||
pTempStream->SetStreamSize(1024);
|
mpTempStream->SetStreamSize(1024);
|
||||||
rFilter.ExportGraphic( aGraphic, "", *pTempStream, nFilter, &aNewFilterData );
|
rFilter.ExportGraphic( aGraphic, "", *mpTempStream, nFilter, &aNewFilterData );
|
||||||
|
|
||||||
if ( mnFormat == FORMAT_JPG )
|
if ( mnFormat == FORMAT_JPG )
|
||||||
{
|
{
|
||||||
|
@@ -118,7 +118,7 @@ private:
|
|||||||
sal_Int16 mnFormat;
|
sal_Int16 mnFormat;
|
||||||
sal_Int32 mnMaxFilesizeForRealtimePreview;
|
sal_Int32 mnMaxFilesizeForRealtimePreview;
|
||||||
|
|
||||||
SvStream* mpTempStream;
|
SvMemoryStream* mpTempStream;
|
||||||
Bitmap maBitmap;
|
Bitmap maBitmap;
|
||||||
|
|
||||||
css::awt::Size maOriginalSize; // the original graphic size in 1/100mm
|
css::awt::Size maOriginalSize; // the original graphic size in 1/100mm
|
||||||
|
Reference in New Issue
Block a user