зеркало из https://github.com/mozilla/pjs.git
Length() moved in support class. In preparation for the big interface change.
This commit is contained in:
Родитель
e7568d2022
Коммит
656cf39083
|
@ -49,10 +49,9 @@ nsresult nsISO88597ToUnicode::CreateInstance(nsISupports ** aResult)
|
|||
//----------------------------------------------------------------------
|
||||
// Subclassing of nsTableDecoderSupport class [implementation]
|
||||
|
||||
NS_IMETHODIMP nsISO88597ToUnicode::Length(const char * aSrc,
|
||||
PRInt32 aSrcOffset,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
NS_IMETHODIMP nsISO88597ToUnicode::GetMaxLength(const char * aSrc,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
{
|
||||
// we are a single byte to Unicode converter, so...
|
||||
*aDestLength = aSrcLength;
|
||||
|
|
|
@ -50,9 +50,8 @@ protected:
|
|||
//--------------------------------------------------------------------
|
||||
// Subclassing of nsDecoderSupport class [declaration]
|
||||
|
||||
NS_IMETHOD Length(const char * aSrc, PRInt32 aSrcOffset, PRInt32 aSrcLength,
|
||||
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength);
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsISO88597ToUnicode_h___ */
|
||||
|
|
|
@ -49,10 +49,9 @@ nsresult nsLatin1ToUnicode::CreateInstance(nsISupports ** aResult)
|
|||
//----------------------------------------------------------------------
|
||||
// Subclassing of nsTableDecoderSupport class [implementation]
|
||||
|
||||
NS_IMETHODIMP nsLatin1ToUnicode::Length(const char * aSrc,
|
||||
PRInt32 aSrcOffset,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
NS_IMETHODIMP nsLatin1ToUnicode::GetMaxLength(const char * aSrc,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
{
|
||||
// we are a single byte to Unicode converter, so...
|
||||
*aDestLength = aSrcLength;
|
||||
|
|
|
@ -50,9 +50,8 @@ protected:
|
|||
//--------------------------------------------------------------------
|
||||
// Subclassing of nsDecoderSupport class [declaration]
|
||||
|
||||
NS_IMETHOD Length(const char * aSrc, PRInt32 aSrcOffset, PRInt32 aSrcLength,
|
||||
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength);
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsLatin1ToUnicode_h___ */
|
||||
|
|
|
@ -505,6 +505,14 @@ NS_IMETHODIMP nsDecoderSupport::Finish(PRUnichar * aDest, PRInt32 aDestOffset,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDecoderSupport::Length(const char * aSrc, PRInt32 aSrcOffset,
|
||||
PRInt32 aSrcLength, PRInt32 * aDestLength)
|
||||
{
|
||||
// XXX this will silently go away when interface will change and the right
|
||||
// method will be called because it's already there!!!
|
||||
return GetMaxLength(aSrc + aSrcOffset, aSrcLength, aDestLength);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDecoderSupport::Reset()
|
||||
{
|
||||
mBufferLength = 0;
|
||||
|
|
|
@ -234,6 +234,9 @@ public:
|
|||
*/
|
||||
virtual ~nsDecoderSupport();
|
||||
|
||||
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength) = 0;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Interface nsIUnicodeDecoder [declaration]
|
||||
|
||||
|
@ -242,6 +245,8 @@ public:
|
|||
PRInt32 * aSrcLength);
|
||||
NS_IMETHOD Finish(PRUnichar * aDest, PRInt32 aDestOffset,
|
||||
PRInt32 * aDestLength);
|
||||
NS_IMETHOD Length(const char * aSrc, PRInt32 aSrcOffset,
|
||||
PRInt32 aSrcLength, PRInt32 * aDestLength);
|
||||
NS_IMETHOD Reset();
|
||||
NS_IMETHOD SetInputErrorBehavior(PRInt32 aBehavior);
|
||||
};
|
||||
|
|
|
@ -51,10 +51,9 @@ nsresult nsUTF8ToUnicode::CreateInstance(nsISupports ** aResult)
|
|||
//----------------------------------------------------------------------
|
||||
// Subclassing of nsTableDecoderSupport class [implementation]
|
||||
|
||||
NS_IMETHODIMP nsUTF8ToUnicode::Length(const char * aSrc,
|
||||
PRInt32 aSrcOffset,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
NS_IMETHODIMP nsUTF8ToUnicode::GetMaxLength(const char * aSrc,
|
||||
PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength)
|
||||
{
|
||||
// we are a single byte to Unicode converter, so...
|
||||
*aDestLength = aSrcLength;
|
||||
|
|
|
@ -50,9 +50,8 @@ protected:
|
|||
//--------------------------------------------------------------------
|
||||
// Subclassing of nsDecoderSupport class [declaration]
|
||||
|
||||
NS_IMETHOD Length(const char * aSrc, PRInt32 aSrcOffset, PRInt32 aSrcLength,
|
||||
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
|
||||
PRInt32 * aDestLength);
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsUTF8ToUnicode_h___ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче