[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - libwpd/libwpd-0.9.6.patch libwpd/UnpackedTarball_wpd.mk

Tor Lillqvist tlillqvist at novell.com
Wed Apr 3 00:09:59 PDT 2013


 libwpd/UnpackedTarball_wpd.mk |    8 ++++----
 libwpd/libwpd-0.9.6.patch     |   31 +++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 4 deletions(-)

New commits:
commit 0877d79d0533a0a1a6c6175de7d054d19d9d0066
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Wed Apr 3 09:09:17 2013 +0200

    bnc#777181 open XML in Writer
    
    Change-Id: I6f24d59035088b274475d35e9f0d783514226977

diff --git a/libwpd/UnpackedTarball_wpd.mk b/libwpd/UnpackedTarball_wpd.mk
index 24e589c..bb6c35d 100644
--- a/libwpd/UnpackedTarball_wpd.mk
+++ b/libwpd/UnpackedTarball_wpd.mk
@@ -13,10 +13,10 @@ $(eval $(call gb_UnpackedTarball_set_tarball,wpd,$(WPD_TARBALL)))
 
 # $(eval $(call gb_UnpackedTarball_set_patchlevel,wpd,0))
 
-# wpd_patches :=
+wpd_patches := libwpd-0.9.6.patch
 
-# $(eval $(call gb_UnpackedTarball_add_patches,wpd,\
-# 	$(foreach patch,$(wpd_patches),libwpd/$(patch)) \
-# ))
+$(eval $(call gb_UnpackedTarball_add_patches,wpd,\
+	$(foreach patch,$(wpd_patches),libwpd/$(patch)) \
+)) 
 
 # vim: set noet sw=4 ts=4:
diff --git a/libwpd/libwpd-0.9.6.patch b/libwpd/libwpd-0.9.6.patch
new file mode 100644
index 0000000..c185150
--- /dev/null
+++ b/libwpd/libwpd-0.9.6.patch
@@ -0,0 +1,31 @@
+--- misc/libwpd-0.9.6/src/lib/WP42Heuristics.cpp
++++ misc/build/libwpd-0.9.6/src/lib/WP42Heuristics.cpp
+@@ -70,6 +70,28 @@
+ 	WPXEncryption *encryption = 0;
+ 	try
+ 	{
++		// Disregard XML at least right away
++		if (readU8(input, 0) == '<' &&
++		    readU8(input, 0) == '?' &&
++		    readU8(input, 0) == 'x' &&
++		    readU8(input, 0) == 'm' &&
++		    readU8(input, 0) == 'l' &&
++		    readU8(input, 0) == ' ')
++			return WPD_CONFIDENCE_NONE;
++		input->seek(0, WPX_SEEK_SET);
++
++		if (readU8(input, 0) == 0xEF &&
++		    readU8(input, 0) == 0xBB &&
++		    readU8(input, 0) == 0xBF &&
++		    readU8(input, 0) == '<' &&
++		    readU8(input, 0) == '?' &&
++		    readU8(input, 0) == 'x' &&
++		    readU8(input, 0) == 'm' &&
++		    readU8(input, 0) == 'l' &&
++		    readU8(input, 0) == ' ')
++			return WPD_CONFIDENCE_NONE;
++		input->seek(0, WPX_SEEK_SET);
++
+ 		if (readU8(input, 0) == 0xFE && readU8(input, 0) == 0xFF &&
+ 		        readU8(input, 0) == 0x61 && readU8(input, 0) == 0x61)
+ 		{


More information about the Libreoffice-commits mailing list