KFileMetaData

office2007extractor.h
1 /*
2  <one line to give the library's name and an idea of what it does.>
3  Copyright (C) 2013 Vishesh Handa <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 
21 #ifndef OFFICE_2007_EXTRACTOR_H
22 #define OFFICE_2007_EXTRACTOR_H
23 
24 #include "extractorplugin.h"
25 
26 #include <QIODevice>
27 
28 class KArchiveDirectory;
29 
30 namespace KFileMetaData
31 {
32 
33 class Office2007Extractor : public ExtractorPlugin
34 {
35  Q_OBJECT
36  Q_PLUGIN_METADATA(IID "org.kde.kf5.kfilemetadata.ExtractorPlugin"
37  FILE "office2007extractor.json")
39 
40 public:
41  explicit Office2007Extractor(QObject* parent = nullptr);
42 
43  QStringList mimetypes() const override;
44  void extract(ExtractionResult* result) override;
45 
46 private:
47  void extractTextWithTag(QIODevice* device, const QString& tag, ExtractionResult* result);
48  void extractAllText(QIODevice* device, ExtractionResult* result);
49  void extractTextFromFiles(const KArchiveDirectory* archiveDir, ExtractionResult* result);
50 };
51 }
52 
53 #endif // OFFICE_2007_EXTRACTOR_H
The ExtractorPlugin is the base class for all file metadata extractors.
Q_OBJECTQ_OBJECT
Q_INTERFACES(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 22:55:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.