зеркало из https://github.com/mozilla/pjs.git
Added a mapping method to take PRUnichar* as an input string, bug 125077, r=ftang, sr=blizzard.
This commit is contained in:
Родитель
5a3adb9fb3
Коммит
1cb9cea651
|
@ -56,6 +56,7 @@ public:
|
|||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITEXTTRANSFORM_IID)
|
||||
|
||||
NS_IMETHOD Change( const PRUnichar* aText, PRInt32 aTextLength, nsString& aResult) = 0;
|
||||
NS_IMETHOD Change( nsString& aText, nsString& aResult) = 0;
|
||||
|
||||
};
|
||||
|
|
|
@ -136,6 +136,7 @@ public:
|
|||
|
||||
nsHankakuToZenkaku() ;
|
||||
virtual ~nsHankakuToZenkaku() ;
|
||||
NS_IMETHOD Change( const PRUnichar* aText, PRInt32 aTextLength, nsString& aResult);
|
||||
NS_IMETHOD Change( nsString& aText, nsString& aResult);
|
||||
|
||||
};
|
||||
|
@ -150,6 +151,17 @@ nsHankakuToZenkaku::~nsHankakuToZenkaku()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHankakuToZenkaku::Change( const PRUnichar* aText, PRInt32 aTextLength, nsString& aResult)
|
||||
{
|
||||
PRInt32 ol;
|
||||
aResult.SetCapacity(aTextLength);
|
||||
|
||||
HankakuToZenkaku ( aText, aTextLength, (PRUnichar*) aResult.get(), aTextLength, &ol);
|
||||
aResult.SetLength(ol);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHankakuToZenkaku::Change( nsString& aText, nsString& aResult)
|
||||
{
|
||||
aResult = aText;
|
||||
|
|
Загрузка…
Ссылка в новой задаче