This commit is contained in:
Fabian Jakobs 2011-12-01 15:45:52 +01:00
commit 36b05a9bd4
52 changed files with 2273 additions and 924 deletions

View file

@ -2079,6 +2079,12 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
};
(function() {
this.isEequal = function(range) {
return this.start.row == range.start.row &&
this.end.row == range.end.row &&
this.start.column == range.start.column &&
this.end.column == range.end.column
};
this.toString = function() {
return ("Range: [" + this.start.row + "/" + this.start.column +
@ -2581,7 +2587,7 @@ var trimBeginRegexp = /^\s\s*/;
var trimEndRegexp = /\s\s*$/;
exports.stringTrimLeft = function (string) {
return string.replace(trimBeginRegexp, '')
return string.replace(trimBeginRegexp, '');
};
exports.stringTrimRight = function (string) {
@ -2598,11 +2604,11 @@ exports.copyObject = function(obj) {
exports.copyArray = function(array){
var copy = [];
for (i=0, l=array.length; i<l; i++) {
for (var i=0, l=array.length; i<l; i++) {
if (array[i] && typeof array[i] == "object")
copy[i] = this.copyObject( array[i] );
else
copy[i] = array[i]
copy[i] = array[i];
}
return copy;
};
@ -2621,7 +2627,7 @@ exports.deepCopy = function (obj) {
}
}
return copy;
}
};
exports.arrayToMap = function(arr) {
var map = {};
@ -2659,7 +2665,7 @@ exports.deferredCall = function(fcn) {
deferred.cancel();
timer = setTimeout(callback, timeout || 0);
return deferred;
}
};
deferred.schedule = deferred;