summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c8e503)
raw | patch | inline | side by side (parent: 5c8e503)
| author | joncruz <joncruz@users.sourceforge.net> | |
| Mon, 2 Oct 2006 08:34:42 +0000 (08:34 +0000) | ||
| committer | joncruz <joncruz@users.sourceforge.net> | |
| Mon, 2 Oct 2006 08:34:42 +0000 (08:34 +0000) |
diff --git a/src/extension/internal/libwpg/WPG1Parser.cpp b/src/extension/internal/libwpg/WPG1Parser.cpp
index 372aa052cfe94bcb08e6de4ae819fa91ea5d6626..9f4a05148082938e856002c244f5aa4b54e3c843 100644 (file)
int recordType = readU8();
int length = readVariableLengthInteger();
long nextPos = m_input->tell() + length;
+#if !defined(DEBUG)
+ (void)recordPos;
+#endif // !defined(DEBUG)
// search function to handler this record
int index = -1;
{
unsigned char version = readU8();
unsigned char bitFlags = readU8();
+ (void)version;
+ (void)bitFlags;
m_width = readU16();
m_height = readU16();
unsigned numEntries = readU16();
WPG_DEBUG_MSG(("Colormap\n"));
- for(int i = 0; i < numEntries; i++)
+ for(int i = 0; i < static_cast<int>(numEntries); i++)
{
WPGColor color;
color.red = readU8();
diff --git a/src/extension/internal/libwpg/WPG2Parser.cpp b/src/extension/internal/libwpg/WPG2Parser.cpp
index 8b6a4a674e53193dde77fc6d0be28c9ead1ccd0b..e0b642f0ed5fc0c20309803c0aacce059abce467 100644 (file)
rotate(false),
hasObjectId(false),
editLock(false),
- objectId(0),
- lockFlags(0),
windingRule(false),
filled(false),
closed(false),
framed(true),
+ objectId(0),
+ lockFlags(0),
rotationAngle(0),
sxcos(0),
sycos(0),
int extension = readVariableLengthInteger();
int length = readVariableLengthInteger();
long nextPos = m_input->tell() + length;
+#if !defined(DEBUG)
+ (void)recordPos;
+ (void)recordClass;
+#endif // !defined(DEBUG)
// inside a subgroup, one less sub record
if(!m_groupStack.empty())
return m_success;
}
+#if defined(DEBUG)
static const char* describePrecision(unsigned char precision)
{
const char* result = "Unknown";
}
return result;
}
+#endif // defined(DEBUG)
#define TO_DOUBLE(x) ( (m_doublePrecision) ? ((double)(x)/65536.0) : (double)(x) )
#define TRANSFORM_XY(x,y) { m_matrix.transform((x),(y)); (x)-= m_xofs; (y)-= m_yofs; (y)=m_height-(y); }
long viewportY1 = (m_doublePrecision) ? readS32() : readS16();
long viewportX2 = (m_doublePrecision) ? readS32() : readS16();
long viewportY2 = (m_doublePrecision) ? readS32() : readS16();
+#if !defined(DEBUG)
+ (void)viewportX1;
+ (void)viewportY1;
+ (void)viewportX2;
+ (void)viewportY2;
+#endif // !defined(DEBUG)
long imageX1 = (m_doublePrecision) ? readS32() : readS16();
long imageY1 = (m_doublePrecision) ? readS32() : readS16();
// create default pen styles
int styleNo = 0;
- for(int i = 0; i < sizeof(WPG2_defaultPenDashes)/sizeof(WPG2_defaultPenDashes[0]);)
+ for(int i = 0; i < static_cast<int>(sizeof(WPG2_defaultPenDashes)/sizeof(WPG2_defaultPenDashes[0]));)
{
int segments = 2 * WPG2_defaultPenDashes[i++];
if(segments == 0) break;
unsigned startIndex = readU16();
unsigned numEntries = readU16();
- for(int i = 0; i < numEntries; i++)
+ for(int i = 0; i < static_cast<int>(numEntries); i++)
{
WPGColor color;
color.red = readU16() >> 8 ;
unsigned flag = readU16();
bool granular = (flag & (1<<6)) == 1;
bool anchor = (flag & (1<<7)) == 1;
+#if !defined(DEBUG)
+ (void)granular;
+ (void)anchor;
+#endif // !defined(DEBUG)
// TODO: get gradient extent
unsigned flag = readU16();
bool granular = (flag & (1<<6)) == 1;
bool anchor = (flag & (1<<7)) == 1;
+#if !defined(DEBUG)
+ (void)granular;
+ (void)anchor;
+#endif // !defined(DEBUG)
// TODO: get gradient extent (in double precision)
void WPG2Parser::handleBrushPattern()
{
unsigned int pattern = readU16();
+#if !defined(DEBUG)
+ (void)pattern;
+#endif // !defined(DEBUG)
// TODO
WPGPointArray vertices;
WPGPointArray controlPoints;
- for(int i = 0; i < count; i++ )
+ for(int i = 0; i < static_cast<int>(count); i++ )
{
long ix = (m_doublePrecision) ? readS32() : readS16();
long iy = (m_doublePrecision) ? readS32() : readS16();
diff --git a/src/extension/internal/libwpg/WPGPaintInterface.h b/src/extension/internal/libwpg/WPGPaintInterface.h
index 71f4a7adf9478de197084f4bd25187fe59777ebe..7866bd44817da9499ac5fb0ed1924049b13983aa 100644 (file)
class WPGPaintInterface {
public:
+ virtual ~WPGPaintInterface() {}
// none of the other callback functions will be called before this function is called
virtual void startDocument(double width, double height) = 0;
index 1b6a46c0aebb0f646a60b3bb7962704c1ed92e21..781c698547d1b9bd87f0a3dc2b91cb1e8de8a660 100644 (file)
class WPGInputStream
{
public:
+ virtual ~WPGInputStream() {}
virtual unsigned char getc() = 0;
virtual long read(long n, char* buffer) = 0;
virtual long tell() = 0;
diff --git a/src/extension/internal/libwpg/WPGXParser.h b/src/extension/internal/libwpg/WPGXParser.h
index d98fd0ba4302ac5d79912dc0ba9de62d696418fc..71c78d2c0c44e1aa55040eefcc8e0d0e25ebf69f 100644 (file)
{\r
public:\r
WPGXParser(WPGInputStream *input, WPGPaintInterface* painter);\r
+ virtual ~WPGXParser() {}\r
virtual bool parse() = 0;\r
\r
unsigned char readU8();\r