⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spellchecker.cpp

📁 管理项目进度工具的原代码
💻 CPP
字号:
// SpellChecker.cpp: implementation of the CSpellChecker class.
//
//////////////////////////////////////////////////////////////////////

#include "SpellChecker.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSpellChecker::CSpellChecker(const char* szAffPath, const char* szDicPath) : MySpell(szAffPath, szDicPath)
{

}

CSpellChecker::~CSpellChecker()
{

}

bool CSpellChecker::IsValid()
{
	return MySpell::isvalid();
}

void CSpellChecker::Release()
{
	delete this;
}

bool CSpellChecker::CheckSpelling(const char* szWord)
{
	return (spell(szWord) > 0);
}

bool CSpellChecker::CheckSpelling(const char* szWord, char**& pSuggestions, int& nNumSuggestions)
{
	bool bResult = CheckSpelling(szWord);

	if (!bResult)
		nNumSuggestions = suggest(&pSuggestions, szWord);

	return bResult;
}

void CSpellChecker::FreeSuggestions(char**& pSuggestions)
{
	free(pSuggestions);
	pSuggestions = NULL;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -