View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012782 | Scribus | General | public | 2014-10-21 19:51 | 2015-02-23 19:04 |
| Reporter | Kunda | Assigned To | fschmid | ||
| Priority | normal | Severity | minor | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.5.0svn | ||||
| Target Version | 1.5.0 | Fixed in Version | 1.5.0svn | ||
| Summary | 0012782: Upgrade libwpg 3rd party code | ||||
| Description | As per MrB on IRC Moving all wpg patches in to this ticket and suggesting to upgrade libwpg | ||||
| Tags | No tags attached. | ||||
| Attached Files | 0012-wpg-size_t-is-unsigned-can-never-be-less-than-0.patch (974 bytes)
From a1db3492eac758c25921a27bab5b1fe0e7e1c45c Mon Sep 17 00:00:00 2001 From: Christian Hitz <christian@klarinett.li> Date: Fri, 19 Sep 2014 11:10:28 +0200 Subject: [PATCH 12/17] wpg: size_t is unsigned; can never be less than 0 --- scribus/third_party/wpg/WPGStreamImplementation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scribus/third_party/wpg/WPGStreamImplementation.cpp b/scribus/third_party/wpg/WPGStreamImplementation.cpp index 308bf94..4d783f7 100644 --- a/scribus/third_party/wpg/WPGStreamImplementation.cpp +++ b/scribus/third_party/wpg/WPGStreamImplementation.cpp @@ -325,7 +325,7 @@ const uint8_t *WPGMemoryStream::read(size_t numBytes, size_t &numBytesRead) if (0 == numBytes) return 0; - if (numBytes < 0 || atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2) + if (atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2) return 0; unsigned long curpos = d->buffer.tellg(); -- 2.1.0 0013-wpg-silence-warning-about-unused-cell-variable.patch (852 bytes)
From ed65cee88a9ba3ca7ed05acaa769882bd73da5cf Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:10:59 +0200
Subject: [PATCH 13/17] wpg: silence warning about unused cell variable
---
scribus/third_party/wpg/WPG1Parser.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/scribus/third_party/wpg/WPG1Parser.cpp b/scribus/third_party/wpg/WPG1Parser.cpp
index 0465077..ff1451a 100644
--- a/scribus/third_party/wpg/WPG1Parser.cpp
+++ b/scribus/third_party/wpg/WPG1Parser.cpp
@@ -654,6 +654,7 @@ void WPG1Parser::fillPixels(libwpg::WPGBitmap& bitmap, const unsigned char* buff
for(unsigned y = 0; y < height; y++)
{
libwpg::WPGColor color = bitmap.pixel(x,y);
+ (void)color;
WPG_DEBUG_MSG((" pixel at %d, %d: %3d %3d %3d\n", x, y, color.red, color.green, color.blue));
}
}
--
2.1.0
0014-wpg-remove-unused-m_binaryId.patch (1,180 bytes)
From 266c3058c165a7fa750131de7b5fe40a3dde3516 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:11:29 +0200
Subject: [PATCH 14/17] wpg: remove unused m_binaryId
---
scribus/third_party/wpg/WPG2Parser.cpp | 3 +--
scribus/third_party/wpg/WPG2Parser.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/scribus/third_party/wpg/WPG2Parser.cpp b/scribus/third_party/wpg/WPG2Parser.cpp
index 9c731be..c9d5108 100644
--- a/scribus/third_party/wpg/WPG2Parser.cpp
+++ b/scribus/third_party/wpg/WPG2Parser.cpp
@@ -230,8 +230,7 @@ WPG2Parser::WPG2Parser(WPXInputStream *input, libwpg::WPGPaintInterface* painter
m_bitmap(),
m_binaryData(),
m_hFlipped(false),
- m_vFlipped(false),
- m_binaryId(0)
+ m_vFlipped(false)
{
}
diff --git a/scribus/third_party/wpg/WPG2Parser.h b/scribus/third_party/wpg/WPG2Parser.h
index c09bb71..6f05141 100644
--- a/scribus/third_party/wpg/WPG2Parser.h
+++ b/scribus/third_party/wpg/WPG2Parser.h
@@ -225,7 +225,6 @@ private:
class ObjectCharacterization;
void parseCharacterization(ObjectCharacterization*);
- unsigned m_binaryId;
};
#endif // __WPG2PARSER_H__
--
2.1.0
0015-wpg-WPGHeader-comment-unused-fields.patch (2,363 bytes)
From cefbc530bdaaf3d6169043016a6dcbdb319c1f7b Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:12:01 +0200
Subject: [PATCH 15/17] wpg: WPGHeader: comment unused fields
---
scribus/third_party/wpg/WPGHeader.cpp | 12 ++++++------
scribus/third_party/wpg/WPGHeader.h | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/scribus/third_party/wpg/WPGHeader.cpp b/scribus/third_party/wpg/WPGHeader.cpp
index dc36e54..215064d 100644
--- a/scribus/third_party/wpg/WPGHeader.cpp
+++ b/scribus/third_party/wpg/WPGHeader.cpp
@@ -50,12 +50,12 @@ 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_entryCount(0),
+// m_resourceComplete(0),
+// m_encryptionBlockOffset(0),
+// m_fileSize(0),
+// m_encryptVersion(0)
{
m_identifier[0] = 0xff;
m_identifier[1] = 'W';
diff --git a/scribus/third_party/wpg/WPGHeader.h b/scribus/third_party/wpg/WPGHeader.h
index 38cbf64..a3283d1 100644
--- a/scribus/third_party/wpg/WPGHeader.h
+++ b/scribus/third_party/wpg/WPGHeader.h
@@ -51,11 +51,11 @@ 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
+// 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
--
2.1.0
0016-wpg-WPXInputStream-remove-unused-m_supportsOLE.patch (2,356 bytes)
From 11f04aab1b969eba245db8731c7bee09030f9acb Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:12:24 +0200
Subject: [PATCH 16/17] wpg: WPXInputStream: remove unused m_supportsOLE
---
scribus/third_party/wpg/WPGInternalStream.cpp | 2 +-
scribus/third_party/wpg/WPGStreamImplementation.cpp | 4 ++--
scribus/third_party/wpg/WPXStream.h | 6 +-----
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/scribus/third_party/wpg/WPGInternalStream.cpp b/scribus/third_party/wpg/WPGInternalStream.cpp
index 696aeb8..1613b62 100644
--- a/scribus/third_party/wpg/WPGInternalStream.cpp
+++ b/scribus/third_party/wpg/WPGInternalStream.cpp
@@ -26,7 +26,7 @@
#include "WPGInternalStream.h"
WPGInternalInputStream::WPGInternalInputStream(const unsigned char *data, const size_t size) :
- WPXInputStream(false),
+ WPXInputStream(),
m_offset(0),
m_size(size),
m_data(data),
diff --git a/scribus/third_party/wpg/WPGStreamImplementation.cpp b/scribus/third_party/wpg/WPGStreamImplementation.cpp
index 4d783f7..396377a 100644
--- a/scribus/third_party/wpg/WPGStreamImplementation.cpp
+++ b/scribus/third_party/wpg/WPGStreamImplementation.cpp
@@ -98,7 +98,7 @@ WPGMemoryStreamPrivate::~WPGMemoryStreamPrivate()
}
WPGFileStream::WPGFileStream(const char* filename) :
- WPXInputStream(true),
+ WPXInputStream(),
d(new WPGFileStreamPrivate)
{
d->file.open( filename, std::ios::binary | std::ios::in );
@@ -300,7 +300,7 @@ bool WPGFileStream::isOLEStream()
}
WPGMemoryStream::WPGMemoryStream(const char *data, const unsigned int dataSize) :
- WPXInputStream(true),
+ WPXInputStream(),
d(new WPGMemoryStreamPrivate(std::string(data, dataSize)))
{
d->buffer.seekg( 0, std::ios::end );
diff --git a/scribus/third_party/wpg/WPXStream.h b/scribus/third_party/wpg/WPXStream.h
index 49ef6e7..643169d 100644
--- a/scribus/third_party/wpg/WPXStream.h
+++ b/scribus/third_party/wpg/WPXStream.h
@@ -36,8 +36,7 @@ enum WPX_SEEK_TYPE
class WPXInputStream
{
public:
- WPXInputStream(bool supportsOLE) :
- m_supportsOLE(supportsOLE) {}
+ WPXInputStream();
virtual ~WPXInputStream() {}
/**
@@ -84,8 +83,5 @@ public:
is beyond its end. In all other cases, it should be false.
*/
virtual bool atEOS() = 0;
-
-private:
- bool m_supportsOLE;
};
#endif
--
2.1.0
| ||||
| Patch | No | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-10-21 19:51 | Kunda | New Issue | |
| 2014-10-21 19:51 | Kunda | Status | new => assigned |
| 2014-10-21 19:51 | Kunda | Assigned To | => fschmid |
| 2014-10-21 19:51 | Kunda | Issue generated from: 0012778 | |
| 2014-10-21 19:51 | Kunda | Relationship added | related to 0012778 |
| 2014-10-21 19:51 | Kunda | File Deleted: 0001-silence-warnings-about-unused-variables.patch | |
| 2014-10-21 19:51 | Kunda | File Deleted: 0002-silence-warnings-about-uninitialized-variables.patch | |
| 2014-10-21 19:51 | Kunda | File Deleted: 0003-silence-warnings-about-variables-assigned-to-themsel.patch | |
| 2014-10-21 19:51 | Kunda | File Deleted: 0004-declare-virtual-destructor-for-base-class.patch | |
| 2014-10-21 19:51 | Kunda | File Deleted: 0005-synchronize-function-signature-with-Poppler.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0006-silenc-warnings-about-possible-possible-use-of-unary.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0007-synchronize-function-signature-with-Qt.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0008-silence-warnings-about-masking-functions-from-base-c.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0009-call-FcInitLoadConfigAndFonts-instead-of-declaring-a.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0010-add-missing-case-Type_CJK.patch | |
| 2014-10-21 19:52 | Kunda | File Deleted: 0011-silence-warning-about-unused-return-value.patch | |
| 2014-10-21 19:54 | Kunda | Issue cloned: 0012783 | |
| 2014-10-21 19:54 | Kunda | Relationship added | related to 0012783 |
| 2014-10-21 19:55 | Kunda | File Deleted: 0017-pgf-CMacroBlock-remove-unused-variable-m_decoder.patch | |
| 2014-10-21 20:05 | Kunda | Relationship added | related to 0003589 |
| 2015-01-03 11:41 | fschmid | Status | assigned => resolved |
| 2015-01-03 11:41 | fschmid | Fixed in Version | => 1.5.0svn |
| 2015-01-03 11:41 | fschmid | Resolution | open => fixed |
| 2015-01-03 11:42 | fschmid | Status | resolved => assigned |
| 2015-01-04 09:04 | fschmid | Status | assigned => resolved |
| 2015-01-30 22:38 | cbradney | Status | resolved => closed |
| 2015-02-23 19:04 | Kunda | Patch | => No |
| 2015-02-23 19:04 | Kunda | Target Version | 1.6 milestone => 1.5.0 |