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
|
||||
nsTextTransformer::Initialize()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
return res;
|
||||
}
|
||||
static nsresult EnsureCaseConv()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
if (!gCaseConv) {
|
||||
|
@ -880,6 +885,7 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
|||
if (!isWhitespace) {
|
||||
switch (mTextTransform) {
|
||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||
// if the first character is szlig
|
||||
if(kSzlig == *result)
|
||||
|
@ -900,10 +906,12 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
|||
}
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToLower(result, result, wordLen);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||
{
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToUpper(result, result, wordLen);
|
||||
|
||||
// first we search for German Szlig
|
||||
|
@ -1248,12 +1256,15 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
|||
if (!isWhitespace) {
|
||||
switch (mTextTransform) {
|
||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToLower(result, result, wordLen);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToUpper(result, result, wordLen);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -100,6 +100,11 @@ static nsICaseConversion* gCaseConv = nsnull;
|
|||
|
||||
nsresult
|
||||
nsTextTransformer::Initialize()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
return res;
|
||||
}
|
||||
static nsresult EnsureCaseConv()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
if (!gCaseConv) {
|
||||
|
@ -880,6 +885,7 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
|||
if (!isWhitespace) {
|
||||
switch (mTextTransform) {
|
||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||
// if the first character is szlig
|
||||
if(kSzlig == *result)
|
||||
|
@ -900,10 +906,12 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
|||
}
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToLower(result, result, wordLen);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||
{
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToUpper(result, result, wordLen);
|
||||
|
||||
// first we search for German Szlig
|
||||
|
@ -1248,12 +1256,15 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
|||
if (!isWhitespace) {
|
||||
switch (mTextTransform) {
|
||||
case NS_STYLE_TEXT_TRANSFORM_CAPITALIZE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToTitle(result, result, wordLen, !aInWord);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToLower(result, result, wordLen);
|
||||
break;
|
||||
case NS_STYLE_TEXT_TRANSFORM_UPPERCASE:
|
||||
if(NS_SUCCEEDED(EnsureCaseConv()))
|
||||
gCaseConv->ToUpper(result, result, wordLen);
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче