r19725 by fschmid - Fixed Bug #12782: Upgrade libwpg 3rd party code

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 4 09:01:09 UTC 2015


Author: fschmid
Date: Sun Jan  4 09:01:08 2015
New Revision: 19725

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19725
Log:
Fixed Bug #12782: Upgrade libwpg 3rd party code

Modified:
    trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp
    trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp
    trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h
    trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp
    trunk/Scribus/scribus/third_party/wpg/WPGHeader.h
    trunk/Scribus/scribus/third_party/wpg/WPGInternalStream.cpp
    trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp
    trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp
    trunk/Scribus/scribus/third_party/wpg/WPXStream.h

Modified: trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp Sun Jan  4 09:01:08 2015
@@ -648,7 +648,7 @@
 	}
 
 	// debugging only
-	if(buffer && 0)
+/*	if(buffer && 0)
 	{
 		for(unsigned x = 0; x < width; x++)
 		for(unsigned y = 0; y < height; y++)
@@ -656,7 +656,7 @@
 			libwpg::WPGColor color = bitmap.pixel(x,y);
 			WPG_DEBUG_MSG((" pixel at %d, %d: %3d %3d %3d\n", x, y, color.red, color.green, color.blue));
 		}
-	}
+	}*/
 }
 
 void WPG1Parser::handleBitmapTypeOne()

Modified: trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp Sun Jan  4 09:01:08 2015
@@ -230,8 +230,7 @@
 	m_bitmap(),
 	m_binaryData(),
 	m_hFlipped(false),
-	m_vFlipped(false),
-	m_binaryId(0)
+	m_vFlipped(false)
 {
 }
 

Modified: trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h Sun Jan  4 09:01:08 2015
@@ -225,7 +225,6 @@
 
 	class ObjectCharacterization;
 	void parseCharacterization(ObjectCharacterization*);
-	unsigned m_binaryId;
 };
 
 #endif // __WPG2PARSER_H__

Modified: trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp Sun Jan  4 09:01:08 2015
@@ -50,12 +50,7 @@
     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';

Modified: trunk/Scribus/scribus/third_party/wpg/WPGHeader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPGHeader.h
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGHeader.h (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGHeader.h Sun Jan  4 09:01:08 2015
@@ -51,11 +51,6 @@
 	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

Modified: trunk/Scribus/scribus/third_party/wpg/WPGInternalStream.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPGInternalStream.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGInternalStream.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGInternalStream.cpp Sun Jan  4 09:01:08 2015
@@ -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),

Modified: trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp Sun Jan  4 09:01:08 2015
@@ -559,7 +559,7 @@
     unsigned p = i * 128;
     
     // would be < 32 if first char in the name isn't printable
-    unsigned prefix = 32;
+  //  unsigned prefix = 32;
     
     // parse name of this entry, which stored as Unicode 16-bit
     std::string name;
@@ -571,7 +571,7 @@
     // first char isn't printable ? remove it...
     if( buffer[p] < 32 )
     { 
-      prefix = buffer[0]; 
+   //   prefix = buffer[0];
       name.erase( 0,1 ); 
     }
     

Modified: trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp Sun Jan  4 09:01:08 2015
@@ -98,7 +98,7 @@
 }
 
 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 @@
 }
 
 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 );
@@ -325,7 +325,7 @@
 	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();

Modified: trunk/Scribus/scribus/third_party/wpg/WPXStream.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19725&path=/trunk/Scribus/scribus/third_party/wpg/WPXStream.h
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPXStream.h (original)
+++ trunk/Scribus/scribus/third_party/wpg/WPXStream.h Sun Jan  4 09:01:08 2015
@@ -36,8 +36,7 @@
 class WPXInputStream
 {
 public:
-	WPXInputStream(bool supportsOLE) :
-		m_supportsOLE(supportsOLE) {}
+	WPXInputStream() {}
 	virtual ~WPXInputStream() {}
 
 	/**
@@ -84,8 +83,5 @@
 	is beyond its end. In all other cases, it should be false.
 	*/
 	virtual bool atEOS() = 0;
-
-private:
-	bool m_supportsOLE;
 };
 #endif




More information about the scribus-commit mailing list