libwpd/libwpd-gcc4.6.0.patch
2011-01-24 15:35:58 +00:00

40 lines
1.8 KiB
Diff

diff -ru libwpd-0.9.1.orig/src/lib/WP5GraphicsInformationPacket.h libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h
--- libwpd-0.9.1.orig/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 15:28:41.076826132 +0000
+++ libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 15:29:03.844815512 +0000
@@ -37,7 +37,7 @@
~WP5GraphicsInformationPacket();
void _readContents(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataSize);
const std::vector<WPXBinaryData *> &getImages() const { return m_images; }
- const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return NULL; }
+ const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return 0; }
private:
std::vector<WPXBinaryData *> m_images;
diff -ru libwpd-0.9.1.orig/src/lib/WPXOLEStream.cpp libwpd-0.9.1/src/lib/WPXOLEStream.cpp
--- libwpd-0.9.1.orig/src/lib/WPXOLEStream.cpp 2011-01-24 15:28:41.072826662 +0000
+++ libwpd-0.9.1/src/lib/WPXOLEStream.cpp 2011-01-24 15:31:05.093831190 +0000
@@ -599,9 +599,6 @@
{
unsigned p = i * 128;
- // would be < 32 if first char in the name isn't printable
- unsigned prefix = 32;
-
// parse name of this entry, which stored as Unicode 16-bit
std::string name;
int name_len = readU16( buffer + 0x40+p );
@@ -609,12 +606,10 @@
for( int j=0; ( buffer[j+p]) && (j<name_len); j+= 2 )
name.append( 1, buffer[j+p] );
+ // would be < 32 if first char in the name isn't printable
// first char isn't printable ? remove it...
if( buffer[p] < 32 )
- {
- prefix = buffer[0];
name.erase( 0,1 );
- }
// 2 = file (aka stream), 1 = directory (aka storage), 5 = root
unsigned type = buffer[ 0x42 + p];