Commit d77e1ac6 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

new version

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58894 954022d7-b5bf-4e40-9824-e11837661b57
parent 0df543cc
......@@ -322200,7 +322200,7 @@ CCellCommentator.prototype.Redo = function(type, data) {
this.memory.WriteString2(sText);
}
var sTime = oCommentData.asc_getTime();
if(null != sTime)
if(null != sTime && "" !== sTime)
{
var oDate = new Date(sTime - 0);
......@@ -322726,7 +322726,7 @@ CCellCommentator.prototype.Redo = function(type, data) {
var res = c_oSerConstants.ReadOk;
var oThis = this;
if ( c_oSer_SortState.Ref == type )
oSortState.Ref = this.stream.GetString2LE(length);
oSortState.Ref = Asc.g_oRangeCache.getAscRange(this.stream.GetString2LE(length));
else if ( c_oSer_SortState.CaseSensitive == type )
oSortState.CaseSensitive = this.stream.GetBool();
else if ( c_oSer_SortState.SortConditions == type )
......@@ -335267,20 +335267,24 @@ Cell.prototype.setFormula=function(val, bAddToHistory){
this.sFormula = val;
this.oValue.cleanCache();
};
Cell.prototype.setValue=function(val,callback){
Cell.prototype.setValue=function(val,callback, isCopyPaste){
var ret = true;
var DataOld = null;
if(History.Is_On())
DataOld = this.getValueData();
var sNumFormat;
if(null != this.xfs && null != this.xfs.num)
sNumFormat = this.xfs.num.f;
else
sNumFormat = g_oDefaultNum.f;
var numFormat = oNumFormatCache.get(sNumFormat);
var bIsTextFormat = false;
if(!isCopyPaste){
var sNumFormat;
if(null != this.xfs && null != this.xfs.num)
sNumFormat = this.xfs.num.f;
else
sNumFormat = g_oDefaultNum.f;
var numFormat = oNumFormatCache.get(sNumFormat);
bIsTextFormat = numFormat.isTextFormat();
}
var wb = this.ws.workbook;
var ws = this.ws;
if(false == numFormat.isTextFormat())
if(false == bIsTextFormat)
{
/*
Устанавливаем значение в Range ячеек. При этом происходит проверка значения на формулу.
......@@ -335326,7 +335330,7 @@ Cell.prototype.setValue=function(val,callback){
var sheetId = this.ws.getId();
if (this.sFormula)
wb.dependencyFormulas.deleteMasterNodes2( ws.Id, this.oId.getID() );
if( !(null != val && val[0] != "=" || true == numFormat.isTextFormat()))
if( !(null != val && val[0] != "=" || true == bIsTextFormat))
addToArrRecalc(this.ws.getId(), this);
wb.needRecalc.nodes[getVertexId(sheetId,this.oId.getID())] = [sheetId, this.oId.getID()];
wb.needRecalc.length++;
......@@ -335334,7 +335338,7 @@ Cell.prototype.setValue=function(val,callback){
this.sFormula = null;
this.setFormulaCA(false);
if(val){
if(false == numFormat.isTextFormat() && val[0] == "=" && val.length > 1){
if(false == bIsTextFormat && val[0] == "=" && val.length > 1){
this.setFormula( val.substring(1) );
}
else {
......@@ -336136,11 +336140,11 @@ Range.prototype.getCells=function(){
}
return aResult;
};
Range.prototype.setValue=function(val,callback){
Range.prototype.setValue=function(val,callback, isCopyPaste){
History.Create_NewPoint();
History.StartTransaction();
this._foreach(function(cell){
cell.setValue(val,callback);
cell.setValue(val,callback, isCopyPaste);
// if(cell.isEmpty())
// cell.Remove();
});
......@@ -350277,7 +350281,7 @@ function CDrawingDocument()
this.TableOutlineDr = new CTableOutlineDr();
this.IsRetina = false;
this.IsMobile = true;
this.IsMobile = false;
this.SelectRect1 = null;
this.SelectRect2 = null;
......@@ -360568,7 +360572,7 @@ asc_docs_api.prototype["Native_Editor_Initialize_Settings"] = function(_params)
}
case 101:
{
this.m_oDrawingDocument.IsMobileVersion = _params[_current.pos++];
this.m_oDrawingDocument.IsMobile = _params[_current.pos++];
break;
}
case 255:
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