summaryrefslogtreecommitdiff
path: root/libwpd
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-03 11:06:36 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-03 11:08:44 +0200
commit1457ace0d08188ab9151152902ae65627793a2c4 (patch)
tree569eec07302dcec43c6139d56a8f864f03db8832 /libwpd
parentd650ba3a6c91e2b271e19cb08cb825bebe3446f0 (diff)
Uploading updated versions of libwpd and libwps
libwps: some conversion improvements and fixing of leaks libwpd: improve loading of corrupted WP6+ documents, conversion of Mac 2-byte script characters + miscellaneous improvement of WP charsets to unicode conversion
Diffstat (limited to 'libwpd')
-rw-r--r--libwpd/libwpd.corruptedprefix.patch107
-rw-r--r--libwpd/libwpd.gcc460.patch11
-rw-r--r--libwpd/libwpd.warnings.patch32
-rw-r--r--libwpd/makefile.mk7
4 files changed, 2 insertions, 155 deletions
diff --git a/libwpd/libwpd.corruptedprefix.patch b/libwpd/libwpd.corruptedprefix.patch
deleted file mode 100644
index 9d5288d0515d..000000000000
--- a/libwpd/libwpd.corruptedprefix.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- misc/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp 2010-08-26 13:35:21.000000000 +0200
-+++ misc/build/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp 2011-04-01 18:25:41.328379372 +0200
-@@ -46,45 +46,67 @@
- }
-
- WP6PrefixDataPacket * WP6PrefixDataPacket::constructPrefixDataPacket(WPXInputStream * input, WPXEncryption *encryption, WP6PrefixIndice *prefixIndice)
--{
-- switch (prefixIndice->getType())
-+{
-+ WP6PrefixDataPacket *tmpPacket = 0;
-+ try
-+ {
-+ switch (prefixIndice->getType())
-+ {
-+ case WP6_INDEX_HEADER_INITIAL_FONT:
-+ tmpPacket = new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT:
-+ tmpPacket = new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL:
-+ tmpPacket = new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_FILL_STYLE:
-+ tmpPacket = new WP6FillStylePacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY:
-+ tmpPacket = new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_OUTLINE_STYLE:
-+ tmpPacket = new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_GRAPHICS_FILENAME:
-+ tmpPacket = new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA:
-+ tmpPacket = new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_GRAPHICS_BOX_STYLE:
-+ tmpPacket = new WP6GraphicsBoxStylePacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_TABLE_STYLE:
-+ tmpPacket = new WP6TableStylePacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ case WP6_INDEX_HEADER_COMMENT_ANNOTATION:
-+ tmpPacket = new WP6CommentAnnotationPacket(input, encryption, prefixIndice->getID(),
-+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-+ break;
-+ default:
-+ break;;
-+ }
-+ }
-+ catch (FileException)
- {
-- case WP6_INDEX_HEADER_INITIAL_FONT:
-- return new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT:
-- return new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL:
-- return new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_FILL_STYLE:
-- return new WP6FillStylePacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY:
-- return new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_OUTLINE_STYLE:
-- return new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_GRAPHICS_FILENAME:
-- return new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA:
-- return new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_GRAPHICS_BOX_STYLE:
-- return new WP6GraphicsBoxStylePacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_TABLE_STYLE:
-- return new WP6TableStylePacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- case WP6_INDEX_HEADER_COMMENT_ANNOTATION:
-- return new WP6CommentAnnotationPacket(input, encryption, prefixIndice->getID(),
-- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
-- default:
-- return 0;
-+ if (tmpPacket)
-+ delete tmpPacket;
-+ tmpPacket = 0;
- }
-+ return tmpPacket;
- }
-
- void WP6PrefixDataPacket::_read(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataOffset, uint32_t dataSize)
diff --git a/libwpd/libwpd.gcc460.patch b/libwpd/libwpd.gcc460.patch
deleted file mode 100644
index e5e41a0ddf06..000000000000
--- a/libwpd/libwpd.gcc460.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 09:50:48.131106590 +0000
-+++ misc/build/libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 09:51:17.676174074 +0000
-@@ -37,7 +37,7 @@
- ~WP5GraphicsInformationPacket();
- void _readContents(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataSize);
- const std::vector<WPXBinaryData *> &getImages() const { return m_images; }
-- const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return NULL; }
-+ const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return 0; }
-
- private:
- std::vector<WPXBinaryData *> m_images;
diff --git a/libwpd/libwpd.warnings.patch b/libwpd/libwpd.warnings.patch
deleted file mode 100644
index ebc86dc93ca5..000000000000
--- a/libwpd/libwpd.warnings.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- misc/libwpd-0.9.1/src/lib/libwpd_internal.cpp
-+++ misc/build/libwpd-0.9.1/src/lib/libwpd_internal.cpp
-@@ -998,21 +998,25 @@ _WPXColumnProperties::_WPXColumnProperties()
- // HACK: this function is really cheesey
- int _extractNumericValueFromRoman(const char romanChar)
- {
-+ int retValue = 0;
- switch (romanChar)
- {
- case 'I':
- case 'i':
-- return 1;
-+ retValue = 1;
-+ break;
- case 'V':
- case 'v':
-- return 5;
-+ retValue = 5;
-+ break;
- case 'X':
- case 'x':
-- return 10;
-+ retValue = 10;
-+ break;
- default:
- throw ParseException();
- }
-- return 1;
-+ return retValue;
- }
-
- // _extractDisplayReferenceNumberFromBuf: given a nuWP6_DEFAULT_FONT_SIZEmber string in UCS2 represented
diff --git a/libwpd/makefile.mk b/libwpd/makefile.mk
index 6ecbbfaddacd..a8b17ffa625f 100644
--- a/libwpd/makefile.mk
+++ b/libwpd/makefile.mk
@@ -41,11 +41,8 @@ TARGET=wpd
@echo "Using system libwpd..."
.ENDIF
-TARFILE_NAME=libwpd-0.9.1
-TARFILE_MD5=5ff846847dab351604ad859e2fd4ed3c
-PATCH_FILES=libwpd.gcc460.patch \
- libwpd.corruptedprefix.patch \
- libwpd.warnings.patch
+TARFILE_NAME=libwpd-0.9.2
+TARFILE_MD5=8d265a592619166f29c4672ea54812b7
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
BUILD_DIR=src$/lib