/trunk/Scribus/scribus/third_party/wpg/WPG1Parser.cpp |
---|
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() |
/trunk/Scribus/scribus/third_party/wpg/WPG2Parser.cpp |
---|
230,8 → 230,7 |
m_bitmap(), |
m_binaryData(), |
m_hFlipped(false), |
m_vFlipped(false), |
m_binaryId(0) |
m_vFlipped(false) |
{ |
} |
/trunk/Scribus/scribus/third_party/wpg/WPG2Parser.h |
---|
225,7 → 225,6 |
class ObjectCharacterization; |
void parseCharacterization(ObjectCharacterization*); |
unsigned m_binaryId; |
}; |
#endif // __WPG2PARSER_H__ |
/trunk/Scribus/scribus/third_party/wpg/WPGHeader.cpp |
---|
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'; |
/trunk/Scribus/scribus/third_party/wpg/WPGHeader.h |
---|
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 |
/trunk/Scribus/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), |
/trunk/Scribus/scribus/third_party/wpg/WPGOLEStream.cpp |
---|
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 ); |
} |
/trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp |
---|
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(); |
/trunk/Scribus/scribus/third_party/wpg/WPXStream.h |
---|
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 |