зеркало из https://github.com/mozilla/pjs.git
changing api for 2 string to force a output type.
This commit is contained in:
Родитель
11161e82c4
Коммит
8a236c5082
|
@ -37,6 +37,5 @@
|
|||
void setHint(in boolean right);
|
||||
boolean getHint();
|
||||
noscript xpidl nsIEnumerator getEnumerator();
|
||||
|
||||
DOMString toString();
|
||||
DOMString toString(in DOMString formatType, in unsigned long flags, in int wrapCount);
|
||||
};
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
|
||||
NS_IMETHOD GetEnumerator(nsIEnumerator** aReturn)=0;
|
||||
|
||||
NS_IMETHOD ToString(nsString& aReturn)=0;
|
||||
NS_IMETHOD ToString(const nsString& aFormatType, PRUint32 aFlags, PRInt32 aWrapCount, nsString& aReturn)=0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ public:
|
|||
NS_IMETHOD SetHint(PRBool aRight); \
|
||||
NS_IMETHOD GetHint(PRBool* aReturn); \
|
||||
NS_IMETHOD GetEnumerator(nsIEnumerator** aReturn); \
|
||||
NS_IMETHOD ToString(nsString& aReturn); \
|
||||
NS_IMETHOD ToString(const nsString& aFormatType, PRUint32 aFlags, PRInt32 aWrapCount, nsString& aReturn); \
|
||||
|
||||
|
||||
|
||||
|
@ -143,7 +143,7 @@ public:
|
|||
NS_IMETHOD SetHint(PRBool aRight) { return _to SetHint(aRight); } \
|
||||
NS_IMETHOD GetHint(PRBool* aReturn) { return _to GetHint(aReturn); } \
|
||||
NS_IMETHOD GetEnumerator(nsIEnumerator** aReturn) { return _to GetEnumerator(aReturn); } \
|
||||
NS_IMETHOD ToString(nsString& aReturn) { return _to ToString(aReturn); } \
|
||||
NS_IMETHOD ToString(const nsString& aFormatType, PRUint32 aFlags, PRInt32 aWrapCount, nsString& aReturn) { return _to ToString(aFormatType, aFlags, aWrapCount, aReturn); } \
|
||||
|
||||
|
||||
extern "C" NS_DOM nsresult NS_InitSelectionClass(nsIScriptContext *aContext, void **aPrototype);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
/* AUTO-GENERATED. DO NOT EDIT!!! */
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsnum.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nscore.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
/* AUTO-GENERATED. DO NOT EDIT!!! */
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsnum.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nscore.h"
|
||||
|
@ -918,6 +919,9 @@ SelectionToString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *
|
|||
nsIDOMSelection *nativeThis = (nsIDOMSelection*)nsJSUtils::nsGetNativeThis(cx, obj);
|
||||
nsresult result = NS_OK;
|
||||
nsAutoString nativeRet;
|
||||
nsAutoString b0;
|
||||
PRUint32 b1;
|
||||
PRInt32 b2;
|
||||
// If there's no private data, this must be the prototype, so ignore
|
||||
if (nsnull == nativeThis) {
|
||||
return JS_TRUE;
|
||||
|
@ -932,8 +936,19 @@ SelectionToString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *
|
|||
if (NS_FAILED(result)) {
|
||||
return nsJSUtils::nsReportError(cx, obj, result);
|
||||
}
|
||||
if (argc < 3) {
|
||||
return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR);
|
||||
}
|
||||
|
||||
result = nativeThis->ToString(nativeRet);
|
||||
nsJSUtils::nsConvertJSValToString(b0, cx, argv[0]);
|
||||
if (!JS_ValueToInt32(cx, argv[1], (int32 *)&b1)) {
|
||||
return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_NUMBER_ERR);
|
||||
}
|
||||
if (!JS_ValueToInt32(cx, argv[2], (int32 *)&b2)) {
|
||||
return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_NOT_NUMBER_ERR);
|
||||
}
|
||||
|
||||
result = nativeThis->ToString(b0, b1, b2, nativeRet);
|
||||
if (NS_FAILED(result)) {
|
||||
return nsJSUtils::nsReportError(cx, obj, result);
|
||||
}
|
||||
|
@ -1001,7 +1016,7 @@ static JSFunctionSpec SelectionMethods[] =
|
|||
{"removeSelectionListener", SelectionRemoveSelectionListener, 1},
|
||||
{"setHint", SelectionSetHint, 1},
|
||||
{"getHint", SelectionGetHint, 0},
|
||||
{"toString", SelectionToString, 0},
|
||||
{"toString", SelectionToString, 3},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
/* AUTO-GENERATED. DO NOT EDIT!!! */
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsnum.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nscore.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче