Commit a3f5d9a7 authored by Alexander.Trofimov's avatar Alexander.Trofimov

dDefaultwidth->dDefaultColWidth

copy baseColWidth при копировании листа

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47457 954022d7-b5bf-4e40-9824-e11837661b57
parent b99000c9
......@@ -2195,8 +2195,8 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf
var oRes = {BestFit: col.BestFit, hd: col.hd, Max: nMax, Min: nMin, xfsid: null, width: col.width, CustomWidth: col.CustomWidth};
if(null == oRes.width)
{
if(null != ws.dDefaultwidth)
oRes.width = ws.dDefaultwidth;
if(null != ws.dDefaultColWidth)
oRes.width = ws.dDefaultColWidth;
else
oRes.width = gc_dDefaultColWidthCharsAttribute;
}
......@@ -2311,10 +2311,10 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf
};
this.WriteSheetFormatPr = function(ws)
{
if(null !== ws.dDefaultwidth) {
if(null !== ws.dDefaultColWidth) {
this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultColWidth);
this.memory.WriteByte(c_oSerPropLenType.Double);
this.memory.WriteDouble2(ws.dDefaultwidth);
this.memory.WriteDouble2(ws.dDefaultColWidth);
}
if(null !== ws.dDefaultheight) {
this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultRowHeight);
......@@ -4930,7 +4930,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
{
var res = c_oSerConstants.ReadOk;
if ( c_oSerSheetFormatPrTypes.DefaultColWidth == type )
oWorksheet.dDefaultwidth = this.stream.GetDoubleLE();
oWorksheet.dDefaultColWidth = this.stream.GetDoubleLE();
else if ( c_oSerSheetFormatPrTypes.DefaultRowHeight == type )
oWorksheet.dDefaultheight = this.stream.GetDoubleLE();
else if (c_oSerSheetFormatPrTypes.BaseColWidth === type)
......
......@@ -2077,7 +2077,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){
this.DefinedNames = new Object();
this.sName = this.workbook.getUniqueSheetNameFrom(g_sNewSheetNamePattern, false);
this.bHidden = false;
this.dDefaultwidth = null;
this.dDefaultColWidth = null;
this.dDefaultheight = null;
this.nBaseColWidth = null;
this.index = _index;
......@@ -2160,7 +2160,8 @@ Woorksheet.prototype.clone=function(sNewId){
oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, true);
oNewWs.sName = this.workbook.getUniqueSheetNameFrom(this.sName, true);
oNewWs.bHidden = this.bHidden;
oNewWs.dDefaultwidth = this.dDefaultwidth;
oNewWs.nBaseColWidth = this.nBaseColWidth;
oNewWs.dDefaultColWidth = this.dDefaultColWidth;
oNewWs.dDefaultheight = this.dDefaultheight;
oNewWs.index = this.index;
oNewWs.nRowsCount = this.nRowsCount;
......@@ -2785,7 +2786,7 @@ Woorksheet.prototype.insertColsAfter=function(index, count){
return this.insertColsBefore(index + 1, count);
};
Woorksheet.prototype.getDefaultWidth=function(){
return this.dDefaultwidth;
return this.dDefaultColWidth;
};
Woorksheet.prototype.getColWidth=function(index){
//index 0 based
......@@ -2793,7 +2794,7 @@ Woorksheet.prototype.getColWidth=function(index){
var col = this._getColNoEmptyWithAll(index);
if(null != col && null != col.width)
return col.width;
var dResult = this.dDefaultwidth;
var dResult = this.dDefaultColWidth;
if(dResult === undefined || dResult === null || dResult == 0)
//dResult = (8) + 5;//(EMCA-376.page 1857.)defaultColWidth = baseColumnWidth + {margin padding (2 pixels on each side, totalling 4 pixels)} + {gridline (1pixel)}
dResult = -1; // calc default width at presentation level
......
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