Changeset View
Changeset View
Standalone View
Standalone View
src/extractors/office2007extractor.cpp
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 192 | if (!wordEntry->isDirectory()) { | |||
---|---|---|---|---|---|
193 | qWarning() << "Invalid document structure (word is not a directory)"; | 193 | qWarning() << "Invalid document structure (word is not a directory)"; | ||
194 | return; | 194 | return; | ||
195 | } | 195 | } | ||
196 | 196 | | |||
197 | const KArchiveDirectory* wordDirectory = dynamic_cast<const KArchiveDirectory*>(wordEntry); | 197 | const KArchiveDirectory* wordDirectory = dynamic_cast<const KArchiveDirectory*>(wordEntry); | ||
198 | const QStringList wordEntries = wordDirectory->entries(); | 198 | const QStringList wordEntries = wordDirectory->entries(); | ||
199 | 199 | | |||
200 | if (wordEntries.contains(QStringLiteral("document.xml"))) { | 200 | if (wordEntries.contains(QStringLiteral("document.xml"))) { | ||
201 | QDomDocument appDoc(QStringLiteral("document")); | | |||
202 | const KArchiveFile* file = static_cast<const KArchiveFile*>(wordDirectory->entry(QStringLiteral("document.xml"))); | 201 | const KArchiveFile* file = static_cast<const KArchiveFile*>(wordDirectory->entry(QStringLiteral("document.xml"))); | ||
203 | 202 | | |||
204 | extractTextWithTag(file->createDevice(), QStringLiteral("w:t"), result); | 203 | extractTextWithTag(file->createDevice(), QStringLiteral("w:t"), result); | ||
205 | } | 204 | } | ||
206 | } | 205 | } | ||
207 | 206 | | |||
208 | else if (rootEntries.contains(QStringLiteral("xl"))) { | 207 | else if (rootEntries.contains(QStringLiteral("xl"))) { | ||
209 | result->addType(Type::Document); | 208 | result->addType(Type::Document); | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |