diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-03 11:06:36 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-03 11:06:36 +0200 |
commit | 6ad3b38d2515da1c02d10b66e3c3b4a97e7c79d2 (patch) | |
tree | 757e424daf69e39dcdc014acbd34bc641ea47d33 | |
parent | 8fe49db033035c83669fb826e14e22eb1282bc6b (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
-rw-r--r-- | libwpd/libwpd.corruptedprefix.patch | 107 | ||||
-rw-r--r-- | libwpd/libwpd.gcc460.patch | 11 | ||||
-rw-r--r-- | libwpd/libwpd.warnings.patch | 32 | ||||
-rw-r--r-- | libwpd/makefile.mk | 7 | ||||
-rw-r--r-- | libwps/libwps-0.1.1.diff | 93 | ||||
-rw-r--r-- | libwps/libwps-0.2.0.patch | 11 | ||||
-rw-r--r-- | libwps/makefile.mk | 6 |
7 files changed, 4 insertions, 263 deletions
diff --git a/libwpd/libwpd.corruptedprefix.patch b/libwpd/libwpd.corruptedprefix.patch deleted file mode 100644 index 9d5288d..0000000 --- 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 e5e41a0..0000000 --- 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 ebc86dc..0000000 --- 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 6ecbbfa..a8b17ff 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 diff --git a/libwps/libwps-0.1.1.diff b/libwps/libwps-0.1.1.diff deleted file mode 100644 index 6977cf3..0000000 --- a/libwps/libwps-0.1.1.diff +++ /dev/null @@ -1,93 +0,0 @@ -*** misc/libwps-0.1.1/src/lib/WPSListener.h Thu Nov 29 20:58:57 2007 ---- misc/build/libwps-0.1.1/src/lib/WPSListener.h Sun Dec 2 20:54:35 2007 -*************** -*** 39,45 **** - virtual ~WPSListener(); - - bool isUndoOn() { return m_isUndoOn; } -! void setUndoOn(bool isUndoOn) { m_isUndoOn = isUndoOn; } - - std::list<WPSPageSpan> &m_pageList; - ---- 39,45 ---- - virtual ~WPSListener(); - - bool isUndoOn() { return m_isUndoOn; } -! void setUndoOn(bool undoOn) { m_isUndoOn = undoOn; } - - std::list<WPSPageSpan> &m_pageList; - -*** misc/libwps-0.1.1/src/lib/WPSContentListener.cpp Thu Nov 29 20:58:57 2007 ---- misc/build/libwps-0.1.1/src/lib/WPSContentListener.cpp Sun Dec 2 21:09:11 2007 -*************** -*** 36,62 **** - #define LIBWPS_MAX std::max - #endif - -- namespace { -- -- WPXString doubleToString(const double value) -- { -- WPXString tempString; -- tempString.sprintf("%.4f", value); -- std::string decimalPoint(localeconv()->decimal_point); -- if ((decimalPoint.size() == 0) || (decimalPoint == ".")) -- return tempString; -- std::string stringValue(tempString.cstr()); -- if (!stringValue.empty()) -- { -- std::string::size_type pos; -- while ((pos = stringValue.find(decimalPoint)) != std::string::npos) -- stringValue.replace(pos,decimalPoint.size(),"."); -- } -- return WPXString(stringValue.c_str()); -- } -- -- } // namespace -- - _WPSContentParsingState::_WPSContentParsingState() : - m_textAttributeBits(0), - m_fontSize(12.0f/*WP6_DEFAULT_FONT_SIZE*/), // FIXME ME!!!!!!!!!!!!!!!!!!! HELP WP6_DEFAULT_FONT_SIZE ---- 36,41 ---- -*************** -*** 578,585 **** - _closePageSpan(); - } - -- const float WPS_DEFAULT_SUPER_SUB_SCRIPT = 58.0f; -- - void WPSContentListener::_openSpan() - { - if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened) ---- 557,562 ---- -*************** -*** 622,639 **** - } - - WPXPropertyList propList; -! if (attributeBits & WPS_SUPERSCRIPT_BIT) { -! WPXString sSuperScript("super "); -! sSuperScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT)); -! sSuperScript.append("%"); -! propList.insert("style:text-position", sSuperScript); -! } -! else if (attributeBits & WPS_SUBSCRIPT_BIT) { -! WPXString sSubScript("sub "); -! sSubScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT)); -! sSubScript.append("%"); -! propList.insert("style:text-position", sSubScript); -! } - if (attributeBits & WPS_ITALICS_BIT) - propList.insert("fo:font-style", "italic"); - if (attributeBits & WPS_BOLD_BIT) ---- 599,608 ---- - } - - WPXPropertyList propList; -! if (m_ps->m_textAttributeBits & WPS_SUPERSCRIPT_BIT) -! propList.insert("style:text-position", "super 58%"); -! else if (m_ps->m_textAttributeBits & WPS_SUBSCRIPT_BIT) -! propList.insert("style:text-position", "sub 58%"); - if (attributeBits & WPS_ITALICS_BIT) - propList.insert("fo:font-style", "italic"); - if (attributeBits & WPS_BOLD_BIT) diff --git a/libwps/libwps-0.2.0.patch b/libwps/libwps-0.2.0.patch deleted file mode 100644 index 6af2989..0000000 --- a/libwps/libwps-0.2.0.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up misc/build/libwps-0.2.0/src/lib/libwps_internal.h.old misc/build/libwps-0.2.0/src/lib/libwps_internal.h ---- misc/build/libwps-0.2.0/src/lib/libwps_internal.h.old 2010-11-17 20:47:23.288507198 +0100 -+++ misc/build/libwps-0.2.0/src/lib/libwps_internal.h 2010-11-17 20:47:26.596839807 +0100 -@@ -23,6 +23,7 @@ - #define LIBWPS_INTERNAL_H - #ifdef DEBUG - #include <bitset> -+#include <stdio.h> - #endif - #include <libwpd-stream/libwpd-stream.h> - #include <libwpd/libwpd.h> diff --git a/libwps/makefile.mk b/libwps/makefile.mk index 3f9667b..7d0ec2d 100644 --- a/libwps/makefile.mk +++ b/libwps/makefile.mk @@ -49,13 +49,11 @@ INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd-stream .ENDIF -TARFILE_NAME=libwps-0.2.0 -TARFILE_MD5=9e436bff44c60dc8b97cba0c7fc11a5c +TARFILE_NAME=libwps-0.2.1 +TARFILE_MD5=83d4029aebf290c0a9a8fee9c99638d3 BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) BUILD_DIR=src/lib -PATCH_FILES=libwps-0.2.0.patch - # --- Targets ------------------------------------------------------ .INCLUDE : set_ext.mk |