Commit 272a815f authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 26663 - Скрытые значения фильтрованного диапазона учитываются при построении диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58529 954022d7-b5bf-4e40-9824-e11837661b57
parent b01ab8be
......@@ -226,7 +226,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
var settings = new asc_ChartSettings();
settings.type = type;
var chartSeries = {series: this.getAscChartSeriesDefault(type), parsedHeaders: {bLeft: true, bTop: true}};
var chart_space = DrawingObjectsController.prototype._getChartSpace(chartSeries, settings);
var chart_space = DrawingObjectsController.prototype._getChartSpace(chartSeries, settings, true);
if(window["Asc"]["editor"])
{
......
......@@ -2945,41 +2945,41 @@ DrawingObjectsController.prototype =
ret.type = calc_chart_type;
return ret;
},
_getChartSpace: function (chartSeries, options) {
_getChartSpace: function (chartSeries, options, bUseCache) {
switch (options.type) {
case c_oAscChartTypeSettings.lineNormal:
case c_oAscChartTypeSettings.lineNormalMarker:
return CreateLineChart(chartSeries, GROUPING_STANDARD);
return CreateLineChart(chartSeries, GROUPING_STANDARD, bUseCache);
case c_oAscChartTypeSettings.lineStacked:
case c_oAscChartTypeSettings.lineStackedMarker:
return CreateLineChart(chartSeries, GROUPING_STACKED);
return CreateLineChart(chartSeries, GROUPING_STACKED, bUseCache);
case c_oAscChartTypeSettings.lineStackedPer:
case c_oAscChartTypeSettings.lineStackedPerMarker:
return CreateLineChart(chartSeries, GROUPING_PERCENT_STACKED);
return CreateLineChart(chartSeries, GROUPING_PERCENT_STACKED, bUseCache);
case c_oAscChartTypeSettings.barNormal:
return CreateBarChart(chartSeries, BAR_GROUPING_CLUSTERED);
return CreateBarChart(chartSeries, BAR_GROUPING_CLUSTERED, bUseCache);
case c_oAscChartTypeSettings.barStacked:
return CreateBarChart(chartSeries, BAR_GROUPING_STACKED);
return CreateBarChart(chartSeries, BAR_GROUPING_STACKED, bUseCache);
case c_oAscChartTypeSettings.barStackedPer:
return CreateBarChart(chartSeries, BAR_GROUPING_PERCENT_STACKED);
return CreateBarChart(chartSeries, BAR_GROUPING_PERCENT_STACKED, bUseCache);
case c_oAscChartTypeSettings.hBarNormal:
return CreateHBarChart(chartSeries, BAR_GROUPING_CLUSTERED);
return CreateHBarChart(chartSeries, BAR_GROUPING_CLUSTERED, bUseCache);
case c_oAscChartTypeSettings.hBarStacked:
return CreateHBarChart(chartSeries, BAR_GROUPING_STACKED);
return CreateHBarChart(chartSeries, BAR_GROUPING_STACKED, bUseCache);
case c_oAscChartTypeSettings.hBarStackedPer:
return CreateHBarChart(chartSeries, BAR_GROUPING_PERCENT_STACKED);
return CreateHBarChart(chartSeries, BAR_GROUPING_PERCENT_STACKED, bUseCache);
case c_oAscChartTypeSettings.areaNormal:
return CreateAreaChart(chartSeries, GROUPING_STANDARD);
return CreateAreaChart(chartSeries, GROUPING_STANDARD, bUseCache);
case c_oAscChartTypeSettings.areaStacked:
return CreateAreaChart(chartSeries, GROUPING_STACKED);
return CreateAreaChart(chartSeries, GROUPING_STACKED, bUseCache);
case c_oAscChartTypeSettings.areaStackedPer:
return CreateAreaChart(chartSeries, GROUPING_PERCENT_STACKED);
return CreateAreaChart(chartSeries, GROUPING_PERCENT_STACKED, bUseCache);
case c_oAscChartTypeSettings.stock:
return CreateStockChart(chartSeries);
return CreateStockChart(chartSeries, bUseCache);
case c_oAscChartTypeSettings.doughnut:
return CreatePieChart(chartSeries, true);
return CreatePieChart(chartSeries, true, bUseCache);
case c_oAscChartTypeSettings.pie:
return CreatePieChart(chartSeries, false);
return CreatePieChart(chartSeries, false, bUseCache);
case c_oAscChartTypeSettings.scatter:
case c_oAscChartTypeSettings.scatterLine:
case c_oAscChartTypeSettings.scatterLineMarker:
......@@ -2987,7 +2987,7 @@ DrawingObjectsController.prototype =
case c_oAscChartTypeSettings.scatterNone:
case c_oAscChartTypeSettings.scatterSmooth:
case c_oAscChartTypeSettings.scatterSmoothMarker:
return CreateScatterChart(chartSeries);
return CreateScatterChart(chartSeries, bUseCache);
// radar return CreateRadarChart(chartSeries);
}
......@@ -3017,7 +3017,7 @@ DrawingObjectsController.prototype =
}
else if(isRealObject(chart))
{
ret = DrawingObjectsController.prototype._getChartSpace.call(this, chart, options);
ret = DrawingObjectsController.prototype._getChartSpace.call(this, chart, options, true);
ret.setBDeleted(false);
ret.setStyle(2);
ret.setSpPr(new CSpPr());
......
This diff is collapsed.
......@@ -507,7 +507,10 @@ function BinaryPPTYLoader()
var _sl_count = s.GetULong();
for (var i = 0; i < _sl_count; i++)
{
this.presentation.slideLayouts[i] = this.ReadSlideLayout();
this.presentation.slideLayouts[i].setSlideSize(this.presentation.Width, this.presentation.Height);
}
}
if (!this.IsThemeLoader)
......@@ -519,7 +522,10 @@ function BinaryPPTYLoader()
var _s_count = s.GetULong();
for (var i = 0; i < _s_count; i++)
{
this.presentation.insertSlide(i, this.ReadSlide(i)) ;
this.presentation.Slides[i].setSlideSize(this.presentation.Width, this.presentation.Height);
}
}
if (undefined != _main_tables["25"])
......
......@@ -2552,7 +2552,7 @@ CPresentation.prototype =
this.Width = Data.oldW;
this.Height = Data.oldH;
this.changeSlideSizeFunction(kw, kh);
this.changeSlideSizeFunction(this.Width, this.Height);
editor.asc_fireCallback("asc_onPresentationSize", this.Width, this.Height);
break;
......@@ -2595,7 +2595,7 @@ CPresentation.prototype =
var kh = Data.newH/this.Height;
this.Width = Data.newW;
this.Height = Data.newH;
this.changeSlideSizeFunction(kw, kh);
this.changeSlideSizeFunction(this.Width, this.Height);
editor.asc_fireCallback("asc_onPresentationSize", this.Width, this.Height);
break;
}
......@@ -3056,15 +3056,10 @@ CPresentation.prototype =
_new_master.presentation = this;
var _master_width = _new_master.Width;
var _master_height = _new_master.Height;
if(_master_height !== this.Height || _master_width !== this.Width)
themeInfo.Master.changeSize(this.Width, this.Height);
for(i = 0; i < themeInfo.Master.sldLayoutLst.length; ++i)
{
var kw = this.Width/_master_width;
var kh = this.Height/_master_height;
themeInfo.Master.changeSize(kw, kh);
for(i = 0; i < themeInfo.Master.sldLayoutLst.length; ++i)
{
themeInfo.Master.sldLayoutLst[i].changeSize(kw, kh);
}
themeInfo.Master.sldLayoutLst[i].changeSize(this.Width, this.Height);
}
var slides_array = [];
for(i = 0; i < arr_ind.length; ++i)
......@@ -3092,22 +3087,22 @@ CPresentation.prototype =
this.Document_UpdateInterfaceState();
},
changeSlideSizeFunction: function(kw, kh)
changeSlideSizeFunction: function(width, height)
{
ExecuteNoHistory(function()
{
for(var i = 0; i < this.slideMasters.length; ++i)
{
this.slideMasters[i].changeSize(kw, kh);
this.slideMasters[i].changeSize(width, height);
var master = this.slideMasters[i];
for(var j = 0; j < master.sldLayoutLst.length; ++j)
{
master.sldLayoutLst[j].changeSize(kw, kh);
master.sldLayoutLst[j].changeSize(width, height);
}
}
for(var i = 0; i < this.Slides.length; ++i)
{
this.Slides[i].changeSize(kw, kh);
this.Slides[i].changeSize(width, height);
}
}, this, []);
},
......@@ -3118,11 +3113,9 @@ CPresentation.prototype =
{
History.Create_NewPoint();
History.Add(this, {Type: historyitem_Presentation_SlideSize, oldW: this.Width, newW: width, oldH: this.Height, newH: height});
var kw = width/this.Width;
var kh = height/this.Height;
this.Width = width;
this.Height = height;
this.changeSlideSizeFunction(kw, kh);
this.changeSlideSizeFunction(this.Width, this.Height);
this.Recalculate();
}
},
......@@ -3543,9 +3536,8 @@ CPresentation.prototype =
this.Height = h;
CollaborativeEditing.ScaleX = kw;
CollaborativeEditing.ScaleY = kh;
this.changeSlideSizeFunction(kw, kh);
this.changeSlideSizeFunction(this.Width, this.Height);
editor.asc_fireCallback("asc_onPresentationSize", this.Width, this.Height);
break;
}
case historyitem_Presentation_AddSlideMaster:
......
......@@ -755,9 +755,10 @@ Slide.prototype =
}
},
changeSize: function(kw, kh)
changeSize: function(width, height)
{
this.setSlideSize(this.Width*kw, this.Height*kh);
var kw = width/this.Width, kh = height/this.Height;
this.setSlideSize(width, height);
for(var i = 0; i < this.cSld.spTree.length; ++i)
{
this.cSld.spTree[i].changeSize(kw, kh);
......
......@@ -212,6 +212,8 @@ CHistory.prototype =
this.Points[this.Index].Items.push( Item );
var bZIndexManager = !(typeof ZIndexManager === "undefined");
var bPresentation = !(typeof CPresentation === "undefined");
var bSlide = !(typeof Slide === "undefined");
if ( ( Class instanceof CDocument && ( historyitem_Document_AddItem === Data.Type || historyitem_Document_RemoveItem === Data.Type ) ) ||
( Class instanceof CDocumentContent && ( historyitem_DocumentContent_AddItem === Data.Type || historyitem_DocumentContent_RemoveItem === Data.Type ) ) ||
( Class instanceof CTable && ( historyitem_Table_AddRow === Data.Type || historyitem_Table_RemoveRow === Data.Type ) ) ||
......@@ -219,7 +221,10 @@ CHistory.prototype =
( Class instanceof Paragraph && ( historyitem_Paragraph_AddItem === Data.Type || historyitem_Paragraph_RemoveItem === Data.Type ) ) ||
( Class instanceof ParaHyperlink && ( historyitem_Hyperlink_AddItem === Data.Type || historyitem_Hyperlink_RemoveItem === Data.Type ) ) ||
( Class instanceof ParaRun && ( historyitem_ParaRun_AddItem === Data.Type || historyitem_ParaRun_RemoveItem === Data.Type ) ) ||
( bZIndexManager && Class instanceof ZIndexManager && (historyitem_ZIndexManagerRemoveItem === Data.Type || historyitem_ZIndexManagerAddItem === Data.Type )))
( bZIndexManager && Class instanceof ZIndexManager && (historyitem_ZIndexManagerRemoveItem === Data.Type || historyitem_ZIndexManagerAddItem === Data.Type )) ||
( bPresentation && Class instanceof CPresentation && (historyitem_Presentation_AddSlide === Data.Type || historyitem_Presentation_RemoveSlide === Data.Type)) ||
( bSlide && Class instanceof Slide && (historyitem_SlideAddToSpTree === Data.Type || historyitem_SlideRemoveFromSpTree === Data.Type))
)
{
var bAdd = ( ( Class instanceof CDocument && historyitem_Document_AddItem === Data.Type ) ||
( Class instanceof CDocumentContent && historyitem_DocumentContent_AddItem === Data.Type ) ||
......@@ -228,7 +233,9 @@ CHistory.prototype =
( Class instanceof Paragraph && historyitem_Paragraph_AddItem === Data.Type ) ||
( Class instanceof ParaHyperlink && historyitem_Hyperlink_AddItem === Data.Type ) ||
( Class instanceof ParaRun && historyitem_ParaRun_AddItem === Data.Type ) ||
(bZIndexManager && Class instanceof ZIndexManager && historyitem_ZIndexManagerAddItem === Data.Type )
(bZIndexManager && Class instanceof ZIndexManager && historyitem_ZIndexManagerAddItem === Data.Type ) ||
( bPresentation && Class instanceof CPresentation && (historyitem_Presentation_AddSlide === Data.Type )) ||
( bSlide && Class instanceof Slide && (historyitem_SlideAddToSpTree === Data.Type))
) ? true : false;
var Count = 1;
......
......@@ -22,7 +22,7 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function()
return [];
// Если изменения происходят в специальном пустом параграфе-конце секции, тогда запускаем обычный пересчет
if (true === this.LogicDocument.Pages[this.Get_StartPage_Absolute()].Check_EndSectionPara(this))
if ( this.LogicDocument && true === this.LogicDocument.Pages[this.Get_StartPage_Absolute()].Check_EndSectionPara(this))
return [];
// Здесь мы отдельно обрабатываем случаи быстрого пересчета параграфов, которые были разбиты на 1-2
......
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