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

memory: создаем один глобальный обьект Property вместо множества локальных

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60359 954022d7-b5bf-4e40-9824-e11837661b57
parent b4a56591
...@@ -141,9 +141,7 @@ window["Asc"]["asc_CCommentCoords"] = window["Asc"].asc_CCommentCoords = asc_CCo ...@@ -141,9 +141,7 @@ window["Asc"]["asc_CCommentCoords"] = window["Asc"].asc_CCommentCoords = asc_CCo
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// CommentData // CommentData
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
/** @constructor */ var g_oCCommentDataProperties = {
function asc_CCommentData(obj) {
this.Properties = {
wsId: 0, wsId: 0,
nCol: 1, nCol: 1,
nRow: 2, nRow: 2,
...@@ -159,6 +157,9 @@ function asc_CCommentData(obj) { ...@@ -159,6 +157,9 @@ function asc_CCommentData(obj) {
aReplies: 13, aReplies: 13,
bHidden: 14 bHidden: 14
}; };
/** @constructor */
function asc_CCommentData(obj) {
this.Properties = g_oCCommentDataProperties;
this.bHidden = false; this.bHidden = false;
this.wsId = null; this.wsId = null;
...@@ -389,15 +390,15 @@ prot["asc_getMasterCommentId"] = prot.asc_getMasterCommentId; ...@@ -389,15 +390,15 @@ prot["asc_getMasterCommentId"] = prot.asc_getMasterCommentId;
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// CompositeCommentData // CompositeCommentData
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
var g_oCompositeCommentDataProperties = {
commentBefore: 0,
commentAfter: 1
};
function CompositeCommentData() { function CompositeCommentData() {
this.commentBefore = null; this.commentBefore = null;
this.commentAfter = null; this.commentAfter = null;
this.Properties = { this.Properties = g_oCompositeCommentDataProperties;
commentBefore: 0,
commentAfter: 1
};
} }
CompositeCommentData.prototype = { CompositeCommentData.prototype = {
......
...@@ -458,13 +458,13 @@ var UndoRedoDataTypes = new function() { ...@@ -458,13 +458,13 @@ var UndoRedoDataTypes = new function() {
return null; return null;
}; };
}; };
var g_oUndoRedoData_CellSimpleDataProperties = {
function UndoRedoData_CellSimpleData(nRow, nCol, oOldVal, oNewVal, sFormula){
this.Properties = {
Row: 0, Row: 0,
Col: 1, Col: 1,
NewVal: 2 NewVal: 2
}; };
function UndoRedoData_CellSimpleData(nRow, nCol, oOldVal, oNewVal, sFormula){
this.Properties = g_oUndoRedoData_CellSimpleDataProperties;
this.nRow = nRow; this.nRow = nRow;
this.nCol = nCol; this.nCol = nCol;
this.oOldVal = oOldVal; this.oOldVal = oOldVal;
...@@ -505,12 +505,12 @@ UndoRedoData_CellSimpleData.prototype = { ...@@ -505,12 +505,12 @@ UndoRedoData_CellSimpleData.prototype = {
this.nCol = collaborativeEditing.getLockMeColumn2(nSheetId, this.nCol); this.nCol = collaborativeEditing.getLockMeColumn2(nSheetId, this.nCol);
} }
}; };
var g_oUndoRedoData_CellDataProperties = {
function UndoRedoData_CellData(value, style){
this.Properties = {
value: 0, value: 0,
style: 1 style: 1
}; };
function UndoRedoData_CellData(value, style){
this.Properties = g_oUndoRedoData_CellDataProperties;
this.value = value; this.value = value;
this.style = style; this.style = style;
} }
...@@ -541,12 +541,12 @@ UndoRedoData_CellData.prototype = { ...@@ -541,12 +541,12 @@ UndoRedoData_CellData.prototype = {
} }
} }
}; };
var g_oUndoRedoData_CellValueDataProperties = {
function UndoRedoData_CellValueData(sFormula, oValue){
this.Properties = {
formula: 0, formula: 0,
value: 1 value: 1
}; };
function UndoRedoData_CellValueData(sFormula, oValue){
this.Properties = g_oUndoRedoData_CellValueDataProperties;
this.formula = sFormula; this.formula = sFormula;
this.value = oValue; this.value = oValue;
} }
...@@ -587,12 +587,12 @@ UndoRedoData_CellValueData.prototype = { ...@@ -587,12 +587,12 @@ UndoRedoData_CellValueData.prototype = {
} }
} }
}; };
var g_oUndoRedoData_FromToRowColProperties = {
function UndoRedoData_FromToRowCol(bRow, from, to){
this.Properties = {
from: 0, from: 0,
to: 1 to: 1
}; };
function UndoRedoData_FromToRowCol(bRow, from, to){
this.Properties = g_oUndoRedoData_FromToRowColProperties;
this.bRow = bRow; this.bRow = bRow;
this.from = from; this.from = from;
this.to = to; this.to = to;
...@@ -637,13 +637,13 @@ UndoRedoData_FromToRowCol.prototype = { ...@@ -637,13 +637,13 @@ UndoRedoData_FromToRowCol.prototype = {
} }
} }
}; };
var g_oUndoRedoData_FromToProperties = {
function UndoRedoData_FromTo(from, to, copyRange){
this.Properties = {
from: 0, from: 0,
to: 1, to: 1,
copyRange: 2 copyRange: 2
}; };
function UndoRedoData_FromTo(from, to, copyRange){
this.Properties = g_oUndoRedoData_FromToProperties;
this.from = from; this.from = from;
this.to = to; this.to = to;
this.copyRange = copyRange; this.copyRange = copyRange;
...@@ -677,13 +677,13 @@ UndoRedoData_FromTo.prototype = { ...@@ -677,13 +677,13 @@ UndoRedoData_FromTo.prototype = {
} }
} }
}; };
var g_oUndoRedoData_FromToHyperlinkProperties = {
function UndoRedoData_FromToHyperlink(oBBoxFrom, oBBoxTo, hyperlink){
this.Properties = {
from: 0, from: 0,
to: 1, to: 1,
hyperlink: 2 hyperlink: 2
}; };
function UndoRedoData_FromToHyperlink(oBBoxFrom, oBBoxTo, hyperlink){
this.Properties = g_oUndoRedoData_FromToHyperlinkProperties;
this.from = new UndoRedoData_BBox(oBBoxFrom); this.from = new UndoRedoData_BBox(oBBoxFrom);
this.to = new UndoRedoData_BBox(oBBoxTo); this.to = new UndoRedoData_BBox(oBBoxTo);
this.hyperlink = hyperlink; this.hyperlink = hyperlink;
...@@ -729,12 +729,12 @@ UndoRedoData_FromToHyperlink.prototype = { ...@@ -729,12 +729,12 @@ UndoRedoData_FromToHyperlink.prototype = {
this.to.c2 = collaborativeEditing.getLockMeColumn2(nSheetId, this.to.c2); this.to.c2 = collaborativeEditing.getLockMeColumn2(nSheetId, this.to.c2);
} }
}; };
var g_oUndoRedoData_IndexSimplePropProperties = {
function UndoRedoData_IndexSimpleProp(index, bRow, oOldVal, oNewVal){
this.Properties = {
index: 0, index: 0,
oNewVal: 1 oNewVal: 1
}; };
function UndoRedoData_IndexSimpleProp(index, bRow, oOldVal, oNewVal){
this.Properties = g_oUndoRedoData_IndexSimplePropProperties;
this.index = index; this.index = index;
this.bRow = bRow; this.bRow = bRow;
this.oOldVal = oOldVal; this.oOldVal = oOldVal;
...@@ -774,14 +774,14 @@ UndoRedoData_IndexSimpleProp.prototype = { ...@@ -774,14 +774,14 @@ UndoRedoData_IndexSimpleProp.prototype = {
this.index = collaborativeEditing.getLockMeColumn2(nSheetId, this.index); this.index = collaborativeEditing.getLockMeColumn2(nSheetId, this.index);
} }
}; };
var g_oUndoRedoData_ColPropProperties = {
function UndoRedoData_ColProp(col){
this.Properties = {
width: 0, width: 0,
hd: 1, hd: 1,
CustomWidth: 2, CustomWidth: 2,
BestFit: 3 BestFit: 3
}; };
function UndoRedoData_ColProp(col){
this.Properties = g_oUndoRedoData_ColPropProperties;
if(null != col) if(null != col)
{ {
this.width = col.width; this.width = col.width;
...@@ -834,13 +834,13 @@ UndoRedoData_ColProp.prototype = { ...@@ -834,13 +834,13 @@ UndoRedoData_ColProp.prototype = {
} }
} }
}; };
var g_oUndoRedoData_RowPropProperties = {
function UndoRedoData_RowProp(row){
this.Properties = {
h: 0, h: 0,
hd: 1, hd: 1,
CustomHeight: 2 CustomHeight: 2
}; };
function UndoRedoData_RowProp(row){
this.Properties = g_oUndoRedoData_RowPropProperties;
if(null != row) if(null != row)
{ {
this.h = row.h; this.h = row.h;
...@@ -889,14 +889,14 @@ UndoRedoData_RowProp.prototype = { ...@@ -889,14 +889,14 @@ UndoRedoData_RowProp.prototype = {
} }
} }
}; };
var g_oUndoRedoData_BBoxProperties = {
function UndoRedoData_BBox(oBBox){
this.Properties = {
c1: 0, c1: 0,
r1: 1, r1: 1,
c2: 2, c2: 2,
r2: 3 r2: 3
}; };
function UndoRedoData_BBox(oBBox){
this.Properties = g_oUndoRedoData_BBoxProperties;
if(null != oBBox) if(null != oBBox)
{ {
this.c1 = oBBox.c1; this.c1 = oBBox.c1;
...@@ -950,12 +950,12 @@ UndoRedoData_BBox.prototype = { ...@@ -950,12 +950,12 @@ UndoRedoData_BBox.prototype = {
this.c2 = collaborativeEditing.getLockMeColumn2(nSheetId, this.c2); this.c2 = collaborativeEditing.getLockMeColumn2(nSheetId, this.c2);
} }
}; };
var g_oUndoRedoData_SortDataProperties = {
function UndoRedoData_SortData(bbox, places){
this.Properties = {
bbox: 0, bbox: 0,
places: 1 places: 1
}; };
function UndoRedoData_SortData(bbox, places){
this.Properties = g_oUndoRedoData_SortDataProperties;
this.bbox = bbox; this.bbox = bbox;
this.places = places; this.places = places;
} }
...@@ -1447,13 +1447,13 @@ UndoRedoDataParaPr.prototype = { ...@@ -1447,13 +1447,13 @@ UndoRedoDataParaPr.prototype = {
} }
}; };
var g_oUndoRedoData_SheetAddProperties = {
function UndoRedoData_SheetAdd(insertBefore, name, sheetidfrom, sheetid){
this.Properties = {
name: 0, name: 0,
sheetidfrom: 1, sheetidfrom: 1,
sheetid: 2 sheetid: 2
}; };
function UndoRedoData_SheetAdd(insertBefore, name, sheetidfrom, sheetid){
this.Properties = g_oUndoRedoData_SheetAddProperties;
this.insertBefore= insertBefore; this.insertBefore= insertBefore;
this.name = name; this.name = name;
this.sheetidfrom = sheetidfrom; this.sheetidfrom = sheetidfrom;
...@@ -1491,12 +1491,12 @@ UndoRedoData_SheetAdd.prototype = { ...@@ -1491,12 +1491,12 @@ UndoRedoData_SheetAdd.prototype = {
} }
} }
}; };
var g_oUndoRedoData_SheetRemoveProperties = {
function UndoRedoData_SheetRemove(index, sheetId, sheet, cwf){
this.Properties = {
sheetId: 0, sheetId: 0,
sheet: 1 sheet: 1
}; };
function UndoRedoData_SheetRemove(index, sheetId, sheet, cwf){
this.Properties = g_oUndoRedoData_SheetRemoveProperties;
this.index = index; this.index = index;
this.sheetId = sheetId; this.sheetId = sheetId;
this.sheet = sheet; this.sheet = sheet;
...@@ -1529,11 +1529,11 @@ UndoRedoData_SheetRemove.prototype = { ...@@ -1529,11 +1529,11 @@ UndoRedoData_SheetRemove.prototype = {
} }
} }
}; };
var g_oUndoRedoData_SheetPositionsProperties = {
function UndoRedoData_SheetPositions(positions){
this.Properties = {
positions: 0 positions: 0
}; };
function UndoRedoData_SheetPositions(positions){
this.Properties = g_oUndoRedoData_SheetPositionsProperties;
this.positions = positions; this.positions = positions;
} }
UndoRedoData_SheetPositions.prototype = { UndoRedoData_SheetPositions.prototype = {
...@@ -1581,9 +1581,7 @@ UndoRedoData_ClrScheme.prototype = { ...@@ -1581,9 +1581,7 @@ UndoRedoData_ClrScheme.prototype = {
this.newVal.Read_FromBinary(reader); this.newVal.Read_FromBinary(reader);
} }
}; };
var g_oUndoRedoData_AutoFilterProperties = {
function UndoRedoData_AutoFilter() {
this.Properties = {
activeCells : 0, activeCells : 0,
lTable : 1, lTable : 1,
type : 2, type : 2,
...@@ -1594,6 +1592,8 @@ function UndoRedoData_AutoFilter() { ...@@ -1594,6 +1592,8 @@ function UndoRedoData_AutoFilter() {
moveTo : 7, moveTo : 7,
bWithoutFilter : 8 bWithoutFilter : 8
}; };
function UndoRedoData_AutoFilter() {
this.Properties = g_oUndoRedoData_AutoFilterProperties;
this.undo = null; this.undo = null;
...@@ -1656,11 +1656,11 @@ UndoRedoData_AutoFilter.prototype = { ...@@ -1656,11 +1656,11 @@ UndoRedoData_AutoFilter.prototype = {
this.activeCells.r2 = collaborativeEditing.getLockMeRow2(nSheetId, this.activeCells.r2); this.activeCells.r2 = collaborativeEditing.getLockMeRow2(nSheetId, this.activeCells.r2);
} }
}; };
var g_oUndoRedoData_SinglePropertyProperties = {
function UndoRedoData_SingleProperty(elem) {
this.Properties = {
elem : 0 elem : 0
}; };
function UndoRedoData_SingleProperty(elem) {
this.Properties = g_oUndoRedoData_SinglePropertyProperties;
this.elem = elem; this.elem = elem;
} }
UndoRedoData_SingleProperty.prototype = { UndoRedoData_SingleProperty.prototype = {
...@@ -2300,14 +2300,14 @@ UndoRedoDataAddGeometryRect.prototype = ...@@ -2300,14 +2300,14 @@ UndoRedoDataAddGeometryRect.prototype =
} }
} }
}; };
var g_oUndoRedoDataMoveToLineToProperties = {
function UndoRedoDataMoveToLineTo(x, y, bMoveTo)
{
this.Properties = {
x: 0, x: 0,
y: 1, y: 1,
bMoveTo: 2 bMoveTo: 2
}; };
function UndoRedoDataMoveToLineTo(x, y, bMoveTo)
{
this.Properties = g_oUndoRedoDataMoveToLineToProperties;
this.x = x; this.x = x;
this.y = y; this.y = y;
...@@ -2346,15 +2346,15 @@ UndoRedoDataMoveToLineTo.prototype = ...@@ -2346,15 +2346,15 @@ UndoRedoDataMoveToLineTo.prototype =
} }
}; };
var g_gUndoRedoDataArcToProperties = {
function UndoRedoDataArcTo(wR, hR, stAng, swAng)
{
this.Properties = {
wR: 0, wR: 0,
hR: 1, hR: 1,
stAng: 2, stAng: 2,
swAng: 3 swAng: 3
}; };
function UndoRedoDataArcTo(wR, hR, stAng, swAng)
{
this.Properties = g_gUndoRedoDataArcToProperties;
this.wR = wR; this.wR = wR;
this.hR = hR; this.hR = hR;
...@@ -2396,15 +2396,15 @@ UndoRedoDataArcTo.prototype = ...@@ -2396,15 +2396,15 @@ UndoRedoDataArcTo.prototype =
} }
} }
}; };
var g_oUndoRedoDataQuadBezToProperties = {
function UndoRedoDataQuadBezTo(x0, y0, x1, y1)
{
this.Properties = {
x0: 0, x0: 0,
y0: 1, y0: 1,
x1: 2, x1: 2,
y1: 3 y1: 3
}; };
function UndoRedoDataQuadBezTo(x0, y0, x1, y1)
{
this.Properties = g_oUndoRedoDataQuadBezToProperties;
this.x0 = x0; this.x0 = x0;
this.y0 = y0; this.y0 = y0;
...@@ -2447,10 +2447,7 @@ UndoRedoDataQuadBezTo.prototype = ...@@ -2447,10 +2447,7 @@ UndoRedoDataQuadBezTo.prototype =
} }
}; };
var g_oUndoRedoDataCubicBezToProperties = {
function UndoRedoDataCubicBezTo(x0, y0, x1, y1, x2, y2)
{
this.Properties = {
x0: 0, x0: 0,
y0: 1, y0: 1,
x1: 2, x1: 2,
...@@ -2458,6 +2455,9 @@ function UndoRedoDataCubicBezTo(x0, y0, x1, y1, x2, y2) ...@@ -2458,6 +2455,9 @@ function UndoRedoDataCubicBezTo(x0, y0, x1, y1, x2, y2)
x2: 4, x2: 4,
y2: 5 y2: 5
}; };
function UndoRedoDataCubicBezTo(x0, y0, x1, y1, x2, y2)
{
this.Properties = g_oUndoRedoDataCubicBezToProperties;
this.x0 = x0; this.x0 = x0;
this.y0 = y0; this.y0 = y0;
...@@ -2506,11 +2506,11 @@ UndoRedoDataCubicBezTo.prototype = ...@@ -2506,11 +2506,11 @@ UndoRedoDataCubicBezTo.prototype =
} }
}; };
var g_oUndoRedoDataClosePathProperties = {
};
function UndoRedoDataClosePath() function UndoRedoDataClosePath()
{ {
this.Properties = { this.Properties = g_oUndoRedoDataClosePathProperties;
};
} }
...@@ -2534,14 +2534,14 @@ UndoRedoDataClosePath.prototype = ...@@ -2534,14 +2534,14 @@ UndoRedoDataClosePath.prototype =
} }
}; };
var g_oUndoRedoDataSetAdjustmentValueProperties = {
function UndoRedoDataSetAdjustmentValue(gdName, oldVal, newVal)
{
this.Properties = {
gdName:0, gdName:0,
oldVal: 1, oldVal: 1,
newVal: 2 newVal: 2
}; };
function UndoRedoDataSetAdjustmentValue(gdName, oldVal, newVal)
{
this.Properties = g_oUndoRedoDataSetAdjustmentValueProperties;
this.gdName = gdName; this.gdName = gdName;
this.oldVal = oldVal; this.oldVal = oldVal;
......
...@@ -82,11 +82,12 @@ function shiftSort(a, b, offset) ...@@ -82,11 +82,12 @@ function shiftSort(a, b, offset)
} }
return nRes; return nRes;
} }
function RgbColor(rgb) var g_oRgbColorProperties = {
{
this.Properties = {
rgb : 0 rgb : 0
}; };
function RgbColor(rgb)
{
this.Properties = g_oRgbColorProperties;
this.rgb = rgb; this.rgb = rgb;
} }
RgbColor.prototype = RgbColor.prototype =
...@@ -145,13 +146,14 @@ RgbColor.prototype = ...@@ -145,13 +146,14 @@ RgbColor.prototype =
return 1; return 1;
} }
}; };
function ThemeColor() var g_oThemeColorProperties = {
{
this.Properties = {
rgb: 0, rgb: 0,
theme: 1, theme: 1,
tint: 2 tint: 2
}; };
function ThemeColor()
{
this.Properties = g_oThemeColorProperties;
this.rgb = null; this.rgb = null;
this.theme = null; this.theme = null;
this.tint = null; this.tint = null;
...@@ -393,13 +395,7 @@ Fragment.prototype = { ...@@ -393,13 +395,7 @@ Fragment.prototype = {
this.sId = oVal.sId; this.sId = oVal.sId;
} }
}; };
var g_oFontProperties = {
/** @constructor */
function Font(val)
{
if(null == val)
val = g_oDefaultFontAbs;
this.Properties = {
fn: 0, fn: 0,
scheme: 1, scheme: 1,
fs: 2, fs: 2,
...@@ -410,6 +406,12 @@ function Font(val) ...@@ -410,6 +406,12 @@ function Font(val)
c: 7, c: 7,
va: 8 va: 8
}; };
/** @constructor */
function Font(val)
{
if(null == val)
val = g_oDefaultFontAbs;
this.Properties = g_oFontProperties;
this.fn = val.fn; this.fn = val.fn;
this.scheme = val.scheme; this.scheme = val.scheme;
this.fs = val.fs; this.fs = val.fs;
...@@ -635,14 +637,15 @@ Font.prototype = ...@@ -635,14 +637,15 @@ Font.prototype =
} }
} }
}; };
var g_oFillProperties = {
bg: 0
};
/** @constructor */ /** @constructor */
function Fill(val) function Fill(val)
{ {
if(null == val) if(null == val)
val = g_oDefaultFillAbs; val = g_oDefaultFillAbs;
this.Properties = { this.Properties = g_oFillProperties;
bg: 0
};
this.bg = val.bg; this.bg = val.bg;
} }
Fill.prototype = Fill.prototype =
...@@ -710,12 +713,13 @@ Fill.prototype = ...@@ -710,12 +713,13 @@ Fill.prototype =
} }
} }
}; };
function BorderProp() var g_oBorderPropProperties = {
{
this.Properties = {
s: 0, s: 0,
c: 1 c: 1
}; };
function BorderProp()
{
this.Properties = g_oBorderPropProperties;
this.s = c_oAscBorderStyles.None; this.s = c_oAscBorderStyles.None;
this.w = c_oAscBorderWidth.None; this.w = c_oAscBorderWidth.None;
this.c = g_oColorManager.getThemeColor(1); this.c = g_oColorManager.getThemeColor(1);
...@@ -804,12 +808,7 @@ BorderProp.prototype = { ...@@ -804,12 +808,7 @@ BorderProp.prototype = {
} }
} }
}; };
/** @constructor */ var g_oBorderProperties = {
function Border(val)
{
if(null == val)
val = g_oDefaultBorderAbs;
this.Properties = {
l: 0, l: 0,
t: 1, t: 1,
r: 2, r: 2,
...@@ -820,6 +819,12 @@ function Border(val) ...@@ -820,6 +819,12 @@ function Border(val)
dd: 7, dd: 7,
du: 8 du: 8
}; };
/** @constructor */
function Border(val)
{
if(null == val)
val = g_oDefaultBorderAbs;
this.Properties = g_oBorderProperties;
this.l = val.l.clone(); this.l = val.l.clone();
this.t = val.t.clone(); this.t = val.t.clone();
this.r = val.r.clone(); this.r = val.r.clone();
...@@ -977,14 +982,15 @@ Border.prototype = ...@@ -977,14 +982,15 @@ Border.prototype =
} }
} }
}; };
var g_oNumProperties = {
f: 0
};
/** @constructor */ /** @constructor */
function Num(val) function Num(val)
{ {
if(null == val) if(null == val)
val = g_oDefaultNumAbs; val = g_oDefaultNumAbs;
this.Properties = { this.Properties = g_oNumProperties;
f: 0
};
this.f = val.f; this.f = val.f;
} }
Num.prototype = Num.prototype =
...@@ -1041,9 +1047,7 @@ Num.prototype = ...@@ -1041,9 +1047,7 @@ Num.prototype =
} }
} }
}; };
/** @constructor */ var g_oCellXfsProperties = {
function CellXfs() {
this.Properties = {
border: 0, border: 0,
fill: 1, fill: 1,
font: 2, font: 2,
...@@ -1052,6 +1056,9 @@ function CellXfs() { ...@@ -1052,6 +1056,9 @@ function CellXfs() {
QuotePrefix: 5, QuotePrefix: 5,
XfId: 6 XfId: 6
}; };
/** @constructor */
function CellXfs() {
this.Properties = g_oCellXfsProperties;
this.border = null; this.border = null;
this.fill = null; this.fill = null;
this.font = null; this.font = null;
...@@ -1167,12 +1174,7 @@ CellXfs.prototype = ...@@ -1167,12 +1174,7 @@ CellXfs.prototype =
} }
} }
}; };
/** @constructor */ var g_oAlignProperties = {
function Align(val)
{
if(null == val)
val = g_oDefaultAlignAbs;
this.Properties = {
hor: 0, hor: 0,
indent: 1, indent: 1,
RelativeIndent: 2, RelativeIndent: 2,
...@@ -1181,6 +1183,12 @@ function Align(val) ...@@ -1181,6 +1183,12 @@ function Align(val)
ver: 5, ver: 5,
wrap: 6 wrap: 6
}; };
/** @constructor */
function Align(val)
{
if(null == val)
val = g_oDefaultAlignAbs;
this.Properties = g_oAlignProperties;
this.hor = val.hor; this.hor = val.hor;
this.indent = val.indent; this.indent = val.indent;
this.RelativeIndent = val.RelativeIndent; this.RelativeIndent = val.RelativeIndent;
...@@ -1978,14 +1986,15 @@ StyleManager.prototype = ...@@ -1978,14 +1986,15 @@ StyleManager.prototype =
return this.setAngle(oItemWithXfs, 0); return this.setAngle(oItemWithXfs, 0);
} }
}; };
/** @constructor */ var g_oHyperlinkProperties = {
function Hyperlink () {
this.Properties = {
Ref: 0, Ref: 0,
Location: 1, Location: 1,
Hyperlink: 2, Hyperlink: 2,
Tooltip: 3 Tooltip: 3
}; };
/** @constructor */
function Hyperlink () {
this.Properties = g_oHyperlinkProperties;
this.Ref = null; this.Ref = null;
this.Hyperlink = null; this.Hyperlink = null;
this.Tooltip = null; this.Tooltip = null;
...@@ -2671,12 +2680,13 @@ Row.prototype = ...@@ -2671,12 +2680,13 @@ Row.prototype =
History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
} }
}; };
function CCellValueMultiText() var g_oCCellValueMultiTextProperties = {
{
this.Properties = {
text: 0, text: 0,
format: 1 format: 1
}; };
function CCellValueMultiText()
{
this.Properties = g_oCCellValueMultiTextProperties;
this.text = null; this.text = null;
this.format = null; this.format = null;
} }
...@@ -2722,14 +2732,15 @@ CCellValueMultiText.prototype = ...@@ -2722,14 +2732,15 @@ CCellValueMultiText.prototype =
} }
} }
}; };
function CCellValue(cell) var g_oCCellValueProperties = {
{
this.Properties = {
text: 0, text: 0,
multiText: 1, multiText: 1,
number: 2, number: 2,
type: 3 type: 3
}; };
function CCellValue(cell)
{
this.Properties = g_oCCellValueProperties;
this.cell = cell; this.cell = cell;
this.text = null; this.text = null;
......
...@@ -14,13 +14,14 @@ var gUndoInsDelCellsFlag = true; ...@@ -14,13 +14,14 @@ var gUndoInsDelCellsFlag = true;
var prot; var prot;
var startRedo = false; var startRedo = false;
function AutoFiltersOptionsElements (val, visible) { var g_oAutoFiltersOptionsElementsProperties = {
if ( !(this instanceof AutoFiltersOptionsElements) ) {return new AutoFiltersOptionsElements(val, visible);}
this.Properties = {
val : 0, val : 0,
visible : 1 visible : 1
}; };
function AutoFiltersOptionsElements (val, visible) {
if ( !(this instanceof AutoFiltersOptionsElements) ) {return new AutoFiltersOptionsElements(val, visible);}
this.Properties = g_oAutoFiltersOptionsElementsProperties;
this.val = val; this.val = val;
this.val2 = null; this.val2 = null;
...@@ -90,12 +91,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -90,12 +91,7 @@ var gUndoInsDelCellsFlag = true;
asc_getType: function () { return this.type; }, asc_getType: function () { return this.type; },
asc_getImage: function () { return this.image; } asc_getImage: function () { return this.image; }
}; };
var g_oAutoFiltersOptionsProperties = {
function AutoFiltersOptions () {
if ( !(this instanceof AutoFiltersOptions) ) {return new AutoFiltersOptions();}
this.Properties = {
cellId : 0, cellId : 0,
result : 1, result : 1,
filter1 : 2, filter1 : 2,
...@@ -110,6 +106,11 @@ var gUndoInsDelCellsFlag = true; ...@@ -110,6 +106,11 @@ var gUndoInsDelCellsFlag = true;
height : 11, height : 11,
isCustomFilter: 12 isCustomFilter: 12
}; };
function AutoFiltersOptions () {
if ( !(this instanceof AutoFiltersOptions) ) {return new AutoFiltersOptions();}
this.Properties = g_oAutoFiltersOptionsProperties;
this.cellId = null; this.cellId = null;
this.result = null; this.result = null;
...@@ -201,15 +202,15 @@ var gUndoInsDelCellsFlag = true; ...@@ -201,15 +202,15 @@ var gUndoInsDelCellsFlag = true;
asc_getIsChecked : function() { return this.isChecked; }, asc_getIsChecked : function() { return this.isChecked; },
asc_getSortState : function() { return this.sortVal; } asc_getSortState : function() { return this.sortVal; }
}; };
var g_oAddFormatTableOptionsProperties = {
range : 0,
isTitle : 1
};
function AddFormatTableOptions () { function AddFormatTableOptions () {
if ( !(this instanceof AddFormatTableOptions) ) {return new AddFormatTableOptions();} if ( !(this instanceof AddFormatTableOptions) ) {return new AddFormatTableOptions();}
this.Properties = { this.Properties = g_oAddFormatTableOptionsProperties;
range : 0,
isTitle : 1
};
this.range = null; this.range = null;
this.isTitle = null; this.isTitle = null;
......
...@@ -1071,16 +1071,17 @@ ...@@ -1071,16 +1071,17 @@
this["r2"] = r2; this["r2"] = r2;
} }
var g_oCSheetViewSettingsProperties = {
showGridLines : 0,
showRowColHeaders : 1
};
/** @constructor */ /** @constructor */
function asc_CSheetViewSettings () { function asc_CSheetViewSettings () {
if (!(this instanceof asc_CSheetViewSettings)) { if (!(this instanceof asc_CSheetViewSettings)) {
return new asc_CSheetViewSettings(); return new asc_CSheetViewSettings();
} }
this.Properties = { this.Properties = g_oCSheetViewSettingsProperties;
showGridLines : 0,
showRowColHeaders : 1
};
// Показывать ли сетку // Показывать ли сетку
this.showGridLines = null; this.showGridLines = null;
......
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