Commit 87e4fb0e authored by Alexander.Trofimov's avatar Alexander.Trofimov

add pivot data range to formula dependencies

parent 958a09e0
...@@ -5007,7 +5007,16 @@ function CT_WorksheetSource() { ...@@ -5007,7 +5007,16 @@ function CT_WorksheetSource() {
this.name = null; this.name = null;
this.sheet = null; this.sheet = null;
this.id = null; this.id = null;
//Private
this.formula = null;
} }
CT_WorksheetSource.prototype.onFormulaEvent = function (type, eventData) {
if (AscCommon.c_oNotifyParentType.CanDo === type) {
return true;
} else if (AscCommon.c_oNotifyParentType.ChangeFormula === type) {
// ToDo update formula with eventData.assemble;
}
};
CT_WorksheetSource.prototype.readAttributes = function(attr, uq) { CT_WorksheetSource.prototype.readAttributes = function(attr, uq) {
if (attr()) { if (attr()) {
var vals = attr(); var vals = attr();
...@@ -5028,6 +5037,18 @@ CT_WorksheetSource.prototype.readAttributes = function(attr, uq) { ...@@ -5028,6 +5037,18 @@ CT_WorksheetSource.prototype.readAttributes = function(attr, uq) {
if (undefined !== val) { if (undefined !== val) {
this.id = uq(val); this.id = uq(val);
} }
var text;
if (this.name) {
text = this.name;
} else if (this.ref && this.sheet) {
text = AscCommon.parserHelp.get3DRef(this.sheet, this.ref);
}
if (text) {
this.formula = new AscCommonExcel.parserFormula(text, this, AscCommonExcel.g_DefNameWorksheet);
this.formula.parse();
this.formula.buildDependencies();
}
} }
}; };
CT_WorksheetSource.prototype.toXml = function(writer, name) { CT_WorksheetSource.prototype.toXml = function(writer, name) {
......
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