diff options
Diffstat (limited to 'libwps')
-rw-r--r-- | libwps/libwps-0.2.1-warnings.patch | 60 | ||||
-rw-r--r-- | libwps/libwps-0.2.1.patch | 28 | ||||
-rw-r--r-- | libwps/makefile.mk | 63 | ||||
-rw-r--r-- | libwps/prj/build.lst | 3 | ||||
-rw-r--r-- | libwps/prj/d.lst | 5 |
5 files changed, 159 insertions, 0 deletions
diff --git a/libwps/libwps-0.2.1-warnings.patch b/libwps/libwps-0.2.1-warnings.patch new file mode 100644 index 000000000000..fffffd52ee80 --- /dev/null +++ b/libwps/libwps-0.2.1-warnings.patch @@ -0,0 +1,60 @@ +--- misc/libwps-0.2.1/src/lib/WPS8.cpp 2011-04-05 11:25:15.000000000 +0200 ++++ misc/build/libwps-0.2.1/src/lib/WPS8.cpp 2011-05-03 15:02:21.107349347 +0200 +@@ -136,7 +136,7 @@ + input->seek(pos->second.offset, WPX_SEEK_SET); + n_streams = readU32(input); + +- if (n_streams > 100) WPS_DEBUG_MSG(("Probably garbled STRS: count = %u\n",n_streams)); ++ if (n_streams > 100) { WPS_DEBUG_MSG(("Probably garbled STRS: count = %u\n",n_streams)); } + + /* skip mysterious header*/ + input->seek(8, WPX_SEEK_CUR); +@@ -155,7 +155,7 @@ + last_pos += offset; + } + offset = readU32(input); +- if (offset) WPS_DEBUG_MSG(("Offset table is not 0-terminated!\n")); ++ if (offset) { WPS_DEBUG_MSG(("Offset table is not 0-terminated!\n")); } + + for (unsigned i=0; i < n_streams; i++) { + uint16_t len; +@@ -325,7 +325,7 @@ + * + */ + +-void WPS8Parser::readText(WPXInputStream * input, WPS8ContentListener *listener) ++void WPS8Parser::readText(WPXInputStream * /* input */, WPS8ContentListener * /* listener */) + { + #if (0) + WPS_DEBUG_MSG(("WPS8Parser::readText()\n")); +@@ -1356,7 +1356,7 @@ + id += 4; + t_rem -= 4; + +- if (t_count < 0 && t_count > 20) break; /* obviously wrong */ ++ if (t_count > 20) break; /* obviously wrong */ + } else break; /* wrong format */ + } + +--- misc/libwps-0.2.1/src/lib/WPSContentListener.cpp 2011-04-04 21:56:29.000000000 +0200 ++++ misc/build/libwps-0.2.1/src/lib/WPSContentListener.cpp 2011-05-03 15:02:21.837414573 +0200 +@@ -621,7 +621,7 @@ + _closeParagraph(); + } + +-const uint16_t WPSContentListener::getSpec() const ++uint16_t WPSContentListener::getSpec() const + { + return m_ps->m_spec; + } +--- misc/libwps-0.2.1/src/lib/WPSContentListener.h 2011-04-04 21:30:56.000000000 +0200 ++++ misc/build/libwps-0.2.1/src/lib/WPSContentListener.h 2011-05-03 15:02:23.334548336 +0200 +@@ -154,7 +154,7 @@ + + void insertEOL(); + +- const uint16_t getSpec() const; ++ uint16_t getSpec() const; + protected: + WPSContentListener(std::list<WPSPageSpan> &pageList, WPXDocumentInterface *documentInterface); + virtual ~WPSContentListener(); diff --git a/libwps/libwps-0.2.1.patch b/libwps/libwps-0.2.1.patch new file mode 100644 index 000000000000..a70812dd568a --- /dev/null +++ b/libwps/libwps-0.2.1.patch @@ -0,0 +1,28 @@ +--- misc/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-04-04 21:53:42.000000000 +0200 ++++ misc/build/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-05-03 14:50:56.146147538 +0200 +@@ -79,18 +79,15 @@ + {0x419,"ru-RU"} + }; + +-static int _ltcomp(const void *k1, const void *k2) +-{ +- int r = (int)((ssize_t)k1) - ((_lange*)k2)->id; +- return r; +-} +- + std::string getLangFromLCID(uint32_t lcid) + { +- _lange *c = (_lange*) bsearch((const void*)lcid,s_lang_table, +- sizeof(s_lang_table)/sizeof(_lange), +- sizeof(_lange),_ltcomp); +- if (c) return c->name; ++ unsigned i = 0; ++ ++ for (i=0; i < sizeof(s_lang_table)/sizeof(s_lang_table[0]); i++) ++ { ++ if (s_lang_table[i].id == lcid) ++ return s_lang_table[i].name; ++ } + return "-none-"; + } + diff --git a/libwps/makefile.mk b/libwps/makefile.mk new file mode 100644 index 000000000000..edb36cd08f5b --- /dev/null +++ b/libwps/makefile.mk @@ -0,0 +1,63 @@ +#************************************************************************* +# +# 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=wps +TARGET=wps + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +.IF "$(SYSTEM_LIBWPS)" == "YES" +@all: + @echo "Using system libwps..." +.ENDIF + +# libwps depends on the libwpd framework +.IF "$(SYSTEM_LIBWPD)" == "YES" +INCPRE+=$(LIBWPD_CFLAGS) +.ELSE +INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd +INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd-stream +.ENDIF + +TARFILE_NAME=libwps-0.2.1 +TARFILE_MD5=83d4029aebf290c0a9a8fee9c99638d3 +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) +BUILD_DIR=src/lib + +PATCH_FILES=libwps-0.2.1.patch libwps-0.2.1-warnings.patch + +# --- Targets ------------------------------------------------------ + +.INCLUDE : set_ext.mk +.INCLUDE : target.mk +.INCLUDE : tg_ext.mk diff --git a/libwps/prj/build.lst b/libwps/prj/build.lst new file mode 100644 index 000000000000..85004e1c9759 --- /dev/null +++ b/libwps/prj/build.lst @@ -0,0 +1,3 @@ +lwps libwps : LIBWPD:libwpd soltools NULL +lwps libwps usr1 - all lwps_mkout NULL +lwps libwps nmake - all lwps_libwps NULL diff --git a/libwps/prj/d.lst b/libwps/prj/d.lst new file mode 100644 index 000000000000..a71985a7ae1a --- /dev/null +++ b/libwps/prj/d.lst @@ -0,0 +1,5 @@ +mkdir: %_DEST%\inc%_EXT%\libwps +..\%__SRC%\misc\build\libwps*\src\lib\libwps.h %_DEST%\inc%_EXT%\libwps\ +..\%__SRC%\misc\build\libwps*\src\lib\WPSDocument.h %_DEST%\inc%_EXT%\libwps\ +..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a +..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib |