Kaydet (Commit) 6480d68a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735748 Unchecked dynamic_cast

Change-Id: Id15888f32996dd2ce05bed6942ebebdb8223a85b
üst 3b4fcee7
......@@ -184,10 +184,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
if( pOut )
{
vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
if ( nPageCount )
{
pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages );
vcl::PDFExtOutDevData& rPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData&>(*pOut->GetExtOutDevData());
rPDFExtOutDevData.SetIsExportNotesPages( bExportNotesPages );
sal_Int32 nCurrentPage(0);
StringRangeEnumerator::Iterator aIter = rRangeEnum.begin();
......@@ -203,7 +203,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
aRenderer[ nProperty].Value >>= aPageSize;
}
pPDFExtOutDevData->SetCurrentPageNumber( nCurrentPage );
rPDFExtOutDevData.SetCurrentPageNumber( nCurrentPage );
GDIMetaFile aMtf;
const MapMode aMapMode( MAP_100TH_MM );
......@@ -231,7 +231,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
if( aMtf.GetActionSize() &&
( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) )
bRet = ImplExportPage( rPDFWriter, *pPDFExtOutDevData, aMtf ) || bRet;
bRet = ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf) || bRet;
pOut->Pop();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment