Kaydet (Commit) 93dfc3fe authored tarafından Fridrich Štrba's avatar Fridrich Štrba

This patch should apply now

üst b113ccc8
--- misc/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp --- misc/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp 2010-08-26 13:35:21.000000000 +0200
+++ misc/build/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp +++ misc/build/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp 2011-04-01 18:25:41.328379372 +0200
@@ -46,45 +46,67 @@ WP6PrefixDataPacket::WP6PrefixDataPacket(WPXInputStream * /* input */, WPXEncryp @@ -46,45 +46,67 @@
} }
WP6PrefixDataPacket * WP6PrefixDataPacket::constructPrefixDataPacket(WPXInputStream * input, WPXEncryption *encryption, WP6PrefixIndice *prefixIndice) WP6PrefixDataPacket * WP6PrefixDataPacket::constructPrefixDataPacket(WPXInputStream * input, WPXEncryption *encryption, WP6PrefixIndice *prefixIndice)
-{ -{
- switch (prefixIndice->getType()) - switch (prefixIndice->getType())
+{ +{
+ WP6PrefixDataPacket *tmpPacket = 0; + WP6PrefixDataPacket *tmpPacket = 0;
...@@ -62,26 +62,26 @@ ...@@ -62,26 +62,26 @@
+ } + }
+ catch (FileException) + catch (FileException)
{ {
- case WP6_INDEX_HEADER_INITIAL_FONT: - case WP6_INDEX_HEADER_INITIAL_FONT:
- return new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(), - return new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT: - case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT:
- return new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(), - return new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL: - case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL:
- return new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(), - return new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_FILL_STYLE: - case WP6_INDEX_HEADER_FILL_STYLE:
- return new WP6FillStylePacket(input, encryption, prefixIndice->getID(), - return new WP6FillStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY: - case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY:
- return new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(), - return new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_OUTLINE_STYLE: - case WP6_INDEX_HEADER_OUTLINE_STYLE:
- return new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(), - return new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GRAPHICS_FILENAME: - case WP6_INDEX_HEADER_GRAPHICS_FILENAME:
- return new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(), - return new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize()); - prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA: - case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA:
- return new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(), - return new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(),
...@@ -103,5 +103,5 @@ ...@@ -103,5 +103,5 @@
} }
+ return tmpPacket; + return tmpPacket;
} }
void WP6PrefixDataPacket::_read(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataOffset, uint32_t dataSize) void WP6PrefixDataPacket::_read(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataOffset, uint32_t dataSize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment