diff options
-rw-r--r-- | sdext/source/pdfimport/pdfiadaptor.cxx | 2 | ||||
-rwxr-xr-x | sdext/source/pdfimport/wrapper/wrapper.cxx | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 9ece9ef..7c00239 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -250,7 +250,7 @@ bool PDFIRawAdaptor::parse( const uno::Reference<io::XInputStream>& xInput bool bSuccess=false; - if( xInput.is() && (!rURL.getLength() || rURL.compareToAscii( "file:", 5 ) != 0) ) + if( xInput.is() ) bSuccess = xpdf_ImportFromStream( xInput, pSink, xIHdl, rPwd, m_xContext ); else bSuccess = xpdf_ImportFromFile( rURL, pSink, xIHdl, rPwd, m_xContext ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index cd89d8f..27b440c 100755 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -1105,7 +1105,11 @@ bool xpdf_ImportFromStream( const uno::Reference< io::XInputStream >& xI osl_closeFile( aFile ); - return bSuccess && xpdf_ImportFromFile( aURL, rSink, xIHdl, rPwd, xContext ); + if ( bSuccess ) + bSuccess = xpdf_ImportFromFile( aURL, rSink, xIHdl, rPwd, xContext ); + osl_removeFile( aURL.pData ); + + return bSuccess; } } |