Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/hunspell/src/parsers/odfparser.cxx

Issue 2544793003: [spellcheck] Updated Hunspell to 1.5.4 (Closed)
Patch Set: Test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/hunspell/src/parsers/odfparser.hxx ('k') | third_party/hunspell/src/parsers/testparser.cxx » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {}
« no previous file with comments | « third_party/hunspell/src/parsers/odfparser.hxx ('k') | third_party/hunspell/src/parsers/testparser.cxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698