Commit c1449181 authored by Ilya Kirillov's avatar Ilya Kirillov

Merge branch 'hotfix/v4.1.2' into develop

# Conflicts:
#	word/Editor/Table.js
parents 2f749e6a 5215fa61
...@@ -3260,7 +3260,7 @@ DrawingObjectsController.prototype = ...@@ -3260,7 +3260,7 @@ DrawingObjectsController.prototype =
{ {
if(type === c_oAscChartTypeSettings.pie3d) if(type === c_oAscChartTypeSettings.pie3d)
{ {
if(!chart.view3D) //if(!chart.view3D)
{ {
chart.setView3D(new AscFormat.CView3d()); chart.setView3D(new AscFormat.CView3d());
} }
......
...@@ -1126,10 +1126,10 @@ ...@@ -1126,10 +1126,10 @@
window['AscDFH'].historyitem_Layout_SetH = 2101; window['AscDFH'].historyitem_Layout_SetH = 2101;
window['AscDFH'].historyitem_Layout_SetHMode = 2102; window['AscDFH'].historyitem_Layout_SetHMode = 2102;
window['AscDFH'].historyitem_Layout_SetLayoutTarget = 2103; window['AscDFH'].historyitem_Layout_SetLayoutTarget = 2103;
window['AscDFH'].historyitem_Layout_SetW = 2103; window['AscDFH'].historyitem_Layout_SetW = 2108;
window['AscDFH'].historyitem_Layout_SetWMode = 2104; window['AscDFH'].historyitem_Layout_SetWMode = 2104;
window['AscDFH'].historyitem_Layout_SetX = 2105; window['AscDFH'].historyitem_Layout_SetX = 2105;
window['AscDFH'].historyitem_Layout_SetXMode = 2105; window['AscDFH'].historyitem_Layout_SetXMode = 2109;
window['AscDFH'].historyitem_Layout_SetY = 2106; window['AscDFH'].historyitem_Layout_SetY = 2106;
window['AscDFH'].historyitem_Layout_SetYMode = 2107; window['AscDFH'].historyitem_Layout_SetYMode = 2107;
window['AscDFH'].historyitem_LegendEntry_SetDelete = 2108; window['AscDFH'].historyitem_LegendEntry_SetDelete = 2108;
......
...@@ -10750,7 +10750,10 @@ CTable.prototype = ...@@ -10750,7 +10750,10 @@ CTable.prototype =
this.Internal_CreateNewGrid( Rows_info ); this.Internal_CreateNewGrid( Rows_info );
// Возможен случай, когда у нас остались строки, полностью состоящие из объединенных вертикально ячеек // Пробегаемся по всем ячейкам и смотрим на их вертикальное объединение, было ли оно нарушено
this.private_CorrectVerticalMerge();
// Возможен случай, когда у нас остались строки, полностью состоящие из объединенных вертикально ячеек
for ( var CurRow = this.Content.length - 1; CurRow >= 0; CurRow-- ) for ( var CurRow = this.Content.length - 1; CurRow >= 0; CurRow-- )
{ {
var bRemove = true; var bRemove = true;
...@@ -13509,6 +13512,53 @@ CTable.prototype.CorrectBadGrid = function() ...@@ -13509,6 +13512,53 @@ CTable.prototype.CorrectBadGrid = function()
AscCommon.g_oIdCounter.m_bRead = bRead; AscCommon.g_oIdCounter.m_bRead = bRead;
this.Recalc_CompiledPr2(); this.Recalc_CompiledPr2();
}; };
CTable.prototype.private_CorrectVerticalMerge = function()
{
// Пробегаемся по всем ячейкам и смотрим на их вертикальное объединение, было ли оно нарушено
for (var nCurRow = 0, nRowsCount = this.Content.length; nCurRow < nRowsCount; ++nCurRow)
{
var oRow = this.Content[nCurRow];
var nGridCol = oRow.Get_Before().GridBefore;
for (var nCurCell = 0, nCellsCount = oRow.Get_CellsCount(); nCurCell < nCellsCount; ++nCurCell)
{
var oCell = oRow.Get_Cell(nCurCell);
var nVMergeType = oCell.Get_VMerge();
var nGridSpan = oCell.Get_GridSpan();
if (vmerge_Continue === nVMergeType)
{
var bNeedReset = true;
if (0 !== nCurRow)
{
var oPrevRow = this.Content[nCurRow - 1];
var nPrevGridCol = oPrevRow.Get_Before().GridBefore;
for (var nPrevCell = 0, nPrevCellsCount = oPrevRow.Get_CellsCount(); nPrevCell < nPrevCellsCount; ++nPrevCell)
{
var oPrevCell = oPrevRow.Get_Cell(nPrevCell);
var nPrevGridSpan = oPrevCell.Get_GridSpan();
if (nPrevGridCol === nGridCol)
{
if (nPrevGridSpan === nGridSpan)
bNeedReset = false;
break;
}
else if (nPrevGridCol > nGridCol)
break;
nPrevGridCol += nPrevGridSpan;
}
}
if (true === bNeedReset)
oCell.Set_VMerge(vmerge_Restart);
}
nGridCol += nGridSpan;
}
}
};
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Класс CTableLook // Класс CTableLook
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
......
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