spellchecks marks words with initial caps as spelled wrong. bug 229215, r=dwitte, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@150823 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0dca14299a
commit
fdea055cf0
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user