1 *** misc/libwpd-0.8.8/configure Tue Jan 9 10:35:10 2007
2 --- misc/build/libwpd-0.8.8/configure Thu Feb 21 11:37:54 2008
8 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
9 version_type=freebsd-$objformat
16 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
17 version_type=freebsd-$objformat
25 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
26 version_type=freebsd-$objformat
33 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
34 version_type=freebsd-$objformat
42 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
43 version_type=freebsd-$objformat
50 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
51 version_type=freebsd-$objformat
59 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
60 version_type=freebsd-$objformat
67 ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
68 version_type=freebsd-$objformat
71 *** misc/libwpd-0.8.8/src/lib/WP1Heuristics.cpp Wed Jan 3 13:07:55 2007
72 --- misc/build/libwpd-0.8.8/src/lib/WP1Heuristics.cpp Thu Feb 21 11:37:54 2008
76 #include "WP1Heuristics.h"
77 #include "WP1FileStructure.h"
78 #include "libwpd_internal.h"
81 WPDConfidence WP1Heuristics::isWP1FileFormat(WPXInputStream *input, bool partialContent)
85 // <function code>{function length}...{function length}<function code>
86 // that we observed in variable length WP1 functions
88 ! long functionLength = readU32(input, true);
89 ! long closingFunctionLength = 0;
90 WPD_DEBUG_MSG(("WP1Heuristics functionLength = 0x%.8x\n", (unsigned int)functionLength));
92 input->seek(functionLength, WPX_SEEK_CUR);
94 // <function code>{function length}...{function length}<function code>
95 // that we observed in variable length WP1 functions
97 ! unsigned long functionLength = readU32(input, true);
98 ! if (functionLength > ((std::numeric_limits<uint32_t>::max)() / 2))
99 ! return WPD_CONFIDENCE_NONE;
100 ! unsigned long closingFunctionLength = 0;
101 WPD_DEBUG_MSG(("WP1Heuristics functionLength = 0x%.8x\n", (unsigned int)functionLength));
103 input->seek(functionLength, WPX_SEEK_CUR);
104 *** misc/libwpd-0.8.8/src/lib/WP1Part.cpp Wed Jan 3 13:07:55 2007
105 --- misc/build/libwpd-0.8.8/src/lib/WP1Part.cpp Thu Feb 21 11:37:54 2008
110 else if (WP1_FUNCTION_GROUP_SIZE[readVal-0xC0] == -1)
112 + // Should not happen because the heuristics would not recognize this file as a well formed WP1 file,
113 + // Nonetheless if we ever change the parts using the heuristics, this will be a check useful to have
114 + if (!WP1VariableLengthGroup::isGroupConsistent(input, readVal))
116 + WPD_DEBUG_MSG(("WordPerfect: Consistency Check (variable length) failed; ignoring this byte\n"));
119 WPD_DEBUG_MSG(("WordPerfect: constructVariableLengthGroup\n"));
120 return WP1VariableLengthGroup::constructVariableLengthGroup(input, readVal);
122 *** misc/libwpd-0.8.8/src/lib/WP1SetTabsGroup.cpp Fri Jan 5 10:21:16 2007
123 --- misc/build/libwpd-0.8.8/src/lib/WP1SetTabsGroup.cpp Thu Feb 21 11:37:54 2008
126 void WP1SetTabsGroup::_readContents(WPXInputStream *input)
128 // Skip first the old condensed tab table
129 ! while (readU8(input) != 0xff)
130 input->seek(2, WPX_SEEK_CUR);
132 // Now read the new condensed tab table
134 void WP1SetTabsGroup::_readContents(WPXInputStream *input)
136 // Skip first the old condensed tab table
137 ! while (readU8(input) != 0xff && !input->atEOS())
138 input->seek(2, WPX_SEEK_CUR);
140 // Now read the new condensed tab table
143 float tmpTabPosition = 0.0f;
144 WPXTabStop tmpTabStop = WPXTabStop();
146 ! while ((tmpTabType = read8(input)) & 0xff != 0xff)
148 tmpTabPosition = (float)((double)readU16(input, true) / 72.0f);
152 float tmpTabPosition = 0.0f;
153 WPXTabStop tmpTabStop = WPXTabStop();
155 ! while (((tmpTabType = read8(input)) & 0xff) != 0xff)
157 + if (input->atEOS())
158 + throw FileException();
159 tmpTabPosition = (float)((double)readU16(input, true) / 72.0f);
162 *** misc/libwpd-0.8.8/src/lib/WP1SubDocument.cpp Wed Jan 3 13:07:55 2007
163 --- misc/build/libwpd-0.8.8/src/lib/WP1SubDocument.cpp Thu Feb 21 11:37:54 2008
166 #include "WP1Parser.h"
167 #include "libwpd_internal.h"
169 ! WP1SubDocument::WP1SubDocument(WPXInputStream *input, const int dataSize) :
170 WPXSubDocument(input, dataSize)
174 #include "WP1Parser.h"
175 #include "libwpd_internal.h"
177 ! WP1SubDocument::WP1SubDocument(WPXInputStream *input, const unsigned dataSize) :
178 WPXSubDocument(input, dataSize)
181 *** misc/libwpd-0.8.8/src/lib/WP1SubDocument.h Wed Jan 3 13:07:56 2007
182 --- misc/build/libwpd-0.8.8/src/lib/WP1SubDocument.h Thu Feb 21 11:37:54 2008
185 class WP1SubDocument : public WPXSubDocument
188 ! WP1SubDocument(WPXInputStream *input, const int dataSize);
189 void parse(WP1Listener *listener) const;
193 class WP1SubDocument : public WPXSubDocument
196 ! WP1SubDocument(WPXInputStream *input, const unsigned dataSize);
197 void parse(WP1Listener *listener) const;
200 *** misc/libwpd-0.8.8/src/lib/WP1VariableLengthGroup.cpp Wed Jan 3 13:07:55 2007
201 --- misc/build/libwpd-0.8.8/src/lib/WP1VariableLengthGroup.cpp Thu Feb 21 11:37:54 2008
205 #include "WP1FootnoteEndnoteGroup.h"
206 #include "WP1FileStructure.h"
207 #include "libwpd_internal.h"
210 WP1VariableLengthGroup::WP1VariableLengthGroup(uint8_t group)
217 uint32_t size = readU32(input, true);
218 + if (size > ((std::numeric_limits<uint32_t>::max)() / 2))
221 if (input->seek(size, WPX_SEEK_CUR) || input->atEOS())
226 WPD_DEBUG_MSG(("WordPerfect: handling a variable length group\n"));
228 m_size = readU32(input, true); // the length is the number of data bytes minus 4 (ie. the function codes)
230 + if (m_size + startPosition < startPosition)
231 + throw FileException();
233 WPD_DEBUG_MSG(("WordPerfect: Read variable group header (start_position: %i, size: %i)\n", startPosition, m_size));
235 _readContents(input);
237 + if ((m_size + startPosition + 4 < m_size + startPosition) ||
238 + (m_size + startPosition + 4) > ((std::numeric_limits<uint32_t>::max)() / 2))
239 + throw FileException();
241 input->seek(startPosition + m_size + 4, WPX_SEEK_SET);
243 if (m_size != readU32(input, true))
247 throw FileException();
250 + if ((m_size + startPosition + 9 < m_size + startPosition) ||
251 + (m_size + startPosition + 9) > ((std::numeric_limits<uint32_t>::max)() / 2))
252 + throw FileException();
253 input->seek(startPosition + m_size + 9, WPX_SEEK_SET);
256 *** misc/libwpd-0.8.8/src/lib/WP3PageFormatGroup.cpp Fri Jan 5 10:21:13 2007
257 --- misc/build/libwpd-0.8.8/src/lib/WP3PageFormatGroup.cpp Thu Feb 21 11:37:54 2008
261 m_isRelative = (readU8(input) & 0x01);
263 ! while ((tmpTabType = read8(input)) & 0xff != 0xff)
265 tmpTabPosition = fixedPointToFloat(readU32(input, true)) / 72.0f;
270 m_isRelative = (readU8(input) & 0x01);
272 ! while (((tmpTabType = read8(input)) & 0xff) != 0xff)
274 + if (input->atEOS())
275 + throw FileException();
276 tmpTabPosition = fixedPointToFloat(readU32(input, true)) / 72.0f;
279 *** misc/libwpd-0.8.8/src/lib/WP3SubDocument.cpp Wed Jan 3 13:07:55 2007
280 --- misc/build/libwpd-0.8.8/src/lib/WP3SubDocument.cpp Thu Feb 21 11:37:54 2008
283 #include "WP3Parser.h"
284 #include "libwpd_internal.h"
286 ! WP3SubDocument::WP3SubDocument(WPXInputStream *input, const int dataSize) :
287 WPXSubDocument(input, dataSize)
291 #include "WP3Parser.h"
292 #include "libwpd_internal.h"
294 ! WP3SubDocument::WP3SubDocument(WPXInputStream *input, const unsigned dataSize) :
295 WPXSubDocument(input, dataSize)
298 *** misc/libwpd-0.8.8/src/lib/WP3SubDocument.h Wed Jan 3 13:07:56 2007
299 --- misc/build/libwpd-0.8.8/src/lib/WP3SubDocument.h Thu Feb 21 11:37:54 2008
302 class WP3SubDocument : public WPXSubDocument
305 ! WP3SubDocument(WPXInputStream *input, const int dataSize);
306 void parse(WP3Listener *listener) const;
310 class WP3SubDocument : public WPXSubDocument
313 ! WP3SubDocument(WPXInputStream *input, const unsigned dataSize);
314 void parse(WP3Listener *listener) const;
317 *** misc/libwpd-0.8.8/src/lib/WP3TablesGroup.cpp Wed Jan 3 13:07:55 2007
318 --- misc/build/libwpd-0.8.8/src/lib/WP3TablesGroup.cpp Thu Feb 21 11:37:54 2008
322 // this group can contain different kinds of data, thus we need to read
323 // the contents accordingly
325 switch (getSubGroup())
327 case WP3_TABLES_GROUP_TABLE_FUNCTION:
328 input->seek(71, WPX_SEEK_CUR);
329 m_tableMode = readU8(input);
330 m_offsetFromLeftEdge = readU32(input, true);
333 // this group can contain different kinds of data, thus we need to read
334 // the contents accordingly
336 ! long startPosition = 0;
337 switch (getSubGroup())
339 case WP3_TABLES_GROUP_TABLE_FUNCTION:
340 + startPosition = input->tell();
341 input->seek(71, WPX_SEEK_CUR);
342 m_tableMode = readU8(input);
343 m_offsetFromLeftEdge = readU32(input, true);
347 m_rightGutterSpacing = readU32(input, true);
348 input->seek(3, WPX_SEEK_CUR);
349 m_numColumns = readU8(input);
350 + if ((m_numColumns > 32) || ((input->tell() - startPosition + m_numColumns*10) > (getSize() - 4)))
351 + throw FileException();
352 for (i=0; i<m_numColumns; i++)
354 + if (input->atEOS())
355 + throw FileException();
356 m_columnMode[i] = readU8(input);
357 m_numberFormat[i] = readU8(input);
358 m_columnWidth[i] = readU32(input, true);
362 case WP3_TABLES_GROUP_TABLE_FUNCTION:
363 listener->defineTable(m_tableMode, fixedPointToWPUs(m_offsetFromLeftEdge));
364 ! for (i=0; i<m_numColumns; i++)
365 listener->addTableColumnDefinition(fixedPointToWPUs(m_columnWidth[i]), fixedPointToWPUs(m_leftGutterSpacing),
366 fixedPointToWPUs(m_rightGutterSpacing), 0, LEFT);
367 listener->startTable();
370 case WP3_TABLES_GROUP_TABLE_FUNCTION:
371 listener->defineTable(m_tableMode, fixedPointToWPUs(m_offsetFromLeftEdge));
372 ! for (i=0; i<m_numColumns && i <= 32; i++)
373 listener->addTableColumnDefinition(fixedPointToWPUs(m_columnWidth[i]), fixedPointToWPUs(m_leftGutterSpacing),
374 fixedPointToWPUs(m_rightGutterSpacing), 0, LEFT);
375 listener->startTable();
376 *** misc/libwpd-0.8.8/src/lib/WP3VariableLengthGroup.cpp Wed Jan 3 13:07:55 2007
377 --- misc/build/libwpd-0.8.8/src/lib/WP3VariableLengthGroup.cpp Thu Feb 21 11:37:54 2008
381 #include "WP3FootnoteEndnoteGroup.h"
382 #include "WP3TablesGroup.h"
383 #include "libwpd_internal.h"
386 WP3VariableLengthGroup::WP3VariableLengthGroup()
391 bool WP3VariableLengthGroup::isGroupConsistent(WPXInputStream *input, const uint8_t group)
393 uint32_t startPosition = input->tell();
394 + if (startPosition > ((std::numeric_limits<unsigned long>::max)() / 2))
399 uint8_t subGroup = readU8(input);
400 uint16_t size = readU16(input, true);
401 + if (startPosition + size < startPosition)
403 + input->seek(startPosition, WPX_SEEK_SET);
407 if (input->seek((startPosition + size - 1 - input->tell()), WPX_SEEK_CUR) || input->atEOS())
409 *** misc/libwpd-0.8.8/src/lib/WP42SubDocument.cpp Wed Jan 3 13:07:55 2007
410 --- misc/build/libwpd-0.8.8/src/lib/WP42SubDocument.cpp Thu Feb 21 11:37:54 2008
413 #include "WP42Parser.h"
414 #include "libwpd_internal.h"
416 ! WP42SubDocument::WP42SubDocument(uint8_t * streamData, const int dataSize) :
417 WPXSubDocument(streamData, dataSize)
421 ! WP42SubDocument::WP42SubDocument(WPXInputStream *input, const int dataSize) :
422 WPXSubDocument(input, dataSize)
426 #include "WP42Parser.h"
427 #include "libwpd_internal.h"
429 ! WP42SubDocument::WP42SubDocument(uint8_t * streamData, const unsigned dataSize) :
430 WPXSubDocument(streamData, dataSize)
434 ! WP42SubDocument::WP42SubDocument(WPXInputStream *input, const unsigned dataSize) :
435 WPXSubDocument(input, dataSize)
438 *** misc/libwpd-0.8.8/src/lib/WP42SubDocument.h Wed Jan 3 13:07:56 2007
439 --- misc/build/libwpd-0.8.8/src/lib/WP42SubDocument.h Thu Feb 21 11:37:54 2008
442 class WP42SubDocument : public WPXSubDocument
445 ! WP42SubDocument(uint8_t * streamData, const int dataSize);
446 ! WP42SubDocument(WPXInputStream *input, const int dataSize);
447 void parse(WP42Listener *listener) const;
451 class WP42SubDocument : public WPXSubDocument
454 ! WP42SubDocument(uint8_t * streamData, const unsigned dataSize);
455 ! WP42SubDocument(WPXInputStream *input, const unsigned dataSize);
456 void parse(WP42Listener *listener) const;
459 *** misc/libwpd-0.8.8/src/lib/WP5DefinitionGroup.cpp Wed Jan 3 13:07:55 2007
460 --- misc/build/libwpd-0.8.8/src/lib/WP5DefinitionGroup.cpp Thu Feb 21 11:37:54 2008
463 #include "WP5Listener.h"
464 #include "libwpd_internal.h"
466 ! WP5DefinitionGroup_DefineTablesSubGroup::WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input) :
467 WP5VariableLengthGroup_SubGroup(),
471 #include "WP5Listener.h"
472 #include "libwpd_internal.h"
474 ! WP5DefinitionGroup_DefineTablesSubGroup::WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input, uint16_t subGroupSize) :
475 WP5VariableLengthGroup_SubGroup(),
484 + long startPosition = input->tell();
485 // Skip useless old values to read the old column number
486 input->seek(2, WPX_SEEK_CUR);
487 m_numColumns = readU16(input);
491 input->seek(10, WPX_SEEK_CUR);
492 m_leftOffset = readU16(input);
494 + if ((m_numColumns > 32) || ((input->tell() - startPosition + m_numColumns*5) > (subGroupSize - 4)))
495 + throw FileException();
496 for (i=0; i < m_numColumns; i++)
498 + if (input->atEOS())
499 + throw FileException();
500 m_columnWidth[i] = readU16(input);
502 for (i=0; i < m_numColumns; i++)
504 + if (input->atEOS())
505 + throw FileException();
506 m_attributeBits[i] = readU16(input);
508 for (i=0; i < m_numColumns; i++)
510 + if (input->atEOS())
511 + throw FileException();
512 m_columnAlignment[i] = readU8(input);
516 void WP5DefinitionGroup_DefineTablesSubGroup::parse(WP5Listener *listener)
519 switch(getSubGroup())
521 case WP5_TOP_DEFINITION_GROUP_DEFINE_TABLES:
522 ! m_subGroupData = new WP5DefinitionGroup_DefineTablesSubGroup(input);
527 switch(getSubGroup())
529 case WP5_TOP_DEFINITION_GROUP_DEFINE_TABLES:
530 ! m_subGroupData = new WP5DefinitionGroup_DefineTablesSubGroup(input, getSize());
534 *** misc/libwpd-0.8.8/src/lib/WP5DefinitionGroup.h Wed Jan 3 13:07:56 2007
535 --- misc/build/libwpd-0.8.8/src/lib/WP5DefinitionGroup.h Thu Feb 21 11:37:54 2008
538 class WP5DefinitionGroup_DefineTablesSubGroup : public WP5VariableLengthGroup_SubGroup
541 ! WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input);
542 void parse(WP5Listener *listener);
546 class WP5DefinitionGroup_DefineTablesSubGroup : public WP5VariableLengthGroup_SubGroup
549 ! WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input, uint16_t subGroupSize);
550 void parse(WP5Listener *listener);
557 WP5VariableLengthGroup_SubGroup * m_subGroupData;
561 #endif /* WP5DEFINITIONGROUP_H */
563 *** misc/libwpd-0.8.8/src/lib/WP5SubDocument.cpp Wed Jan 3 13:07:55 2007
564 --- misc/build/libwpd-0.8.8/src/lib/WP5SubDocument.cpp Thu Feb 21 11:37:54 2008
567 #include "WP5Parser.h"
568 #include "libwpd_internal.h"
570 ! WP5SubDocument::WP5SubDocument(WPXInputStream *input, const int dataSize) :
571 WPXSubDocument(input, dataSize)
575 #include "WP5Parser.h"
576 #include "libwpd_internal.h"
578 ! WP5SubDocument::WP5SubDocument(WPXInputStream *input, const unsigned dataSize) :
579 WPXSubDocument(input, dataSize)
582 *** misc/libwpd-0.8.8/src/lib/WP5SubDocument.h Wed Jan 3 13:07:56 2007
583 --- misc/build/libwpd-0.8.8/src/lib/WP5SubDocument.h Thu Feb 21 11:37:54 2008
586 class WP5SubDocument : public WPXSubDocument
589 ! WP5SubDocument(WPXInputStream *input, const int dataSize);
590 void parse(WP5Listener *listener) const;
594 class WP5SubDocument : public WPXSubDocument
597 ! WP5SubDocument(WPXInputStream *input, const unsigned dataSize);
598 void parse(WP5Listener *listener) const;
601 *** misc/libwpd-0.8.8/src/lib/WP6ExtendedDocumentSummaryPacket.cpp Fri Jan 5 10:30:07 2007
602 --- misc/build/libwpd-0.8.8/src/lib/WP6ExtendedDocumentSummaryPacket.cpp Thu Feb 21 11:37:54 2008
606 * Corel Corporation or Corel Corporation Limited."
611 #include "WP6ExtendedDocumentSummaryPacket.h"
612 #include "libwpd_internal.h"
619 + if (m_dataSize > ((std::numeric_limits<uint32_t>::max)() / 2))
620 + m_dataSize = ((std::numeric_limits<uint32_t>::max)() / 2);
621 uint8_t *streamData = new uint8_t[m_dataSize];
622 for(unsigned i=0; i<(unsigned)m_dataSize; i++)
623 streamData[i] = readU8(input);
624 *** misc/libwpd-0.8.8/src/lib/WP6FontDescriptorPacket.cpp Thu Jan 4 11:52:35 2007
625 --- misc/build/libwpd-0.8.8/src/lib/WP6FontDescriptorPacket.cpp Thu Feb 21 11:37:54 2008
628 * Corel Corporation or Corel Corporation Limited."
632 #include "WP6FontDescriptorPacket.h"
633 #include "libwpd_internal.h"
636 * Corel Corporation or Corel Corporation Limited."
640 #include "WP6FontDescriptorPacket.h"
641 #include "libwpd_internal.h"
646 m_fontNameLength = readU16(input);
648 ! // TODO: re-do sanity checking
649 ! //if(m_fontNameLength < WP_FONT_NAME_MAX_LENGTH)
651 if (m_fontNameLength == 0)
653 m_fontName = new char[1];
656 m_fontNameLength = readU16(input);
659 ! if (m_fontNameLength > ((std::numeric_limits<uint16_t>::max)() / 2))
660 ! m_fontNameLength = ((std::numeric_limits<uint16_t>::max)() / 2);
661 if (m_fontNameLength == 0)
663 m_fontName = new char[1];
664 *** misc/libwpd-0.8.8/src/lib/WP6GeneralTextPacket.cpp Wed Jan 3 13:07:55 2007
665 --- misc/build/libwpd-0.8.8/src/lib/WP6GeneralTextPacket.cpp Thu Feb 21 11:37:54 2008
670 void WP6GeneralTextPacket::_readContents(WPXInputStream *input)
672 + long startPosition = input->tell();
673 uint16_t numTextBlocks = readU16(input);
674 input->seek(4, WPX_SEEK_CUR);
680 uint32_t *blockSizes = new uint32_t[numTextBlocks];
684 for(i=0; i<numTextBlocks; i++)
686 blockSizes[i] = readU32(input);
687 ! totalSize += blockSizes[i];
694 uint32_t *blockSizes = new uint32_t[numTextBlocks];
695 ! unsigned int totalSize = 0;
696 ! unsigned int i = 0;
698 for(i=0; i<numTextBlocks; i++)
700 + if ((input->tell() - startPosition + 4) > getDataSize() || input->atEOS())
701 + throw FileException();
702 blockSizes[i] = readU32(input);
703 ! unsigned int newTotalSize = totalSize + blockSizes[i];
704 ! if (newTotalSize < totalSize)
705 ! throw FileException();
706 ! totalSize = newTotalSize;
714 for(i=0; i<numTextBlocks; i++)
716 + if ((input->tell() - startPosition + blockSizes[i]) > getDataSize() || input->atEOS())
717 + throw FileException();
718 for (unsigned int j=0; j<blockSizes[i]; j++)
720 streamData[streamPos] = readU8(input);
721 *** misc/libwpd-0.8.8/src/lib/WP6PrefixDataPacket.cpp Wed Jan 3 13:07:55 2007
722 --- misc/build/libwpd-0.8.8/src/lib/WP6PrefixDataPacket.cpp Thu Feb 21 11:37:54 2008
726 #include "libwpd_internal.h"
728 ! WP6PrefixDataPacket::WP6PrefixDataPacket(WPXInputStream * /* input */)
734 #include "libwpd_internal.h"
736 ! WP6PrefixDataPacket::WP6PrefixDataPacket(WPXInputStream * /* input */) :
744 void WP6PrefixDataPacket::_read(WPXInputStream *input, uint32_t dataOffset, uint32_t dataSize)
749 input->seek(dataOffset, WPX_SEEK_SET);
752 void WP6PrefixDataPacket::_read(WPXInputStream *input, uint32_t dataOffset, uint32_t dataSize)
754 ! m_dataSize = dataSize;
759 input->seek(dataOffset, WPX_SEEK_SET);
760 *** misc/libwpd-0.8.8/src/lib/WP6PrefixDataPacket.h Wed Jan 3 13:07:56 2007
761 --- misc/build/libwpd-0.8.8/src/lib/WP6PrefixDataPacket.h Thu Feb 21 11:37:54 2008
765 virtual ~WP6PrefixDataPacket() {}
766 virtual void parse(WP6Listener * /* listener */) const {}
767 virtual WP6SubDocument * getSubDocument() const { return 0; }
768 + const uint32_t getDataSize() const { return m_dataSize; }
770 static WP6PrefixDataPacket * constructPrefixDataPacket(WPXInputStream * input, WP6PrefixIndice *prefixIndice);
773 virtual void _readContents(WPXInputStream *input) = 0;
774 void _read(WPXInputStream *input, uint32_t dataOffset, uint32_t dataSize);
777 + uint32_t m_dataSize;
780 #endif /* WP6PREFIXDATAPACKET_H */
781 *** misc/libwpd-0.8.8/src/lib/WP6SubDocument.cpp Wed Jan 3 13:07:55 2007
782 --- misc/build/libwpd-0.8.8/src/lib/WP6SubDocument.cpp Thu Feb 21 11:37:54 2008
785 #include "WP6Parser.h"
786 #include "libwpd_internal.h"
788 ! WP6SubDocument::WP6SubDocument(uint8_t * streamData, const int dataSize) :
789 WPXSubDocument(streamData, dataSize)
793 #include "WP6Parser.h"
794 #include "libwpd_internal.h"
796 ! WP6SubDocument::WP6SubDocument(uint8_t * streamData, const unsigned dataSize) :
797 WPXSubDocument(streamData, dataSize)
800 *** misc/libwpd-0.8.8/src/lib/WP6SubDocument.h Wed Jan 3 13:07:56 2007
801 --- misc/build/libwpd-0.8.8/src/lib/WP6SubDocument.h Thu Feb 21 11:37:54 2008
804 class WP6SubDocument : public WPXSubDocument
807 ! WP6SubDocument(uint8_t * streamData, const int dataSize);
808 void parse(WP6Listener *listener) const;
810 #endif /* WP6SUBDOCUMENT_H */
812 class WP6SubDocument : public WPXSubDocument
815 ! WP6SubDocument(uint8_t * streamData, const unsigned dataSize);
816 void parse(WP6Listener *listener) const;
818 #endif /* WP6SUBDOCUMENT_H */
819 *** misc/libwpd-0.8.8/src/lib/WPXHeader.cpp Wed Jan 3 16:40:14 2007
820 --- misc/build/libwpd-0.8.8/src/lib/WPXHeader.cpp Thu Feb 21 11:40:46 2008
824 #include "WP61Header.h"
825 #include "WPXFileStructure.h"
826 #include "libwpd_internal.h"
827 + #include <string.h>
829 WPXHeader::WPXHeader(WPXInputStream * /* input */, uint32_t documentOffset, uint8_t productType,
830 uint8_t fileType, uint8_t majorVersion, uint8_t minorVersion, uint16_t documentEncryption) :
831 *** misc/libwpd-0.8.8/src/lib/WPXSubDocument.cpp Wed Jan 3 13:07:56 2007
832 --- misc/build/libwpd-0.8.8/src/lib/WPXSubDocument.cpp Thu Feb 21 11:37:54 2008
838 ! WPXSubDocument::WPXSubDocument(WPXInputStream *input, const int dataSize) :
841 uint8_t *streamData = new uint8_t[dataSize];
842 for (int i=0; i<dataSize; i++)
844 streamData[i] = readU8(input);
846 m_stream = new WPXMemoryInputStream(streamData, dataSize);
849 ! WPXSubDocument::WPXSubDocument(uint8_t * streamData, const int dataSize) :
852 m_stream = new WPXMemoryInputStream(streamData, dataSize);
857 ! WPXSubDocument::WPXSubDocument(WPXInputStream *input, const unsigned dataSize) :
860 uint8_t *streamData = new uint8_t[dataSize];
861 for (int i=0; i<dataSize; i++)
863 + if (input->atEOS())
864 + throw FileException();
865 streamData[i] = readU8(input);
867 m_stream = new WPXMemoryInputStream(streamData, dataSize);
870 ! WPXSubDocument::WPXSubDocument(uint8_t * streamData, const unsigned dataSize) :
873 m_stream = new WPXMemoryInputStream(streamData, dataSize);
874 *** misc/libwpd-0.8.8/src/lib/WPXSubDocument.h Wed Jan 3 13:07:56 2007
875 --- misc/build/libwpd-0.8.8/src/lib/WPXSubDocument.h Thu Feb 21 11:37:54 2008
881 ! WPXSubDocument(WPXInputStream *input, const int dataSize);
882 ! WPXSubDocument(uint8_t * streamData, const int dataSize);
883 virtual ~WPXSubDocument();
884 WPXMemoryInputStream *getStream() const { return m_stream;}
890 ! WPXSubDocument(WPXInputStream *input, const unsigned dataSize);
891 ! WPXSubDocument(uint8_t * streamData, const unsigned dataSize);
892 virtual ~WPXSubDocument();
893 WPXMemoryInputStream *getStream() const { return m_stream;}
895 *** misc/libwpd-0.8.8/src/lib/makefile.mk Tue Nov 14 14:45:50 2006
896 --- misc/build/libwpd-0.8.8/src/lib/makefile.mk Thu Feb 21 11:37:54 2008
899 ENABLE_EXCEPTIONS=TRUE
902 - .INCLUDE : svpre.mk
903 .INCLUDE : settings.mk