diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:16:43 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:16:43 +0000 |
commit | 4aeb023ed878f15dc283312116406d7d4e28d624 (patch) | |
tree | df1da9635c81d38866e7e2597e042f98abf803c9 /filter | |
parent | 1924c9ba6fc1f5c3b11942ac0f9f75c02f33de97 (diff) |
INTEGRATION: CWS aquavcl05_DEV300 (1.62.8); FILE MERGED
2008/02/19 10:59:58 pl 1.62.8.1: #i85195# report potential problems during PDF export
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index d42280bead2d..25947de93822 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -4,9 +4,9 @@ * * $RCSfile: pdfexport.cxx,v $ * - * $Revision: 1.65 $ + * $Revision: 1.66 $ * - * last change: $Author: kz $ $Date: 2008-03-05 16:45:52 $ + * last change: $Author: kz $ $Date: 2008-03-05 17:16:43 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -37,6 +37,7 @@ #include "precompiled_filter.hxx" #include "pdfexport.hxx" +#include "impdialog.hxx" #include "pdf.hrc" #include <tools/urlobj.hxx> @@ -420,6 +421,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue OUString aFile; sal_Bool bRet = sal_False; + std::set< PDFWriter::ErrorCode > aErrors; + if( aURL.GetProtocol() != INET_PROT_FILE ) { String aTmp; @@ -912,6 +915,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue { pPDFExtOutDevData->PlayGlobalActions( *pPDFWriter ); pPDFWriter->Emit(); + aErrors = pPDFWriter->GetErrors(); } pOut->SetExtOutDevData( NULL ); } @@ -919,9 +923,29 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue delete pPDFWriter; } } + + // show eventual errors during export + showErrors( aErrors ); + return bRet; } +void PDFExport::showErrors( const std::set< PDFWriter::ErrorCode >& rErrors ) +{ + if( ! rErrors.empty() ) + { + ByteString aResMgrName( "pdffilter" ); + aResMgrName.Append( ByteString::CreateFromInt32( SOLARUPD ) ); + ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + if ( pResMgr ) + { + ImplErrorDialog aDlg( rErrors, *pResMgr ); + aDlg.Execute(); + delete pResMgr; + } + } +} + // ----------------------------------------------------------------------------- sal_Bool PDFExport::ImplExportPage( PDFWriter& rWriter, PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf ) |