OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 class TextCheckingHelper { | 77 class TextCheckingHelper { |
78 WTF_MAKE_NONCOPYABLE(TextCheckingHelper); | 78 WTF_MAKE_NONCOPYABLE(TextCheckingHelper); |
79 public: | 79 public: |
80 TextCheckingHelper(EditorClient*, PassRefPtr<Range>); | 80 TextCheckingHelper(EditorClient*, PassRefPtr<Range>); |
81 ~TextCheckingHelper(); | 81 ~TextCheckingHelper(); |
82 | 82 |
83 String findFirstMisspelling(int& firstMisspellingOffset, bool markAll, RefPt
r<Range>& firstMisspellingRange); | 83 String findFirstMisspelling(int& firstMisspellingOffset, bool markAll, RefPt
r<Range>& firstMisspellingRange); |
84 String findFirstMisspellingOrBadGrammar(bool checkGrammar, bool& outIsSpelli
ng, int& outFirstFoundOffset, GrammarDetail& outGrammarDetail); | 84 String findFirstMisspellingOrBadGrammar(bool checkGrammar, bool& outIsSpelli
ng, int& outFirstFoundOffset, GrammarDetail& outGrammarDetail); |
85 String findFirstBadGrammar(GrammarDetail& outGrammarDetail, int& outGrammarP
hraseOffset, bool markAll); | 85 String findFirstBadGrammar(GrammarDetail& outGrammarDetail, int& outGrammarP
hraseOffset, bool markAll); |
86 int findFirstGrammarDetail(const Vector<GrammarDetail>& grammarDetails, int
badGrammarPhraseLocation, int badGrammarPhraseLength, int startOffset, int endOf
fset, bool markAll); | |
87 void markAllMisspellings(RefPtr<Range>& firstMisspellingRange); | 86 void markAllMisspellings(RefPtr<Range>& firstMisspellingRange); |
88 void markAllBadGrammar(); | 87 void markAllBadGrammar(); |
89 | 88 |
90 private: | 89 private: |
91 EditorClient* m_client; | 90 EditorClient* m_client; |
92 RefPtr<Range> m_range; | 91 RefPtr<Range> m_range; |
93 | 92 |
| 93 int findFirstGrammarDetail(const Vector<GrammarDetail>& grammarDetails, int
badGrammarPhraseLocation, int startOffset, int endOffset, bool markAll) const; |
94 bool unifiedTextCheckerEnabled() const; | 94 bool unifiedTextCheckerEnabled() const; |
95 }; | 95 }; |
96 | 96 |
97 void checkTextOfParagraph(TextCheckerClient*, const String&, TextCheckingTypeMas
k, Vector<TextCheckingResult>&); | 97 void checkTextOfParagraph(TextCheckerClient*, const String&, TextCheckingTypeMas
k, Vector<TextCheckingResult>&); |
98 | 98 |
99 bool unifiedTextCheckerEnabled(const Frame*); | 99 bool unifiedTextCheckerEnabled(const Frame*); |
100 | 100 |
101 } // namespace WebCore | 101 } // namespace WebCore |
102 | 102 |
103 #endif // TextCheckingHelper_h | 103 #endif // TextCheckingHelper_h |
OLD | NEW |