spellchecks marks words with initial caps as spelled wrong. bug 229215, r=dwitte, sr=alecf.

This commit is contained in:
mvl%exedo.nl 2004-01-01 14:53:37 +00:00
Родитель a49b36a72c
Коммит 1a51efecf0
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -39,9 +39,12 @@
#include "nsICharsetAlias.h"
#include "nsReadableUtils.h"
#include "nsIServiceManager.h"
#include "nsUnicharUtilCIID.h"
#include "nsCRT.h"
#include "cattable.h"
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
NS_IMPL_ISUPPORTS1(mozEnglishWordUtils, mozISpellI18NUtil)
mozEnglishWordUtils::mozEnglishWordUtils()
@ -74,6 +77,12 @@ NS_IMETHODIMP mozEnglishWordUtils::GetRootForm(const PRUnichar *aWord, PRUint32
*count = 0;
if (!mCaseConv) {
mCaseConv = do_GetService(kUnicharUtilCID);
if (!mCaseConv)
return NS_ERROR_FAILURE;
}
mozEnglishWordUtils::myspCapitalization ct = captype(word);
switch (ct)
{
@ -138,7 +147,6 @@ NS_IMETHODIMP mozEnglishWordUtils::GetRootForm(const PRUnichar *aWord, PRUint32
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(1, tmpPtr);
return NS_ERROR_OUT_OF_MEMORY;
}
mCaseConv->ToLower(tmpPtr[1], tmpPtr[1], length);
*words = tmpPtr;
*count = 2;