00001 /* AbiWord 00002 * Copyright (C) 2005 Martin Sevior <msevior@physics.unimelb.edu.au> 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 * 02110-1301 USA. 00018 */ 00019 00020 #ifndef __Abi_GrammarUtil_h__ 00021 #define __Abi_GrammarUtil_h__ 00022 #include "ut_string_class.h" 00023 #include "ut_types.h" 00024 #include "ut_vector.h" 00025 00026 class AbiGrammarError 00027 { 00028 public: 00029 AbiGrammarError(void); 00030 virtual ~AbiGrammarError(void); 00031 UT_sint32 m_iErrLow; 00032 UT_sint32 m_iErrHigh; 00033 UT_sint32 m_iWordNum; 00034 UT_UTF8String m_sErrorDesc; 00035 }; 00036 00037 class PieceOfText 00038 { 00039 public: 00040 PieceOfText(void); 00041 virtual ~PieceOfText(void); 00042 UT_sint32 iInLow; 00043 UT_sint32 iInHigh; 00044 UT_sint32 nWords; 00045 bool bHasStop; 00046 UT_UTF8String sText; 00047 bool m_bGrammarChecked; 00048 bool m_bGrammarOK; 00049 UT_GenericVector<AbiGrammarError *> m_vecGrammarErrors; 00050 UT_UTF8String m_sSuggestion; 00051 UT_sint32 countWords(void); 00052 }; 00053 00054 #endif // __Abi_GrammarUtil_h__