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