KFileMetaData

officeextractor.h
1 /*
2  This file is part of a KMetaData File Extractor
3  SPDX-FileCopyrightText: 2013 Denis Steckelmacher <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 
9 #ifndef OFFICE_EXTRACTOR_H
10 #define OFFICE_EXTRACTOR_H
11 
12 #include "extractorplugin.h"
13 
14 namespace KFileMetaData
15 {
16 
17 class OfficeExtractor : public ExtractorPlugin
18 {
19  Q_OBJECT
20  Q_PLUGIN_METADATA(IID "org.kde.kf5.kfilemetadata.ExtractorPlugin"
21  FILE "officeextractor.json")
23 
24 public:
25  explicit OfficeExtractor(QObject* parent = nullptr);
26 
27  QStringList mimetypes() const override;
28  void extract(ExtractionResult* result) override;
29 
30 private:
31  void findExe(const QString& mimeType, const QString& name, QString& fullPath);
32  QString textFromFile(const QString& fileUrl, const QString& command, QStringList& arguments);
33 
34 private:
35  QStringList m_available_mime_types;
36 
37  QString m_catdoc;
38  QString m_catppt;
39  QString m_xls2csv;
40 };
41 }
42 
43 #endif
Q_OBJECTQ_OBJECT
Q_INTERFACES(...)
The ExtractorPlugin is the base class for all file metadata extractors. It is responsible for extract...
virtual QStringList mimetypes() const =0
Provide a list of mimetypes which are supported by this plugin.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 26 2022 03:46:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.