Commit 1fb0d435 authored by Alexander.Trofimov's avatar Alexander.Trofimov

(1.0.0.56):XlsxSerializerCom.dll - чтение SheetViews->SheetView: ShowGridLines и ShowRowColHeaders

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47731 954022d7-b5bf-4e40-9824-e11837661b57
parent 7008673f
...@@ -168,7 +168,9 @@ var c_oSerWorksheetsTypes = ...@@ -168,7 +168,9 @@ var c_oSerWorksheetsTypes =
TableParts: 18, TableParts: 18,
Comments: 19, Comments: 19,
Comment: 20, Comment: 20,
ConditionalFormatting: 21 ConditionalFormatting: 21,
SheetViews: 22,
SheetView: 23
}; };
/** @enum */ /** @enum */
var c_oSerWorksheetPropTypes = var c_oSerWorksheetPropTypes =
...@@ -546,6 +548,27 @@ var c_oSer_ConditionalFormattingValueObject = { ...@@ -546,6 +548,27 @@ var c_oSer_ConditionalFormattingValueObject = {
Type : 1, Type : 1,
Val : 2 Val : 2
}; };
var c_oSer_SheetView = {
ColorId : 0,
DefaultGridColor : 1,
RightToLeft : 2,
ShowFormulas : 3,
ShowGridLines : 4,
ShowOutlineSymbols : 5,
ShowRowColHeaders : 6,
ShowRuler : 7,
ShowWhiteSpace : 8,
ShowZeros : 9,
TabSelected : 10,
TopLeftCell : 11,
View : 12,
WindowProtection : 13,
WorkbookViewId : 14,
ZoomScale : 15,
ZoomScaleNormal : 16,
ZoomScalePageLayoutView : 17,
ZoomScaleSheetLayoutView : 18
};
/** @enum */ /** @enum */
var EBorderStyle = var EBorderStyle =
{ {
...@@ -4850,16 +4873,19 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -4850,16 +4873,19 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
res = this.bcr.Read1(length, function(t,l){ res = this.bcr.Read1(length, function(t,l){
return oThis.ReadComments(t,l, oWorksheet); return oThis.ReadComments(t,l, oWorksheet);
}); });
} } else if (c_oSerWorksheetsTypes.ConditionalFormatting === type) {
else if (c_oSerWorksheetsTypes.ConditionalFormatting === type) {
oConditionalFormatting = new Asc.CConditionalFormatting(); oConditionalFormatting = new Asc.CConditionalFormatting();
res = this.bcr.Read1(length, function (t, l) { res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadConditionalFormatting(t, l, oConditionalFormatting, return oThis.ReadConditionalFormatting(t, l, oConditionalFormatting,
function (sRange) {return oWorksheet.getRange2(sRange);}); function (sRange) {return oWorksheet.getRange2(sRange);});
}); });
oWorksheet.aConditionalFormatting.push(oConditionalFormatting); oWorksheet.aConditionalFormatting.push(oConditionalFormatting);
} } else if (c_oSerWorksheetsTypes.SheetViews === type) {
else oWorksheet.SheetViews = [];
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadSheetViews(t, l, oWorksheet.SheetViews);
});
} else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
...@@ -5653,6 +5679,30 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -5653,6 +5679,30 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadSheetViews = function (type, length, aSheetViews) {
var res = c_oSerConstants.ReadOk;
var oThis = this;
var oSheetView = null;
if (c_oSerWorksheetsTypes.SheetView === type) {
oSheetView = {};
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadSheetView(t, l, oSheetView);
});
aSheetViews.push(oSheetView);
}
return res;
};
this.ReadSheetView = function (type, length, oSheetView) {
var res = c_oSerConstants.ReadOk;
if (c_oSer_SheetView.ShowGridLines === type) {
oSheetView.ShowGridLines = this.stream.GetBool();
} else if (c_oSer_SheetView.ShowRowColHeaders === type) {
oSheetView.ShowRowColHeaders = this.stream.GetBool();
} else
res = c_oSerConstants.ReadUnknown;
return res;
};
this.Iso8601ToDate = function(sDate) this.Iso8601ToDate = function(sDate)
{ {
var numericKeys = [ 1, 4, 5, 6, 7, 10, 11 ]; var numericKeys = [ 1, 4, 5, 6, 7, 10, 11 ];
......
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