Commit 8022fb82 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

g_oIdCounter для создания id sheet

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55542 954022d7-b5bf-4e40-9824-e11837661b57
parent 8477f079
...@@ -498,6 +498,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -498,6 +498,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.wbModel = wb; this.wbModel = wb;
var oBinaryFileReader = new BinaryFileReader(url); var oBinaryFileReader = new BinaryFileReader(url);
oBinaryFileReader.Read(data, wb); oBinaryFileReader.Read(data, wb);
g_oIdCounter.Set_Load(false);
return wb; return wb;
}, },
...@@ -519,7 +520,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -519,7 +520,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
g_oUndoRedoComment = new UndoRedoComment(wbModel); g_oUndoRedoComment = new UndoRedoComment(wbModel);
g_oUndoRedoAutoFilters = new UndoRedoAutoFilters(wbModel); g_oUndoRedoAutoFilters = new UndoRedoAutoFilters(wbModel);
g_oUndoRedoGraphicObjects = new UndoRedoGraphicObjects(wbModel); g_oUndoRedoGraphicObjects = new UndoRedoGraphicObjects(wbModel);
g_oIdCounter.Set_Load(false);
CHART_STYLE_MANAGER = new CChartStyleManager(); CHART_STYLE_MANAGER = new CChartStyleManager();
}, },
...@@ -3389,6 +3389,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3389,6 +3389,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var oBinaryFileReader = new BinaryFileReader(this.DocumentUrl); var oBinaryFileReader = new BinaryFileReader(this.DocumentUrl);
oBinaryFileReader.Read(base64File, this.wbModel); oBinaryFileReader.Read(base64File, this.wbModel);
g_oIdCounter.Set_Load(false);
this._coAuthoringInit(); this._coAuthoringInit();
this.wb = new asc.WorkbookView( this.wb = new asc.WorkbookView(
......
...@@ -5081,7 +5081,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -5081,7 +5081,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
{ {
this.aMerged = []; this.aMerged = [];
this.aHyperlinks = []; this.aHyperlinks = [];
var oNewWorksheet = new Woorksheet(this.wb, wb.aWorksheets.length, false); var oNewWorksheet = new Woorksheet(this.wb, wb.aWorksheets.length);
res = this.bcr.Read1(length, function(t,l){ res = this.bcr.Read1(length, function(t,l){
return oThis.ReadWorksheet(t,l, oNewWorksheet); return oThis.ReadWorksheet(t,l, oNewWorksheet);
}); });
......
...@@ -5,7 +5,6 @@ var g_nHSLMaxValue = 240; ...@@ -5,7 +5,6 @@ var g_nHSLMaxValue = 240;
var g_nVerticalTextAngle = 255; var g_nVerticalTextAngle = 255;
var gc_dDefaultColWidthCharsAttribute;//определяется в WorksheetView.js var gc_dDefaultColWidthCharsAttribute;//определяется в WorksheetView.js
var gc_dDefaultRowHeightAttribute;//определяется в WorksheetView.js var gc_dDefaultRowHeightAttribute;//определяется в WorksheetView.js
var g_nNextWorksheetId = 1;
var g_sNewSheetNamePattern = "Sheet"; var g_sNewSheetNamePattern = "Sheet";
var g_nSheetNameMaxLength = 31; var g_nSheetNameMaxLength = 31;
var g_nAllColIndex = -1; var g_nAllColIndex = -1;
...@@ -1123,7 +1122,7 @@ Workbook.prototype.getWorksheetCount=function(){ ...@@ -1123,7 +1122,7 @@ Workbook.prototype.getWorksheetCount=function(){
Workbook.prototype.createWorksheet=function(indexBefore, sName, sId){ Workbook.prototype.createWorksheet=function(indexBefore, sName, sId){
History.Create_NewPoint(); History.Create_NewPoint();
History.TurnOff(); History.TurnOff();
var oNewWorksheet = new Woorksheet(this, this.aWorksheets.length, true, sId); var oNewWorksheet = new Woorksheet(this, this.aWorksheets.length, sId);
if(null != sName) if(null != sName)
{ {
if(true == this.checkValidSheetName(sName)) if(true == this.checkValidSheetName(sName))
...@@ -1681,7 +1680,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){ ...@@ -1681,7 +1680,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
/** /**
* @constructor * @constructor
*/ */
function Woorksheet(wb, _index, bAddUserId, sId){ function Woorksheet(wb, _index, sId){
this.workbook = wb; this.workbook = wb;
this.DefinedNames = {}; this.DefinedNames = {};
this.sName = this.workbook.getUniqueSheetNameFrom(g_sNewSheetNamePattern, false); this.sName = this.workbook.getUniqueSheetNameFrom(g_sNewSheetNamePattern, false);
...@@ -1692,12 +1691,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){ ...@@ -1692,12 +1691,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){
if(null != sId) if(null != sId)
this.Id = sId; this.Id = sId;
else else
{ this.Id = g_oIdCounter.Get_NewId();
if(bAddUserId)
this.Id = this.workbook.oApi.User.asc_getId() + "_" + g_nNextWorksheetId++;
else
this.Id = g_nNextWorksheetId++;
}
this.nRowsCount = 0; this.nRowsCount = 0;
this.nColsCount = 0; this.nColsCount = 0;
...@@ -1803,9 +1797,9 @@ Woorksheet.prototype.generateFontMap=function(oFontMap){ ...@@ -1803,9 +1797,9 @@ Woorksheet.prototype.generateFontMap=function(oFontMap){
Woorksheet.prototype.clone=function(sNewId, bFromRedo){ Woorksheet.prototype.clone=function(sNewId, bFromRedo){
var oNewWs, i, elem, range; var oNewWs, i, elem, range;
if(null != sNewId) if(null != sNewId)
oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, true, sNewId); oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, sNewId);
else else
oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length, true); oNewWs = new Woorksheet(this.workbook, this.workbook.aWorksheets.length);
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.oSheetFormatPr = this.oSheetFormatPr.clone(); oNewWs.oSheetFormatPr = this.oSheetFormatPr.clone();
......
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