Commit 525f3623 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Автоопределение метода построения диаграммы(по строкам/по столбцам)

- Исправлен баг с переименованием листа с чартами

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49304 954022d7-b5bf-4e40-9824-e11837661b57
parent 29976bb2
......@@ -4251,6 +4251,17 @@ function DrawingObjects() {
var selectedRange = worksheet.getSelectedRange();
if (selectedRange) {
var box = selectedRange.getBBox0();
// Rows/Columns
if ( box.r2 - box.r1 < box.c2 - box.c1 ) {
chart.range.rows = true;
chart.range.columns = false;
}
else {
chart.range.rows = false;
chart.range.columns = true;
}
var startCell = new CellAddress(box.r1, box.c1, 0);
var endCell = new CellAddress(box.r2, box.c2, 0);
......
......@@ -2538,22 +2538,21 @@ Woorksheet.prototype.setName=function(name){
//перестраиваем формулы, если у них были ссылки на лист со старым именем.
for(var id in this.workbook.cwf) {
this.workbook.getWorksheetById(id)._ReBuildFormulas(this.workbook.cwf[id].cells,lastName,this.sName);
}
if ( this.Drawings ) {
for (var i = 0; i < this.Drawings.length; i++) {
var obj = this.Drawings[i];
if ( obj.isChart && obj.isChart() ) {
var drawingObject = this.Drawings[i];
if ( drawingObject.graphicObject && drawingObject.isChart() ) {
var _lastName = !rx_test_ws_name.test(lastName) ? "'" + lastName + "'" : lastName;
if ( obj.chart.range.interval.indexOf(_lastName + "!") >= 0 ) {
obj.chart.range.interval = obj.chart.range.interval.replace(_lastName, !rx_test_ws_name.test(this.sName) ? "'" + this.sName + "'" : this.sName);
obj.chart.range.intervalToIntervalObject();
obj.chart.buildSeries();
if ( drawingObject.graphicObject.chart.range.interval.indexOf(_lastName + "!") >= 0 ) {
drawingObject.graphicObject.chart.range.interval = drawingObject.graphicObject.chart.range.interval.replace(_lastName, !rx_test_ws_name.test(this.sName) ? "'" + this.sName + "'" : this.sName);
drawingObject.graphicObject.chart.rebuildSeries();
}
}
}
}
}
}
};
Woorksheet.prototype.renameWsToCollaborate=function(name){
var lastname = this.getName();
......
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