1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
3
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
3
4
* Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
5
6
* This library is free software; you can redistribute it and/or
6
7
* modify it under the terms of the GNU Library General Public
7
8
* License as published by the Free Software Foundation; either
19
20
* For further information visit http://libwpd.sourceforge.net
22
/* "This product is not manufactured, approved, or supported by
23
/* "This product is not manufactured, approved, or supported by
23
24
* Corel Corporation or Corel Corporation Limited."
25
26
#include <string.h>
27
28
#include "WP6OutlineStylePacket.h"
28
29
#include "libwpd_internal.h"
30
WP6OutlineStylePacket::WP6OutlineStylePacket(WPXInputStream *input, WPXEncryption *encryption, int /* id */, uint32_t dataOffset, uint32_t dataSize) :
31
WP6OutlineStylePacket::WP6OutlineStylePacket(WPXInputStream *input, WPXEncryption *encryption, int /* id */, uint32_t dataOffset, uint32_t dataSize) :
31
32
WP6PrefixDataPacket(input, encryption),
33
34
m_nonDeletableInfoSize(0),
37
37
m_tabBehaviourFlag(0)
39
for (unsigned i = 0; i < WP6_NUM_LIST_LEVELS; i++)
40
m_numberingMethods[i] = 0;
39
41
_read(input, encryption, dataOffset, dataSize);
48
50
m_numPIDs = readU16(input, encryption);
49
51
input->seek(2 * WP6_NUM_LIST_LEVELS, WPX_SEEK_CUR);
51
for (i=0; i<WP6_NUM_LIST_LEVELS; i++)
53
for (i=0; i<WP6_NUM_LIST_LEVELS; i++)
52
54
m_paragraphStylePIDs[i] = readU16(input, encryption); // seemingly useless
54
56
m_outlineFlags = readU8(input, encryption);
55
57
m_outlineHash = readU16(input, encryption);
56
for (unsigned i=0; i<WP6_NUM_LIST_LEVELS; i++)
58
for (unsigned i=0; i<WP6_NUM_LIST_LEVELS; i++)
57
59
m_numberingMethods[i] = readU8(input, encryption);
58
60
m_tabBehaviourFlag = readU8(input, encryption);
60
62
WPD_DEBUG_MSG(("WordPerfect: Read Outline Style Packet (numPrefixIDs: %i, outlineHash: %i, outlineFlags: %i, tab behaviour flag: %i)\n", (int) m_numPIDs, (int) m_outlineHash, (int) m_outlineFlags, (int) m_tabBehaviourFlag));
61
WPD_DEBUG_MSG(("WordPerfect: Read Outline Style Packet (m_numberingMethods: %i %i %i %i %i %i %i %i)\n",
62
m_numberingMethods[0], m_numberingMethods[1], m_numberingMethods[2], m_numberingMethods[3],
63
m_numberingMethods[4], m_numberingMethods[5], m_numberingMethods[6], m_numberingMethods[7]));
63
WPD_DEBUG_MSG(("WordPerfect: Read Outline Style Packet (m_numberingMethods: %i %i %i %i %i %i %i %i)\n",
64
m_numberingMethods[0], m_numberingMethods[1], m_numberingMethods[2], m_numberingMethods[3],
65
m_numberingMethods[4], m_numberingMethods[5], m_numberingMethods[6], m_numberingMethods[7]));
67
69
void WP6OutlineStylePacket::parse(WP6Listener *listener) const
69
71
listener->updateOutlineDefinition(indexHeader, m_outlineHash, m_numberingMethods, m_tabBehaviourFlag);
73
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */