| Index: third_party/hunspell/src/parsers/odfparser.cxx
|
| diff --git a/third_party/hunspell/src/hunspell/license.hunspell b/third_party/hunspell/src/parsers/odfparser.cxx
|
| similarity index 56%
|
| copy from third_party/hunspell/src/hunspell/license.hunspell
|
| copy to third_party/hunspell/src/parsers/odfparser.cxx
|
| index 89c1ec7ae04f119947477e351e0aeda9bb297002..415300fd934cd7d4b6482bb4a7a2e1b45fab3ab0 100644
|
| --- a/third_party/hunspell/src/hunspell/license.hunspell
|
| +++ b/third_party/hunspell/src/parsers/odfparser.cxx
|
| @@ -14,33 +14,15 @@
|
| * The Original Code is Hunspell, based on MySpell.
|
| *
|
| * The Initial Developers of the Original Code are
|
| - * Kevin Hendricks (MySpell) and Laszlo Nemeth (Hunspell).
|
| + * Kevin Hendricks (MySpell) and Németh László (Hunspell).
|
| * Portions created by the Initial Developers are Copyright (C) 2002-2005
|
| * the Initial Developers. All Rights Reserved.
|
| *
|
| - * Contributor(s):
|
| - * David Einstein
|
| - * Davide Prina
|
| - * Giuseppe Modugno
|
| - * Gianluca Turconi
|
| - * Simon Brouwer
|
| - * Noll Janos
|
| - * Biro Arpad
|
| - * Goldman Eleonora
|
| - * Sarlos Tamas
|
| - * Bencsath Boldizsar
|
| - * Halacsy Peter
|
| - * Dvornik Laszlo
|
| - * Gefferth Andras
|
| - * Nagy Viktor
|
| - * Varga Daniel
|
| - * Chris Halls
|
| - * Rene Engelhard
|
| - * Bram Moolenaar
|
| - * Dafydd Jones
|
| - * Harri Pitkanen
|
| - * Andras Timar
|
| - * Tor Lillqvist
|
| + * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
|
| + * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
|
| + * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter,
|
| + * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls,
|
| + * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen
|
| *
|
| * Alternatively, the contents of this file may be used under the terms of
|
| * either the GNU General Public License Version 2 or later (the "GPL"), or
|
| @@ -56,6 +38,42 @@
|
| *
|
| * ***** END LICENSE BLOCK ***** */
|
|
|
| -#ifndef HUNSPELL_CHROME_CLIENT
|
| -#include "config.h"
|
| +#include <cstdlib>
|
| +#include <cstring>
|
| +#include <cstdio>
|
| +#include <ctype.h>
|
| +
|
| +#include "../hunspell/csutil.hxx"
|
| +#include "odfparser.hxx"
|
| +
|
| +#ifndef W32
|
| +using namespace std;
|
| #endif
|
| +
|
| +static const char* PATTERN[][2] = {
|
| + {"<office:meta>", "</office:meta>"},
|
| + {"<office:settings>", "</office:settings>"},
|
| + {"<office:binary-data>", "</office:binary-data>"},
|
| + {"<!--", "-->"},
|
| + {"<[cdata[", "]]>"}, // XML comment
|
| + {"<", ">"}};
|
| +
|
| +#define PATTERN_LEN (sizeof(PATTERN) / (sizeof(char*) * 2))
|
| +
|
| +static const char* (*PATTERN2)[2] = NULL;
|
| +
|
| +#define PATTERN_LEN2 0
|
| +
|
| +ODFParser::ODFParser(const char* wordchars)
|
| + : XMLParser(wordchars) {
|
| +}
|
| +
|
| +ODFParser::ODFParser(const w_char* wordchars, int len)
|
| + : XMLParser(wordchars, len) {
|
| +}
|
| +
|
| +bool ODFParser::next_token(std::string& t) {
|
| + return XMLParser::next_token(PATTERN, PATTERN_LEN, PATTERN2, PATTERN_LEN2, t);
|
| +}
|
| +
|
| +ODFParser::~ODFParser() {}
|
|
|