src/lib/CDRDocumentStructure.h | 1 + src/lib/CDRParser.cpp | 19 +++++++++++++++++++ src/lib/CDRParser.h | 1 + 3 files changed, 21 insertions(+)
New commits: commit cbebfbaff8b7826bc631bbf51eb9a06ee5121326 Author: Dave McKellar <dmckel...@gmail.com> Date: Thu Aug 29 09:54:09 2013 -0400 Added initial support for the "udta" fourcc. diff --git a/src/lib/CDRDocumentStructure.h b/src/lib/CDRDocumentStructure.h index 70cc373..1d42b33 100644 --- a/src/lib/CDRDocumentStructure.h +++ b/src/lib/CDRDocumentStructure.h @@ -126,6 +126,7 @@ #define CDR_FOURCC_txsm 0x6d737874 #define CDR_FOURCC_txtj 0x6a747874 +#define CDR_FOURCC_udta 0x61746475 #define CDR_FOURCC_uidr 0x72646975 #define CDR_FOURCC_uil 0x206c6975 #define CDR_FOURCC_url 0x206c7275 diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index ec76a21..79c587f 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -761,6 +761,9 @@ void libcdr::CDRParser::readRecord(unsigned fourCC, unsigned length, WPXInputStr case CDR_FOURCC_txsm: readTxsm(input, length); break; + case CDR_FOURCC_udta: + readUdta(input); + break; case CDR_FOURCC_styd: readStyd(input); break; @@ -3279,6 +3282,22 @@ void libcdr::CDRParser::readTxsm5(WPXInputStream *input) m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles); } +void libcdr::CDRParser::readUdta(WPXInputStream *input) +{ + CDR_DEBUG_MSG(("libcdr::CDRParser::readUdta\n")); + input->seek(6, WPX_SEEK_CUR); // Not sure what these 6 bytes are for. Font id? + std::vector<unsigned char> name; + unsigned short c; + for (;;) + { + if ((c = readU16(input)) == 0) break; + name.push_back((unsigned char)(c & 0xff)); + name.push_back((unsigned char)(c >> 8)); + } + WPXString fieldName; + appendCharacters(fieldName, name); +} + void libcdr::CDRParser::readStyd(WPXInputStream *input) { CDR_DEBUG_MSG(("libcdr::CDRParser::readStyd\n")); diff --git a/src/lib/CDRParser.h b/src/lib/CDRParser.h index 7b159f1..10405ef 100644 --- a/src/lib/CDRParser.h +++ b/src/lib/CDRParser.h @@ -109,6 +109,7 @@ private: void readTxsm16(WPXInputStream *input); void readTxsm6(WPXInputStream *input); void readTxsm5(WPXInputStream *input); + void readUdta(WPXInputStream *input); void readArtisticText(WPXInputStream *input); void readParagraphText(WPXInputStream *input); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits