Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / libwpg / libwpg-0.2.1-warning.patch
blob67a3d96d442f4f7a36aca0f0ca9fb0c8fcde2ccb
1 --- misc/libwpg-0.2.1/src/lib/WPG2Parser.cpp
2 +++ misc/build/libwpg-0.2.1/src/lib/WPG2Parser.cpp
3 @@ -25,6 +25,8 @@
4 * Corel Corporation or Corel Corporation Limited."
5 */
7 +#define DUMP_BINARY_DATA 0
9 #include "WPG2Parser.h"
10 #include "WPGPaintInterface.h"
11 #include "libwpg_utils.h"
12 @@ -37,8 +39,6 @@
13 #define M_PI 3.14159265358979323846
14 #endif
16 -#define DUMP_BINARY_DATA 0
18 #if DUMP_BINARY_DATA
19 #include <sstream>
20 #endif
21 @@ -237,7 +237,10 @@ WPG2Parser::WPG2Parser(WPXInputStream *i
22 m_dashArray(),
23 m_gradient(),
24 m_dashArrayStyles(),
25 - m_layerOpened(false), m_layerId(0),
26 + m_layerOpened(false),
27 +#ifdef DEBUG
28 + m_layerId(0),
29 +#endif
30 m_matrix(),
31 m_gradientAngle(0.0),
32 m_gradientRef(),
33 @@ -252,9 +255,10 @@ WPG2Parser::WPG2Parser(WPXInputStream *i
34 m_hFlipped(false),
35 m_vFlipped(false),
36 m_textData(),
37 - m_drawTextData(false),
38 - m_binaryId(0),
39 - m_embedded(isEmbedded)
40 + m_drawTextData(false)
41 +#if DUMP_BINARY_DATA
42 + , m_binaryId(0)
43 +#endif
45 m_style.insert("draw:fill", "solid");
46 // default style
47 @@ -784,7 +788,7 @@ void WPG2Parser::handleDPPenForeColor()
48 unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
49 unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
50 unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
51 - unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
52 + unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8());
54 m_style.insert("svg:stroke-color", libwpg::WPGColor(red, green, blue, alpha).getColorString());
55 m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), WPX_PERCENT);
56 @@ -824,7 +828,7 @@ void WPG2Parser::handleDPPenBackColor()
57 unsigned int red = (m_doublePrecision) ? readU16()>>8 : readU8();
58 unsigned int green = (m_doublePrecision) ? readU16()>>8 : readU8();
59 unsigned int blue = (m_doublePrecision) ? readU16()>>8 : readU8();
60 - unsigned int alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
61 + unsigned int alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8());
63 m_penBackColor = libwpg::WPGColor(red, green, blue, alpha);
65 @@ -1120,7 +1124,7 @@ void WPG2Parser::handleDPBrushForeColor(
66 unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
67 unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
68 unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
69 - unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
70 + unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8());
71 WPG_DEBUG_MSG((" Foreground color (RGBA): %d %d %d %d\n", red, green, blue, alpha));
73 m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha);
74 @@ -1145,7 +1149,7 @@ void WPG2Parser::handleDPBrushForeColor(
75 unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
76 unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
77 unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
78 - unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
79 + unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8());
80 libwpg::WPGColor color(red, green, blue, alpha);
81 colors.push_back(color);
82 WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha));
83 --- misc/libwpg-0.2.1/src/lib/WPG2Parser.h
84 +++ misc/build/libwpg-0.2.1/src/lib/WPG2Parser.h
85 @@ -242,7 +242,9 @@ private:
86 ::WPXPropertyListVector m_gradient;
87 std::map<unsigned int,libwpg::WPGDashArray> m_dashArrayStyles;
88 bool m_layerOpened;
89 +#ifdef DEBUG
90 unsigned int m_layerId;
91 +#endif
92 WPG2TransformMatrix m_matrix;
93 double m_gradientAngle;
94 ::WPXPropertyList m_gradientRef;
95 @@ -260,9 +262,9 @@ private:
97 class ObjectCharacterization;
98 void parseCharacterization(ObjectCharacterization*);
99 +#if DUMP_BINARY_DATA
100 unsigned m_binaryId;
102 - bool m_embedded;
103 +#endif
106 #endif // __WPG2PARSER_H__
107 --- misc/libwpg-0.2.1/src/lib/WPGHeader.cpp
108 +++ misc/build/libwpg-0.2.1/src/lib/WPGHeader.cpp
109 @@ -50,12 +50,7 @@ WPGHeader::WPGHeader() :
110 m_majorVersion(0x02),
111 m_minorVersion(0x00),
112 m_encryptionKey(0x00),
113 - m_startOfPacketData(0),
114 - m_entryCount(0),
115 - m_resourceComplete(0),
116 - m_encryptionBlockOffset(0),
117 - m_fileSize(0),
118 - m_encryptVersion(0)
119 + m_startOfPacketData(0)
121 m_identifier[0] = 0xff;
122 m_identifier[1] = 'W';
123 --- misc/libwpg-0.2.1/src/lib/WPGHeader.h
124 +++ misc/build/libwpg-0.2.1/src/lib/WPGHeader.h
125 @@ -51,11 +51,6 @@ private:
126 unsigned char m_minorVersion; // 0 for WPG 8.0 files
127 unsigned int m_encryptionKey; // 0 when not encrypted
128 unsigned int m_startOfPacketData; // unused, since according to the docs no packets are defined
129 - unsigned char m_entryCount; // number of entries in extension
130 - unsigned char m_resourceComplete; // resource completeness indicator
131 - unsigned int m_encryptionBlockOffset; // encryption block offset
132 - unsigned long m_fileSize; // size of the entire wpg file
133 - unsigned int m_encryptVersion; // encryption version information
136 #endif // WPGHEADER
137 --- misc/libwpg-0.2.1/src/lib/WPGXParser.h
138 +++ misc/build/libwpg-0.2.1/src/lib/WPGXParser.h
139 @@ -62,12 +62,7 @@ class WPGTextDataHandler : public ::WPXD
140 public:
141 WPGTextDataHandler(libwpg::WPGPaintInterface* painter) :
142 m_painter(painter),
143 - m_x(0.0),
144 - m_y(0.0),
145 - m_width(0.0),
146 - m_height(0.0),
147 m_fontName("Times New Roman"),
148 - m_fontSize(12.0),
149 m_paragraphStyle(),
150 m_textStyle() {}
152 @@ -140,9 +135,7 @@ public:
154 private:
155 libwpg::WPGPaintInterface *m_painter;
156 - double m_x, m_y, m_width, m_height;
157 ::WPXString m_fontName;
158 - double m_fontSize;
159 ::WPXPropertyList m_paragraphStyle, m_textStyle;