KFileMetaData
office2007extractor.cpp
22inline QString cpNS() { return QStringLiteral("http://schemas.openxmlformats.org/package/2006/metadata/core-properties"); }
23inline QString relNS() { return QStringLiteral("http://schemas.openxmlformats.org/package/2006/relationships"); }
24inline QString extPropNST() { return QStringLiteral("http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"); }
25inline QString extPropNSS() { return QStringLiteral("http://purl.oclc.org/ooxml/officeDocument/extendedProperties"); }
27inline QString coreProp() { return QStringLiteral("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"); }
28inline QString extPropT() { return QStringLiteral("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"); }
29inline QString extPropS() { return QStringLiteral("http://purl.oclc.org/ooxml/officeDocument/relationships/extendedProperties"); }
91 auto targetByType = [&relationsElem](const QString &type, const QString &defVal = {}) -> QString {
92 for (auto rel = relationsElem.firstChildElement(); !rel.isNull(); rel = rel.nextSiblingElement()) {
102 const QString corePropertiesFile = targetByType(coreProp(), QStringLiteral("docProps/core.xml"));
103 if (const KArchiveFile *file = extractMetaData ? rootDir->file(corePropertiesFile) : nullptr; file) {
116 if (const auto childElem = c.toElement(); childElem.localName() == QStringLiteral("value") && !childElem.text().isEmpty()) {
125 // Extended Properties - two valid relation types: "strict" (ECMA-376-1:2016) or "transitional" (ECMA-367-4:2016)
126 const QString extPropertiesFile = targetByType(extPropS(), targetByType(extPropT(), QStringLiteral("docProps/app.xml")));
127 if (const KArchiveFile *file = extractMetaData ? rootDir->file(extPropertiesFile) : nullptr; file) {
133 for (auto prop = propsElem.firstChildElement(); !prop.isNull(); prop = prop.nextSiblingElement()) {
256void Office2007Extractor::extractTextWithTag(QIODevice* device, const QString& tag, ExtractionResult* result)
QStringList entries() const
const KArchiveEntry * entry(const QString &name) const
const KArchiveFile * file(const QString &name) const
virtual QIODevice * createDevice() const
virtual QByteArray data() const
The ExtractionResult class is where all the data extracted by the indexer is saved.
Definition extractionresult.h:37
QString inputUrl() const
The input URL which the plugins will use to locate the file.
Definition extractionresult.cpp:35
virtual void addType(Type::Type type)=0
This function is called by the plugins.
virtual void add(Property::Property property, const QVariant &value)=0
This function is called by the plugins when they wish to add a key value pair which should be indexed...
Flags inputFlags() const
The flags which the extraction plugin should considering following when extracting metadata from the ...
Definition extractionresult.cpp:45
virtual void append(const QString &text)=0
This function is called by plugins when they wish for some plain text to be indexed without any prope...
The ExtractorPlugin is the base class for all file metadata extractors.
Definition extractorplugin.h:55
Type type(const QSqlDatabase &db)
KGuiItem ok()
QDomElement documentElement() const const
ParseResult setContent(QAnyStringView text, ParseOptions options)
QDomElement firstChildElement(const QString &tagName, const QString &namespaceURI) const const
bool isNull() const const
QString namespaceURI() const const
ReadOnly
iterator begin()
iterator end()
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
IncludeChildElements
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:55:34 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:55:34 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.