diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-18 15:23:28 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-18 15:45:37 +0200 |
commit | 115033fea5db45d0d14e3bcb30fb86d6b4699e06 (patch) | |
tree | 4257424a65e408ce98d76243815984634fef6520 /libwpg | |
parent | 075023b473b064e2cad84c3212602e1bb2bc9d1c (diff) |
Uploading a new long-awaited release of libwpg
Change-Id: I2ffc92c620242426da61e11c8f354f6080edbabc
Diffstat (limited to 'libwpg')
-rw-r--r-- | libwpg/ExternalPackage_libwpg.mk | 12 | ||||
-rw-r--r-- | libwpg/Module_libwpg.mk | 2 | ||||
-rw-r--r-- | libwpg/StaticLibrary_wpg.mk | 37 | ||||
-rw-r--r-- | libwpg/UnpackedTarball_wpg.mk | 9 | ||||
-rw-r--r-- | libwpg/libwpg-0.2.1-warning.patch | 161 |
5 files changed, 11 insertions, 210 deletions
diff --git a/libwpg/ExternalPackage_libwpg.mk b/libwpg/ExternalPackage_libwpg.mk index 17b37c601819..916aae1e1316 100644 --- a/libwpg/ExternalPackage_libwpg.mk +++ b/libwpg/ExternalPackage_libwpg.mk @@ -7,12 +7,20 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_ExternalPackage_ExternalPackage,libwpg_inc,wpg)) +$(eval $(call gb_ExternalPackage_ExternalPackage,libwpg,wpg)) -$(eval $(call gb_ExternalPackage_add_unpacked_files,libwpg_inc,inc/external/libwpg,\ +$(eval $(call gb_ExternalPackage_add_unpacked_files,libwpg,inc/external/libwpg,\ src/lib/libwpg.h \ src/lib/WPGPaintInterface.h \ src/lib/WPGraphics.h \ )) +$(eval $(call gb_ExternalPackage_use_external_project,libwpg,libwpg)) + +ifeq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_ExternalPackage_add_file,libwpg,lib/wpg-0.2.lib,src/lib/.libs/libwpg-0.2.lib)) +else +$(eval $(call gb_ExternalPackage_add_file,libwpg,lib/libwpg-0.2.a,src/lib/.libs/libwpg-0.2.a)) +endif + # vim: set noet sw=4 ts=4: diff --git a/libwpg/Module_libwpg.mk b/libwpg/Module_libwpg.mk index 63924c21664b..d15e01d84242 100644 --- a/libwpg/Module_libwpg.mk +++ b/libwpg/Module_libwpg.mk @@ -12,8 +12,8 @@ $(eval $(call gb_Module_Module,libwpg)) ifeq ($(SYSTEM_WPG),NO) $(eval $(call gb_Module_add_targets,libwpg,\ + ExternalProject_libwpg \ ExternalPackage_libwpg \ - StaticLibrary_wpg \ UnpackedTarball_wpg \ )) diff --git a/libwpg/StaticLibrary_wpg.mk b/libwpg/StaticLibrary_wpg.mk deleted file mode 100644 index 3cb79fe9528a..000000000000 --- a/libwpg/StaticLibrary_wpg.mk +++ /dev/null @@ -1,37 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_StaticLibrary_StaticLibrary,wpglib)) - -$(eval $(call gb_StaticLibrary_use_unpacked,wpglib,wpg)) - -$(eval $(call gb_StaticLibrary_use_package,wpglib,libwpg_inc)) - -$(eval $(call gb_StaticLibrary_use_externals,wpglib,\ - wpd \ -)) - -$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,wpglib,cpp)) - -$(eval $(call gb_StaticLibrary_set_warnings_not_errors,wpglib)) - -$(eval $(call gb_StaticLibrary_add_generated_exception_objects,wpglib,\ - UnpackedTarball/wpg/src/lib/WPG1Parser \ - UnpackedTarball/wpg/src/lib/WPG2Parser \ - UnpackedTarball/wpg/src/lib/WPGBitmap \ - UnpackedTarball/wpg/src/lib/WPGColor \ - UnpackedTarball/wpg/src/lib/WPGDashArray \ - UnpackedTarball/wpg/src/lib/WPGHeader \ - UnpackedTarball/wpg/src/lib/WPGInternalStream \ - UnpackedTarball/wpg/src/lib/WPGraphics \ - UnpackedTarball/wpg/src/lib/WPGSVGGenerator \ - UnpackedTarball/wpg/src/lib/WPGXParser \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/libwpg/UnpackedTarball_wpg.mk b/libwpg/UnpackedTarball_wpg.mk index d53cf5fef0fa..00c127c77449 100644 --- a/libwpg/UnpackedTarball_wpg.mk +++ b/libwpg/UnpackedTarball_wpg.mk @@ -11,13 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,wpg)) $(eval $(call gb_UnpackedTarball_set_tarball,wpg,$(WPG_TARBALL))) -$(eval $(call gb_UnpackedTarball_add_patches,wpg,\ - libwpg/libwpg-0.2.1-warning.patch \ -)) -# libwpg/libwpg-0.2.1-warning.patch: see upstream -# <http://libwpg.git.sourceforge.net/git/gitweb.cgi?p=libwpg/libwpg;a=commit; -# h=5cf190eb365df00a1446738b3ab0d3e55291def3> "Fix clang build" and -# <http://libwpg.git.sourceforge.net/git/gitweb.cgi?p=libwpg/libwpg;a=commit; -# h=f98c1f4308b75ccbb2b98ed8b4011b4f84e841d3> "-Werror,-Wunused-private-field" - # vim: set noet sw=4 ts=4: diff --git a/libwpg/libwpg-0.2.1-warning.patch b/libwpg/libwpg-0.2.1-warning.patch deleted file mode 100644 index 67a3d96d442f..000000000000 --- a/libwpg/libwpg-0.2.1-warning.patch +++ /dev/null @@ -1,161 +0,0 @@ ---- misc/libwpg-0.2.1/src/lib/WPG2Parser.cpp -+++ misc/build/libwpg-0.2.1/src/lib/WPG2Parser.cpp -@@ -25,6 +25,8 @@ - * Corel Corporation or Corel Corporation Limited." - */ - -+#define DUMP_BINARY_DATA 0 -+ - #include "WPG2Parser.h" - #include "WPGPaintInterface.h" - #include "libwpg_utils.h" -@@ -37,8 +39,6 @@ - #define M_PI 3.14159265358979323846 - #endif - --#define DUMP_BINARY_DATA 0 -- - #if DUMP_BINARY_DATA - #include <sstream> - #endif -@@ -237,7 +237,10 @@ WPG2Parser::WPG2Parser(WPXInputStream *i - m_dashArray(), - m_gradient(), - m_dashArrayStyles(), -- m_layerOpened(false), m_layerId(0), -+ m_layerOpened(false), -+#ifdef DEBUG -+ m_layerId(0), -+#endif - m_matrix(), - m_gradientAngle(0.0), - m_gradientRef(), -@@ -252,9 +255,10 @@ WPG2Parser::WPG2Parser(WPXInputStream *i - m_hFlipped(false), - m_vFlipped(false), - m_textData(), -- m_drawTextData(false), -- m_binaryId(0), -- m_embedded(isEmbedded) -+ m_drawTextData(false) -+#if DUMP_BINARY_DATA -+ , m_binaryId(0) -+#endif - { - m_style.insert("draw:fill", "solid"); - // default style -@@ -784,7 +788,7 @@ void WPG2Parser::handleDPPenForeColor() - unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); -- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); -+ unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); - - m_style.insert("svg:stroke-color", libwpg::WPGColor(red, green, blue, alpha).getColorString()); - m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), WPX_PERCENT); -@@ -824,7 +828,7 @@ void WPG2Parser::handleDPPenBackColor() - unsigned int red = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned int green = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned int blue = (m_doublePrecision) ? readU16()>>8 : readU8(); -- unsigned int alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); -+ unsigned int alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); - - m_penBackColor = libwpg::WPGColor(red, green, blue, alpha); - -@@ -1120,7 +1124,7 @@ void WPG2Parser::handleDPBrushForeColor( - unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); -- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); -+ unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); - WPG_DEBUG_MSG((" Foreground color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); - - m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha); -@@ -1145,7 +1149,7 @@ void WPG2Parser::handleDPBrushForeColor( - unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); - unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); -- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); -+ unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); - libwpg::WPGColor color(red, green, blue, alpha); - colors.push_back(color); - WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha)); ---- misc/libwpg-0.2.1/src/lib/WPG2Parser.h -+++ misc/build/libwpg-0.2.1/src/lib/WPG2Parser.h -@@ -242,7 +242,9 @@ private: - ::WPXPropertyListVector m_gradient; - std::map<unsigned int,libwpg::WPGDashArray> m_dashArrayStyles; - bool m_layerOpened; -+#ifdef DEBUG - unsigned int m_layerId; -+#endif - WPG2TransformMatrix m_matrix; - double m_gradientAngle; - ::WPXPropertyList m_gradientRef; -@@ -260,9 +262,9 @@ private: - - class ObjectCharacterization; - void parseCharacterization(ObjectCharacterization*); -+#if DUMP_BINARY_DATA - unsigned m_binaryId; -- -- bool m_embedded; -+#endif - }; - - #endif // __WPG2PARSER_H__ ---- misc/libwpg-0.2.1/src/lib/WPGHeader.cpp -+++ misc/build/libwpg-0.2.1/src/lib/WPGHeader.cpp -@@ -50,12 +50,7 @@ WPGHeader::WPGHeader() : - m_majorVersion(0x02), - m_minorVersion(0x00), - m_encryptionKey(0x00), -- m_startOfPacketData(0), -- m_entryCount(0), -- m_resourceComplete(0), -- m_encryptionBlockOffset(0), -- m_fileSize(0), -- m_encryptVersion(0) -+ m_startOfPacketData(0) - { - m_identifier[0] = 0xff; - m_identifier[1] = 'W'; ---- misc/libwpg-0.2.1/src/lib/WPGHeader.h -+++ misc/build/libwpg-0.2.1/src/lib/WPGHeader.h -@@ -51,11 +51,6 @@ private: - unsigned char m_minorVersion; // 0 for WPG 8.0 files - unsigned int m_encryptionKey; // 0 when not encrypted - unsigned int m_startOfPacketData; // unused, since according to the docs no packets are defined -- unsigned char m_entryCount; // number of entries in extension -- unsigned char m_resourceComplete; // resource completeness indicator -- unsigned int m_encryptionBlockOffset; // encryption block offset -- unsigned long m_fileSize; // size of the entire wpg file -- unsigned int m_encryptVersion; // encryption version information - }; - - #endif // WPGHEADER ---- misc/libwpg-0.2.1/src/lib/WPGXParser.h -+++ misc/build/libwpg-0.2.1/src/lib/WPGXParser.h -@@ -62,12 +62,7 @@ class WPGTextDataHandler : public ::WPXD - public: - WPGTextDataHandler(libwpg::WPGPaintInterface* painter) : - m_painter(painter), -- m_x(0.0), -- m_y(0.0), -- m_width(0.0), -- m_height(0.0), - m_fontName("Times New Roman"), -- m_fontSize(12.0), - m_paragraphStyle(), - m_textStyle() {} - -@@ -140,9 +135,7 @@ public: - - private: - libwpg::WPGPaintInterface *m_painter; -- double m_x, m_y, m_width, m_height; - ::WPXString m_fontName; -- double m_fontSize; - ::WPXPropertyList m_paragraphStyle, m_textStyle; - }; - |