[ooo-build-commit] 2 commits - patches/dev300

Tor Lillqvist tml at kemper.freedesktop.org
Fri Jan 15 07:47:21 PST 2010


 patches/dev300/apply                                     |    2 -
 patches/dev300/win32-pdfimport-assume-no-encryption.diff |   12 ------
 patches/dev300/win32-pdfimport-use-temporary-file.diff   |   26 +++++++++++++++
 3 files changed, 27 insertions(+), 13 deletions(-)

New commits:
commit 6ef50ac394448814e658916e4d6c17906ba1aac7
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Jan 15 17:33:53 2010 +0200

    Delete the now unused win32-pdfimport-assume-no-encryption.diff

diff --git a/patches/dev300/win32-pdfimport-assume-no-encryption.diff b/patches/dev300/win32-pdfimport-assume-no-encryption.diff
deleted file mode 100644
index 1155483..0000000
--- a/patches/dev300/win32-pdfimport-assume-no-encryption.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- sdext/source/pdfimport/wrapper/wrapper.cxx	2010-01-13 10:39:42.000000000 +0100
-+++ sdext/source/pdfimport/wrapper/wrapper.cxx	2010-01-13 10:41:01.000000000 +0100
-@@ -827,6 +827,9 @@
-                              bool&                                              o_rIsEncrypted
-                              )
- {
-+    // Ugly temporary workaround to some file-locking
-+    return true;
-+
-     bool bSuccess = false;
-     rtl::OString aPDFFile;
-     aPDFFile = rtl::OUStringToOString( i_rPath, osl_getThreadTextEncoding() );
commit 18fb99344427561b2a973867cb250f34430bb8f1
Author: Tor Lillqvist <tml at hemulen.(none)>
Date:   Fri Jan 15 17:25:38 2010 +0200

    Solve the pdfimport problem in a better way
    
    Just always copy the stream into a temporary file and load it from
    there. Then we don't nee to bypass the check for an encrypted
    document, that should work now. Remove the temp file after it has been
    loaded to avoid leaving potentially discriminating evidence around.
    
    Thanks to Fridrich for the idea.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index dc759a1..680aecb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3268,7 +3268,7 @@ boost-1.39-extra-header.diff, kohei
 [ Win32Only ]
 win32-boost-crack.diff
 
-win32-pdfimport-assume-no-encryption.diff, n#569319, fridrich
+win32-pdfimport-use-temporary-file.diff, n#569319, fridrich
 
 [ NovellOnly ]
 # remove Macro Recorder from UI since it is borked by design
diff --git a/patches/dev300/win32-pdfimport-use-temporary-file.diff b/patches/dev300/win32-pdfimport-use-temporary-file.diff
new file mode 100644
index 0000000..cb04a62
--- /dev/null
+++ b/patches/dev300/win32-pdfimport-use-temporary-file.diff
@@ -0,0 +1,26 @@
+--- sdext/source/pdfimport/pdfiadaptor.cxx
++++ sdext/source/pdfimport/pdfiadaptor.cxx
+@@ -254,7 +254,7 @@
+ 
+     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 );
+--- sdext/source/pdfimport/wrapper/wrapper.cxx
++++ sdext/source/pdfimport/wrapper/wrapper.cxx
+@@ -1041,7 +1041,11 @@
+ 
+     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;
+ }
+ 
+ }


More information about the ooo-build-commit mailing list