[Libreoffice-commits] .: 2 commits - libwpd/libwpd-0.9.4-warning.patch libwpd/UnpackedTarball_wpd.mk libwpg/libwpg-0.2.1-warning.patch libwpg/UnpackedTarball_wpg.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 10 03:03:07 PDT 2012


 libwpd/UnpackedTarball_wpd.mk     |    2 
 libwpd/libwpd-0.9.4-warning.patch |   74 +++++++++++++++++
 libwpg/UnpackedTarball_wpg.mk     |    6 +
 libwpg/libwpg-0.2.1-warning.patch |  161 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 243 insertions(+)

New commits:
commit d4419806c8f4633f99ec54f564930f1932cf4549
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 10 12:02:23 2012 +0200

    libwpg: -Werror,-Wparentheses -Werror,-Wunused-private-field
    
    Change-Id: I259cce0728183b97059ac4b8f6bb67a9de64ee93

diff --git a/libwpg/UnpackedTarball_wpg.mk b/libwpg/UnpackedTarball_wpg.mk
index 00c127c..a5e1746 100644
--- a/libwpg/UnpackedTarball_wpg.mk
+++ b/libwpg/UnpackedTarball_wpg.mk
@@ -11,4 +11,10 @@ $(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: -Werror,-Wparentheses,
+#  -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
new file mode 100644
index 0000000..67a3d96
--- /dev/null
+++ b/libwpg/libwpg-0.2.1-warning.patch
@@ -0,0 +1,161 @@
+--- 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;
+ };
+ 
commit dae6ac07d49e530fff93c4f2bf5df969f5c6a97d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 10 12:01:18 2012 +0200

    libwpd: -Werror,-Wunused-private-field
    
    Change-Id: I25f4235d9d60346882526189e57021639a481cbe

diff --git a/libwpd/UnpackedTarball_wpd.mk b/libwpd/UnpackedTarball_wpd.mk
index a2cdbd8..fd5269a 100644
--- a/libwpd/UnpackedTarball_wpd.mk
+++ b/libwpd/UnpackedTarball_wpd.mk
@@ -13,6 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,wpd,$(WPD_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,wpd,\
 	libwpd/libwpd-0.9.4.patch \
+	libwpd/libwpd-0.9.4-warning.patch \
 ))
+# libwpd/libwpd-0.9.4-warning.patch: -Werror,-Wunused-private-field
 
 # vim: set noet sw=4 ts=4:
diff --git a/libwpd/libwpd-0.9.4-warning.patch b/libwpd/libwpd-0.9.4-warning.patch
new file mode 100644
index 0000000..d588e41
--- /dev/null
+++ b/libwpd/libwpd-0.9.4-warning.patch
@@ -0,0 +1,74 @@
+--- misc/libwpd-0.9.4/src/lib/WP6ContentListener.h
++++ misc/build/libwpd-0.9.4/src/lib/WP6ContentListener.h
+@@ -53,7 +53,7 @@ const int STATE_MEMORY = 3;
+ class WP6StyleStateSequence
+ {
+ public:
+-	WP6StyleStateSequence() : m_stateSequence(), m_currentState(), m_previousState()
++	WP6StyleStateSequence() : m_stateSequence()
+ 	{
+ 		clear();
+ 	}
+@@ -64,11 +64,11 @@ public:
+ 	}
+ 	WP6StyleState getCurrentState() const
+ 	{
+-		return m_stateSequence[0]; /*currentState;*/
++		return m_stateSequence[0];
+ 	}
+ 	WP6StyleState getPreviousState() const
+ 	{
+-		return m_stateSequence[1]; /*m_previousState;*/
++		return m_stateSequence[1];
+ 	}
+ 	void clear()
+ 	{
+@@ -78,8 +78,6 @@ public:
+ 
+ private:
+ 	std::vector<WP6StyleState> m_stateSequence;
+-	WP6StyleState m_currentState;
+-	WP6StyleState m_previousState;
+ };
+ 
+ typedef struct _WP6ContentParsingState WP6ContentParsingState;
+--- misc/libwpd-0.9.4/src/lib/WP6OutlineStylePacket.cpp
++++ misc/build/libwpd-0.9.4/src/lib/WP6OutlineStylePacket.cpp
+@@ -31,7 +31,6 @@
+ WP6OutlineStylePacket::WP6OutlineStylePacket(WPXInputStream *input, WPXEncryption *encryption, int /* id */, uint32_t dataOffset, uint32_t dataSize) :
+ 	WP6PrefixDataPacket(input, encryption),
+ 	m_numPIDs(0),
+-	m_nonDeletableInfoSize(0),
+ 	m_outlineHash(0),
+ 	m_outlineFlags(0),
+ 	m_tabBehaviourFlag(0)
+--- misc/libwpd-0.9.4/src/lib/WP6OutlineStylePacket.h
++++ misc/build/libwpd-0.9.4/src/lib/WP6OutlineStylePacket.h
+@@ -40,7 +40,6 @@ public:
+ 
+ private:
+ 	uint16_t m_numPIDs;
+-	uint16_t m_nonDeletableInfoSize;
+ 	uint16_t m_outlineHash;
+ 	uint8_t m_numberingMethods[WP6_NUM_LIST_LEVELS];
+ 	uint8_t m_outlineFlags;
+--- misc/libwpd-0.9.4/src/lib/WP6PageGroup.cpp
++++ misc/build/libwpd-0.9.4/src/lib/WP6PageGroup.cpp
+@@ -33,7 +33,6 @@
+ WP6PageGroup::WP6PageGroup(WPXInputStream *input, WPXEncryption *encryption) :
+ 	WP6VariableLengthGroup(),
+ 	m_margin(0),
+-	m_marginType(0),
+ 	m_suppressedCode(0),
+ 	m_pageNumberTypefaceDesc(0),
+ 	m_pageNumberUseFlag(0x00),
+--- misc/libwpd-0.9.4/src/lib/WP6PageGroup.h
++++ misc/build/libwpd-0.9.4/src/lib/WP6PageGroup.h
+@@ -40,7 +40,6 @@ public:
+ private:
+ 	// variables needed for subgroup 0 and 1 (Left/Right Margin Set)
+ 	uint16_t m_margin;
+-	uint8_t m_marginType;
+ 	// variables needed for subgroup 2 (suppress page characteristics)
+ 	uint8_t m_suppressedCode;
+ 	// variables needed for subgroup 3 (page number position)


More information about the Libreoffice-commits mailing list