Bug 333659. Relanding new nsTextTransformer::GetCaseConv, should not affect anything. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218487 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
#include "nsLayoutAtoms.h"
|
||||
#endif
|
||||
|
||||
|
||||
nsICaseConversion* nsTextTransformer::gCaseConv = nsnull;
|
||||
PRBool nsTextTransformer::sWordSelectListenerPrefChecked = PR_FALSE;
|
||||
PRBool nsTextTransformer::sWordSelectEatSpaceAfter = PR_FALSE;
|
||||
PRBool nsTextTransformer::sWordSelectStopAtPunctuation = PR_FALSE;
|
||||
@@ -120,8 +120,6 @@ nsAutoTextBuffer::GrowTo(PRInt32 aNewSize, PRBool aCopyToHead)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static nsICaseConversion* gCaseConv = nsnull;
|
||||
|
||||
nsresult
|
||||
nsTextTransformer::Initialize()
|
||||
{
|
||||
@@ -142,7 +140,9 @@ nsTextTransformer::Initialize()
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
static nsresult EnsureCaseConv()
|
||||
|
||||
nsresult
|
||||
nsTextTransformer::EnsureCaseConv()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
if (!gCaseConv) {
|
||||
@@ -153,6 +153,13 @@ static nsresult EnsureCaseConv()
|
||||
return res;
|
||||
}
|
||||
|
||||
nsICaseConversion*
|
||||
nsTextTransformer::GetCaseConv()
|
||||
{
|
||||
EnsureCaseConv();
|
||||
return gCaseConv;
|
||||
}
|
||||
|
||||
void
|
||||
nsTextTransformer::Shutdown()
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ class nsIContent;
|
||||
class nsIFrame;
|
||||
class nsILineBreaker;
|
||||
class nsIWordBreaker;
|
||||
class nsICaseConversion;
|
||||
|
||||
// XXX I'm sure there are other special characters
|
||||
#define CH_NBSP 160
|
||||
@@ -345,6 +346,8 @@ public:
|
||||
return sWordSelectStopAtPunctuation;
|
||||
}
|
||||
|
||||
static nsICaseConversion* GetCaseConv();
|
||||
|
||||
static nsresult Initialize();
|
||||
static void Shutdown();
|
||||
|
||||
@@ -378,6 +381,8 @@ protected:
|
||||
PRInt32 ScanPreWrapWhiteSpace_B(PRInt32* aWordLen);
|
||||
PRInt32 ScanPreData_B(PRInt32* aWordLen);
|
||||
|
||||
static nsresult EnsureCaseConv();
|
||||
|
||||
// Converts the current text in the transform buffer from ascii to
|
||||
// Unicode
|
||||
void ConvertTransformedTextToUnicode();
|
||||
@@ -429,6 +434,8 @@ protected:
|
||||
static PRBool sWordSelectEatSpaceAfter; // should we include whitespace up to next word?
|
||||
static PRBool sWordSelectStopAtPunctuation; // should we stop at punctuation?
|
||||
|
||||
static nsICaseConversion* gCaseConv;
|
||||
|
||||
#ifdef DEBUG
|
||||
static void SelfTest(nsPresContext* aPresContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user