fix bug 96530. delay loading of unicharutil dll till we really need it.
r=dp sr=waterson
This commit is contained in:
Родитель
f32e210d7a
Коммит
293ca72ce7
|
@ -100,6 +100,11 @@ static nsICaseConversion* gCaseConv = nsnull;
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsTextTransformer::Initialize()
|
nsTextTransformer::Initialize()
|
||||||
|
{
|
||||||
|
nsresult res = NS_OK;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static nsresult EnsureCaseConv()
|
||||||
{
|
{
|
||||||
nsresult res = NS_OK;
|
nsresult res = NS_OK;
|
||||||
if (!gCaseConv) {
|
if (!gCaseConv) {
|
||||||
|
@ -880,7 +885,8 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
if (!isWhitespace) {
|
if (!isWhitespace) {
|
||||||
switch (mTextTransform) {
|
switch (mTextTransform) {
|
||||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||||
// if the first character is szlig
|
// if the first character is szlig
|
||||||
if(kSzlig == *result)
|
if(kSzlig == *result)
|
||||||
{
|
{
|
||||||
|
@ -900,11 +906,13 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||||
gCaseConv->ToLower(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToLower(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||||
{
|
{
|
||||||
gCaseConv->ToUpper(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToUpper(result, result, wordLen);
|
||||||
|
|
||||||
// first we search for German Szlig
|
// first we search for German Szlig
|
||||||
PRInt32 szligCnt = CountGermanSzlig(result, wordLen);
|
PRInt32 szligCnt = CountGermanSzlig(result, wordLen);
|
||||||
|
@ -1248,13 +1256,16 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
||||||
if (!isWhitespace) {
|
if (!isWhitespace) {
|
||||||
switch (mTextTransform) {
|
switch (mTextTransform) {
|
||||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||||
gCaseConv->ToLower(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToLower(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||||
gCaseConv->ToUpper(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToUpper(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,11 @@ static nsICaseConversion* gCaseConv = nsnull;
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsTextTransformer::Initialize()
|
nsTextTransformer::Initialize()
|
||||||
|
{
|
||||||
|
nsresult res = NS_OK;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static nsresult EnsureCaseConv()
|
||||||
{
|
{
|
||||||
nsresult res = NS_OK;
|
nsresult res = NS_OK;
|
||||||
if (!gCaseConv) {
|
if (!gCaseConv) {
|
||||||
|
@ -880,7 +885,8 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
if (!isWhitespace) {
|
if (!isWhitespace) {
|
||||||
switch (mTextTransform) {
|
switch (mTextTransform) {
|
||||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||||
// if the first character is szlig
|
// if the first character is szlig
|
||||||
if(kSzlig == *result)
|
if(kSzlig == *result)
|
||||||
{
|
{
|
||||||
|
@ -900,11 +906,13 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||||
gCaseConv->ToLower(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToLower(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||||
{
|
{
|
||||||
gCaseConv->ToUpper(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToUpper(result, result, wordLen);
|
||||||
|
|
||||||
// first we search for German Szlig
|
// first we search for German Szlig
|
||||||
PRInt32 szligCnt = CountGermanSzlig(result, wordLen);
|
PRInt32 szligCnt = CountGermanSzlig(result, wordLen);
|
||||||
|
@ -1248,13 +1256,16 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
||||||
if (!isWhitespace) {
|
if (!isWhitespace) {
|
||||||
switch (mTextTransform) {
|
switch (mTextTransform) {
|
||||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||||
gCaseConv->ToLower(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToLower(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||||
gCaseConv->ToUpper(result, result, wordLen);
|
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||||
|
gCaseConv->ToUpper(result, result, wordLen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче