summaryrefslogtreecommitdiff
path: root/libwpd
diff options
context:
space:
mode:
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.mk57
-rw-r--r--libwpd/prj/build.lst3
-rw-r--r--libwpd/prj/d.lst15
6 files changed, 225 insertions, 0 deletions
diff --git a/libwpd/libwpd.corruptedprefix.patch b/libwpd/libwpd.corruptedprefix.patch
new file mode 100644
index 000000000000..9d5288d0515d
--- /dev/null
+++ b/libwpd/libwpd.corruptedprefix.patch
@@ -0,0 +1,107 @@
+--- 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
new file mode 100644
index 000000000000..e5e41a0ddf06
--- /dev/null
+++ b/libwpd/libwpd.gcc460.patch
@@ -0,0 +1,11 @@
+--- 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
new file mode 100644
index 000000000000..ebc86dc93ca5
--- /dev/null
+++ b/libwpd/libwpd.warnings.patch
@@ -0,0 +1,32 @@
+--- 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
new file mode 100644
index 000000000000..6ecbbfaddacd
--- /dev/null
+++ b/libwpd/makefile.mk
@@ -0,0 +1,57 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=.
+
+PRJNAME=wpd
+TARGET=wpd
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(SYSTEM_LIBWPD)" == "YES"
+@all:
+ @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
+BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
+BUILD_DIR=src$/lib
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+
diff --git a/libwpd/prj/build.lst b/libwpd/prj/build.lst
new file mode 100644
index 000000000000..1da425b02ab3
--- /dev/null
+++ b/libwpd/prj/build.lst
@@ -0,0 +1,3 @@
+lw libwpd : soltools NULL
+lw libwpd usr1 - all lw_mkout NULL
+lw libwpd nmake - all lw_libwpd NULL
diff --git a/libwpd/prj/d.lst b/libwpd/prj/d.lst
new file mode 100644
index 000000000000..ef6944359362
--- /dev/null
+++ b/libwpd/prj/d.lst
@@ -0,0 +1,15 @@
+mkdir: %_DEST%\inc%_EXT%\libwpd
+mkdir: %_DEST%\inc%_EXT%\libwpd-stream
+..\%__SRC%\misc\build\libwpd*\src\lib\libwpd.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPDocument.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXBinaryData.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXDocumentInterface.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXProperty.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXPropertyList.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXString.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXPropertyListVector.h %_DEST%\inc%_EXT%\libwpd\
+..\%__SRC%\misc\build\libwpd*\src\lib\libwpd-stream.h %_DEST%\inc%_EXT%\libwpd-stream\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXStream.h %_DEST%\inc%_EXT%\libwpd-stream\
+..\%__SRC%\misc\build\libwpd*\src\lib\WPXStreamImplementation.h %_DEST%\inc%_EXT%\libwpd-stream\
+..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
+..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib