~ubuntu-branches/ubuntu/raring/libwpd/raring

« back to all changes in this revision

Viewing changes to src/lib/WPXOLEStream.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2011-03-25 19:12:38 UTC
  • mfrom: (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110325191238-7c5c1bw9oxi1ygq0
debian/patches/libwpd-gcc4.6.0.patch: import from Fedora, as name says 

Show diffs side-by-side

added added

removed removed

Lines of Context:
599
599
  {
600
600
    unsigned p = i * 128;
601
601
    
602
 
    // would be < 32 if first char in the name isn't printable
603
 
    unsigned prefix = 32;
604
 
    
605
602
    // parse name of this entry, which stored as Unicode 16-bit
606
603
    std::string name;
607
604
    int name_len = readU16( buffer + 0x40+p );
609
606
    for( int j=0; ( buffer[j+p]) && (j<name_len); j+= 2 )
610
607
      name.append( 1, buffer[j+p] );
611
608
      
 
609
    // would be < 32 if first char in the name isn't printable
612
610
    // first char isn't printable ? remove it...
613
611
    if( buffer[p] < 32 )
614
 
    { 
615
 
      prefix = buffer[0]; 
616
612
      name.erase( 0,1 ); 
617
 
    }
618
613
    
619
614
    // 2 = file (aka stream), 1 = directory (aka storage), 5 = root
620
615
    unsigned type = buffer[ 0x42 + p];