summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellcheck_worditerator.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:58:11 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:58:11 +0000
commitd3a94165c9dc2f5142613304efa7c8e13c69fc8e (patch)
tree1bfdffdf1b9351df144ca77e454c92d761a8da8d /chrome/browser/spellcheck_worditerator.h
parentaa573b305e7350bbfa6f9659dc36ce62d877e574 (diff)
downloadchromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.zip
chromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.tar.gz
chromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.tar.bz2
Port the spell checker to posix.
It all builds but does not link yet. Review URL: http://codereview.chromium.org/14408 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_worditerator.h')
-rw-r--r--chrome/browser/spellcheck_worditerator.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/spellcheck_worditerator.h b/chrome/browser/spellcheck_worditerator.h
index 57f32eb..ce15aec 100644
--- a/chrome/browser/spellcheck_worditerator.h
+++ b/chrome/browser/spellcheck_worditerator.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/string16.h"
#include "unicode/uscript.h"
@@ -93,7 +94,7 @@ class SpellcheckWordIterator {
// * attribute [in] (const SpellcheckCharAttribute*)
// Represents a set of character attributes used for filtering out
// non-word characters.
- // * word [in] (const wchar_t*)
+ // * word [in] (const char16*)
// Represents a string from which this object extracts words.
// (This string does not have to be NUL-terminated.)
// * length [in] (size_t)
@@ -108,20 +109,20 @@ class SpellcheckWordIterator {
// * false
// An error occured while initializing this object.
void Initialize(const SpellcheckCharAttribute* attribute,
- const wchar_t* word,
+ const char16* word,
size_t length,
bool allow_contraction);
// Retrieves a word (or a contraction).
// Parameters
- // * word_string [out] (std::wstring*)
+ // * word_string [out] (string16*)
// Represents a word (or a contraction) to be checked its spelling.
// This |word_string| has been already normalized to its canonical form
// (i.e. decomposed ligatures, replaced full-width latin characters to
// its ASCII alternatives, etc.) so that a SpellChecker object can check
// its spelling without any additional operations.
// On the other hand, a substring of the input string
- // std::wstring str(&word[word_start], word_length);
+ // string16 str(&word[word_start], word_length);
// represents the non-normalized version of this extracted word.
// * word_start [out] (int*)
// Represents the offset of this word from the beginning of the input
@@ -136,7 +137,7 @@ class SpellcheckWordIterator {
// Found a word (or a contraction) to be checked its spelling.
// * false
// Not found any more words or contractions to be checked their spellings.
- bool GetNextWord(std::wstring* word_string,
+ bool GetNextWord(string16* word_string,
int* word_start,
int* word_length);
@@ -157,11 +158,11 @@ class SpellcheckWordIterator {
// canonical form to the |output_string|.
bool Normalize(int input_start,
int input_length,
- std::wstring* output_string) const;
+ string16* output_string) const;
private:
// The pointer to the input string from which we are extracting words.
- const wchar_t* word_;
+ const char16* word_;
// The length of the original string.
int length_;