~ubuntu-branches/ubuntu/wily/libwpd/wily-proposed

« back to all changes in this revision

Viewing changes to src/lib/WP6FillStylePacket.cpp

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2014-08-08 00:35:26 UTC
  • mfrom: (11.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20140808003526-7pku3062w50cnsod
Tags: 0.10.0-2
* upload to unstable

* fix debian/copyright for MPL-2.0 | LGPL-2.1+ dual-license 

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "WP6Parser.h"
30
30
#include "libwpd_internal.h"
31
31
 
32
 
WP6FillStylePacket::WP6FillStylePacket(WPXInputStream *input, WPXEncryption *encryption, int /* id */, uint32_t dataOffset, uint32_t dataSize) :
 
32
WP6FillStylePacket::WP6FillStylePacket(librevenge::RVNGInputStream *input, WPXEncryption *encryption, int /* id */, unsigned dataOffset, unsigned dataSize) :
33
33
        WP6PrefixDataPacket(input, encryption),
34
34
        m_fgColor(0xff, 0xff, 0xff),
35
35
        m_bgColor(0xff, 0xff, 0xff)
46
46
const int WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_PREFIX_PACKETS = 6;
47
47
const int WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_FILL_NAME = 3;
48
48
 
49
 
void WP6FillStylePacket::_readContents(WPXInputStream *input, WPXEncryption *encryption)
 
49
void WP6FillStylePacket::_readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
50
50
{
51
51
        /* skip a whole bunch of useless crap */
52
 
        uint16_t numChildPrefixIDs = readU16(input, encryption);
53
 
        input->seek(sizeof(uint16_t)*numChildPrefixIDs, WPX_SEEK_CUR);
54
 
        input->seek(WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_PREFIX_PACKETS, WPX_SEEK_CUR);
55
 
        int16_t fillNameLength = readS16(input, encryption);
 
52
        unsigned short numChildPrefixIDs = readU16(input, encryption);
 
53
        input->seek(sizeof(unsigned short)*numChildPrefixIDs, librevenge::RVNG_SEEK_CUR);
 
54
        input->seek(WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_PREFIX_PACKETS, librevenge::RVNG_SEEK_CUR);
 
55
        signed short fillNameLength = readS16(input, encryption);
56
56
        if (fillNameLength > 0)
57
 
                input->seek(fillNameLength, WPX_SEEK_CUR);
58
 
        input->seek(WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_FILL_NAME, WPX_SEEK_CUR);
 
57
                input->seek(fillNameLength, librevenge::RVNG_SEEK_CUR);
 
58
        input->seek(WP6_FILL_STYLE_PACKET_SKIPABLE_DATA_AFTER_FILL_NAME, librevenge::RVNG_SEEK_CUR);
59
59
 
60
60
        /* now we can finally grab the meat */
61
61
        m_fgColor.m_r = readU8(input, encryption);