Commit 90040a58 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete unused asc.getProperty

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53340 954022d7-b5bf-4e40-9824-e11837661b57
parent 154cf729
...@@ -18,15 +18,6 @@ ...@@ -18,15 +18,6 @@
strictEqual(Asc.typeOf(new Function()), "function", "Asc.typeOf( new Function() )"); strictEqual(Asc.typeOf(new Function()), "function", "Asc.typeOf( new Function() )");
}); });
test("Asc.getProperty", function test_getProperty() {
strictEqual(Asc.getProperty("name"), undefined, 'Asc.getProperty("name")');
strictEqual(Asc.getProperty("name", {name: "Alice"}), "Alice", 'Asc.getProperty("name", {name: "Alice"})');
strictEqual(Asc.getProperty("name", {name: "Alice"}, {name: "Cora"}), "Alice", 'Asc.getProperty("name", {name: "Alice"}, {name: "Cora"})');
strictEqual(Asc.getProperty("name", {age: "18"}, {name: "Alice"}), "Alice", 'Asc.getProperty("name", {age: "18"}, {name: "Alice"})');
strictEqual(Asc.getProperty("name", {employee: {name: "Alice", age: "18"}}), undefined, 'Asc.getProperty("name", {employee: {name: "Alice", age: "18"}})');
strictEqual(Asc.getProperty("employee.name", {employee: {name: "Alice", age: "18"}}), "Alice", 'Asc.getProperty("employee.name", {employee: {name: "Alice", age: "18"}})');
});
test("Asc.lastIndexOf", function test_lastIndexOf() { test("Asc.lastIndexOf", function test_lastIndexOf() {
strictEqual(Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 8), 5, 'Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 8)'); strictEqual(Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 8), 5, 'Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 8)');
strictEqual(Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 15), 13, 'Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 13)'); strictEqual(Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 15), 13, 'Asc.lastIndexOf("aabb aa bb bbaa", /a{2}/, 13)');
......
...@@ -41,27 +41,6 @@ ...@@ -41,27 +41,6 @@
return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase(); return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
} }
function getProperty(name) {
var n = name.split("."), r = undefined, i;
function find(prop, obj) {
if (obj === undefined || obj === null) {return undefined;}
var ref = obj;
for (var i = 0; i < prop.length; ++i) {
var p = ref[ prop[i] ];
if (p === undefined) {return undefined;}
ref = p;
}
return ref;
}
for (i = 1; i < arguments.length; ++i) {
if ( ( r = find(n, arguments[i]) ) !== undefined ) {break;}
}
return r;
}
function lastIndexOf(s, regExp, fromIndex) { function lastIndexOf(s, regExp, fromIndex) {
var end = fromIndex >= 0 && fromIndex <= s.length ? fromIndex : s.length; var end = fromIndex >= 0 && fromIndex <= s.length ? fromIndex : s.length;
for (var i = end - 1; i >= 0; --i) { for (var i = end - 1; i >= 0; --i) {
...@@ -1103,7 +1082,6 @@ ...@@ -1103,7 +1082,6 @@
*/ */
window["Asc"].applyFunction = applyFunction; window["Asc"].applyFunction = applyFunction;
window["Asc"].typeOf = typeOf; window["Asc"].typeOf = typeOf;
window["Asc"].getProperty = getProperty;
window["Asc"].lastIndexOf = lastIndexOf; window["Asc"].lastIndexOf = lastIndexOf;
window["Asc"].search = search; window["Asc"].search = search;
window["Asc"].round = round; window["Asc"].round = round;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
var asc_applyFunction = asc.applyFunction; var asc_applyFunction = asc.applyFunction;
var asc_calcnpt = asc.calcNearestPt; var asc_calcnpt = asc.calcNearestPt;
var asc_getcvt = asc.getCvtRatio; var asc_getcvt = asc.getCvtRatio;
var asc_getprop = asc.getProperty;
var asc_floor = asc.floor; var asc_floor = asc.floor;
var asc_ceil = asc.ceil; var asc_ceil = asc.ceil;
var asc_round = asc.round; var asc_round = asc.round;
...@@ -395,6 +394,7 @@ ...@@ -395,6 +394,7 @@
// Auto filters // Auto filters
this.autoFilters = new asc_AF(this); this.autoFilters = new asc_AF(this);
this.cellCommentator = new asc_CCellCommentator(this); this.cellCommentator = new asc_CCellCommentator(this);
this.objectRender = null;
this._init(); this._init();
...@@ -408,22 +408,6 @@ ...@@ -408,22 +408,6 @@
defaults: WorksheetViewSettings(), defaults: WorksheetViewSettings(),
option: function (name, value) {
var old = asc_getprop(name, this.settings);
if (name !== undefined && value !== undefined) {
var i = name.lastIndexOf(".");
if (i < 0) {
this.settings[name] = value;
} else {
var p = asc_getprop(name.slice(0, i), this.settings);
if (p === undefined) {return false;}
p[ name.slice(i + 1) ] = value;
}
return true;
}
return old;
},
getVisibleRange: function () { getVisibleRange: function () {
return this.visibleRange; return this.visibleRange;
}, },
...@@ -1083,7 +1067,7 @@ ...@@ -1083,7 +1067,7 @@
if ( commentList.length ) if ( commentList.length )
this.model.workbook.handlers.trigger("asc_onAddComments", commentList); this.model.workbook.handlers.trigger("asc_onAddComments", commentList);
}, },
_prepareDrawingObjects: function () { _prepareDrawingObjects: function () {
this.objectRender = new DrawingObjects(); this.objectRender = new DrawingObjects();
this.objectRender.init(this); this.objectRender.init(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment