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, ...@@ -184,10 +184,10 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
if( pOut ) if( pOut )
{ {
vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
if ( nPageCount ) if ( nPageCount )
{ {
pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages ); vcl::PDFExtOutDevData& rPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData&>(*pOut->GetExtOutDevData());
rPDFExtOutDevData.SetIsExportNotesPages( bExportNotesPages );
sal_Int32 nCurrentPage(0); sal_Int32 nCurrentPage(0);
StringRangeEnumerator::Iterator aIter = rRangeEnum.begin(); StringRangeEnumerator::Iterator aIter = rRangeEnum.begin();
...@@ -203,7 +203,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, ...@@ -203,7 +203,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
aRenderer[ nProperty].Value >>= aPageSize; aRenderer[ nProperty].Value >>= aPageSize;
} }
pPDFExtOutDevData->SetCurrentPageNumber( nCurrentPage ); rPDFExtOutDevData.SetCurrentPageNumber( nCurrentPage );
GDIMetaFile aMtf; GDIMetaFile aMtf;
const MapMode aMapMode( MAP_100TH_MM ); const MapMode aMapMode( MAP_100TH_MM );
...@@ -231,7 +231,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, ...@@ -231,7 +231,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
if( aMtf.GetActionSize() && if( aMtf.GetActionSize() &&
( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) ) ( !mbSkipEmptyPages || aPageSize.Width || aPageSize.Height ) )
bRet = ImplExportPage( rPDFWriter, *pPDFExtOutDevData, aMtf ) || bRet; bRet = ImplExportPage(rPDFWriter, rPDFExtOutDevData, aMtf) || bRet;
pOut->Pop(); 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