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 ...@@ -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}; 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 == oRes.width)
{ {
if(null != ws.dDefaultwidth) if(null != ws.dDefaultColWidth)
oRes.width = ws.dDefaultwidth; oRes.width = ws.dDefaultColWidth;
else else
oRes.width = gc_dDefaultColWidthCharsAttribute; oRes.width = gc_dDefaultColWidthCharsAttribute;
} }
...@@ -2311,10 +2311,10 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf ...@@ -2311,10 +2311,10 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf
}; };
this.WriteSheetFormatPr = function(ws) this.WriteSheetFormatPr = function(ws)
{ {
if(null !== ws.dDefaultwidth) { if(null !== ws.dDefaultColWidth) {
this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultColWidth); this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultColWidth);
this.memory.WriteByte(c_oSerPropLenType.Double); this.memory.WriteByte(c_oSerPropLenType.Double);
this.memory.WriteDouble2(ws.dDefaultwidth); this.memory.WriteDouble2(ws.dDefaultColWidth);
} }
if(null !== ws.dDefaultheight) { if(null !== ws.dDefaultheight) {
this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultRowHeight); this.memory.WriteByte(c_oSerSheetFormatPrTypes.DefaultRowHeight);
...@@ -4930,7 +4930,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -4930,7 +4930,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
{ {
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
if ( c_oSerSheetFormatPrTypes.DefaultColWidth == type ) if ( c_oSerSheetFormatPrTypes.DefaultColWidth == type )
oWorksheet.dDefaultwidth = this.stream.GetDoubleLE(); oWorksheet.dDefaultColWidth = this.stream.GetDoubleLE();
else if ( c_oSerSheetFormatPrTypes.DefaultRowHeight == type ) else if ( c_oSerSheetFormatPrTypes.DefaultRowHeight == type )
oWorksheet.dDefaultheight = this.stream.GetDoubleLE(); oWorksheet.dDefaultheight = this.stream.GetDoubleLE();
else if (c_oSerSheetFormatPrTypes.BaseColWidth === type) else if (c_oSerSheetFormatPrTypes.BaseColWidth === type)
......
...@@ -2077,7 +2077,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){ ...@@ -2077,7 +2077,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){
this.DefinedNames = new Object(); this.DefinedNames = new Object();
this.sName = this.workbook.getUniqueSheetNameFrom(g_sNewSheetNamePattern, false); this.sName = this.workbook.getUniqueSheetNameFrom(g_sNewSheetNamePattern, false);
this.bHidden = false; this.bHidden = false;
this.dDefaultwidth = null; this.dDefaultColWidth = null;
this.dDefaultheight = null; this.dDefaultheight = null;
this.nBaseColWidth = null; this.nBaseColWidth = null;
this.index = _index; this.index = _index;
...@@ -2160,7 +2160,8 @@ Woorksheet.prototype.clone=function(sNewId){ ...@@ -2160,7 +2160,8 @@ Woorksheet.prototype.clone=function(sNewId){
oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, true); oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, true);
oNewWs.sName = this.workbook.getUniqueSheetNameFrom(this.sName, true); oNewWs.sName = this.workbook.getUniqueSheetNameFrom(this.sName, true);
oNewWs.bHidden = this.bHidden; oNewWs.bHidden = this.bHidden;
oNewWs.dDefaultwidth = this.dDefaultwidth; oNewWs.nBaseColWidth = this.nBaseColWidth;
oNewWs.dDefaultColWidth = this.dDefaultColWidth;
oNewWs.dDefaultheight = this.dDefaultheight; oNewWs.dDefaultheight = this.dDefaultheight;
oNewWs.index = this.index; oNewWs.index = this.index;
oNewWs.nRowsCount = this.nRowsCount; oNewWs.nRowsCount = this.nRowsCount;
...@@ -2785,7 +2786,7 @@ Woorksheet.prototype.insertColsAfter=function(index, count){ ...@@ -2785,7 +2786,7 @@ Woorksheet.prototype.insertColsAfter=function(index, count){
return this.insertColsBefore(index + 1, count); return this.insertColsBefore(index + 1, count);
}; };
Woorksheet.prototype.getDefaultWidth=function(){ Woorksheet.prototype.getDefaultWidth=function(){
return this.dDefaultwidth; return this.dDefaultColWidth;
}; };
Woorksheet.prototype.getColWidth=function(index){ Woorksheet.prototype.getColWidth=function(index){
//index 0 based //index 0 based
...@@ -2793,7 +2794,7 @@ Woorksheet.prototype.getColWidth=function(index){ ...@@ -2793,7 +2794,7 @@ Woorksheet.prototype.getColWidth=function(index){
var col = this._getColNoEmptyWithAll(index); var col = this._getColNoEmptyWithAll(index);
if(null != col && null != col.width) if(null != col && null != col.width)
return col.width; return col.width;
var dResult = this.dDefaultwidth; var dResult = this.dDefaultColWidth;
if(dResult === undefined || dResult === null || dResult == 0) 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 = (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 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