Commit 54244141 authored by GoshaZotov's avatar GoshaZotov Committed by Alexander.Trofimov

add class asc_CFormatTableInfo(info for menu right bar)

add cell_info.formatTableInfo = new asc_CFormatTableInfo()
parent 32b35d7a
......@@ -173,6 +173,36 @@
prot["asc_getIsApplyAutoFilter"] = prot.asc_getIsApplyAutoFilter;
/** @constructor */
function asc_CFormatTableInfo() {
this.isShowColumnStripes = null;
this.isShowFirstColumn = null;
this.isShowLastColumn = null;
this.isShowRowStripes = null;
this.isShowTotalRow = null;
this.isShowHeaderRow = null;
}
asc_CFormatTableInfo.prototype = {
asc_getIsShowColumnStripes: function () { return this.isShowColumnStripes; },
asc_getIsShowFirstColumn: function () { return this.isShowFirstColumn; },
asc_getIsShowLastColumn: function () { return this.isShowLastColumn; },
asc_getIsShowRowStripes: function () { return this.isShowRowStripes; },
asc_getIsShowTotalRow: function () { return this.isShowTotalRow; },
asc_getIsShowHeaderRow: function () { return this.isShowHeaderRow; }
};
window["Asc"].asc_CFormatTableInfo = window["Asc"]["asc_CFormatTableInfo"] = asc_CFormatTableInfo;
prot = asc_CFormatTableInfo.prototype;
prot["asc_getIsShowColumnStripes"] = prot.asc_getIsShowColumnStripes;
prot["asc_getIsShowFirstColumn"] = prot.asc_getIsShowFirstColumn;
prot["asc_getIsShowLastColumn"] = prot.asc_getIsShowLastColumn;
prot["asc_getIsShowRowStripes"] = prot.asc_getIsShowRowStripes;
prot["asc_getIsShowTotalRow"] = prot.asc_getIsShowTotalRow;
prot["asc_getIsShowHeaderRow"] = prot.asc_getIsShowHeaderRow;
/** @constructor */
function asc_CCellInfo() {
this.name = null;
......@@ -193,6 +223,7 @@
this.numFormatType = null;
this.angle = null;
this.autoFilterInfo = null;
this.formatTableInfo = null;
}
asc_CCellInfo.prototype = {
......
......@@ -7283,9 +7283,10 @@
var tablePartsOptions = this.model.autoFilters.searchRangeInTableParts( activeCell );
var curTablePart = tablePartsOptions >= 0 ? this.model.TableParts[tablePartsOptions] : null;
var tableStyleInfo = curTablePart && curTablePart.TableStyleInfo ? curTablePart.TableStyleInfo : null;
cell_info.autoFilterInfo = new asc_CAutoFilterInfo();
cell_info.autoFilterInfo.tableStyleName = curTablePart && curTablePart.TableStyleInfo ? curTablePart.TableStyleInfo.Name : null;
cell_info.autoFilterInfo.tableStyleName = tableStyleInfo !== null ? tableStyleInfo.Name : null;
cell_info.autoFilterInfo.tableName = curTablePart ? curTablePart.DisplayName : null;
if ( -2 === tablePartsOptions ) {
cell_info.autoFilterInfo.isAutoFilter = null;
......@@ -7297,6 +7298,22 @@
cell_info.autoFilterInfo.isApplyAutoFilter = checkApplyFilterOrSort.isFilterColumns;
}
if(curTablePart !== null)
{
cell_info.formatTableInfo = new asc.asc_CFormatTableInfo();
if (tableStyleInfo) {
cell_info.formatTableInfo.isShowColumnStripes = tableStyleInfo.ShowColumnStripes;
cell_info.formatTableInfo.isShowFirstColumn = tableStyleInfo.ShowFirstColumn;
cell_info.formatTableInfo.isShowLastColumn = tableStyleInfo.ShowLastColumn;
cell_info.formatTableInfo.isShowRowStripes = tableStyleInfo.ShowRowStripes;
}
cell_info.formatTableInfo.isShowTotalRow = curTablePart.TotalsRowCount !== null ? true : false;
cell_info.formatTableInfo.isShowHeaderRow = curTablePart.HeaderRowCount !== null ? true : false;
}
cell_info.styleName = c.getStyleName();
cell_info.angle = c.getAngle();
......
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