diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-04-12 21:33:03 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-04-12 21:33:03 +0000 |
| commit | f3403971efbfd72c8a59eb1957292cf534f1233b (patch) | |
| tree | e7f9c07edc09836a262befb69e7af168bc0b8563 /scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h | |
| parent | edaa5356a69507d02769dc9a69f32021e6e07ac3 (diff) | |
| download | scribus-f3403971efbfd72c8a59eb1957292cf534f1233b.tar.gz scribus-f3403971efbfd72c8a59eb1957292cf534f1233b.tar.xz scribus-f3403971efbfd72c8a59eb1957292cf534f1233b.zip | |
Add hunspell based spell checker - not enabled, backup only for now, not enabled in the build
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17437 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h')
| -rw-r--r-- | scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h b/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h new file mode 100644 index 0000000..d664682 --- /dev/null +++ b/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.h @@ -0,0 +1,48 @@ +/* +For general Scribus (>=1.3.2) copyright and licensing information please refer +to the COPYING file provided with the program. Following this notice may exist +a copyright and/or license notice that predates the release of Scribus 1.3.2 +for which a new license (GPL+exception) is in place. +*/ +#ifndef HUNSPELLPLUGINIMPL_H +#define HUNSPELLPLUGINIMPL_H + +#include <hunspell/hunspell.hxx> +#include "hunspellpluginstructs.h" + +#include <QObject> +#include <QString> +#include <QStringList> + +class QString; +class ScribusDoc; +class PageItem; + + + +class HunspellPluginImpl : public QObject +{ + Q_OBJECT + public: + HunspellPluginImpl(); + ~HunspellPluginImpl(); + bool run(const QString & target, ScribusDoc* doc=0); + bool findDictionaries(); + bool initHunspell(); + bool checkWithHunspell(); + bool parseTextFrame(PageItem *frameToCheck); + bool openGUIForTextFrame(PageItem *frameToCheck); + QList<WordsFound> wordsToCorrect; + + protected: + QStringList dictionaryPaths; + QString dictPath, affPath; + int numDicts, numAFFs; + Hunspell **hspellers; + QStringList dictEntries; + QStringList affEntries; + ScribusDoc* m_doc; +}; + +#endif + |
