Commit f7df9be0 authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete valign to string

delete string to valign
parent afae148a
...@@ -2960,12 +2960,11 @@ var editor; ...@@ -2960,12 +2960,11 @@ var editor;
}; };
spreadsheet_api.prototype.asc_setCellVertAlign = function(align) { spreadsheet_api.prototype.asc_setCellVertAlign = function(align) {
var va = AscCommonExcel.verticalAlignFromString(align);
var ws = this.wb.getWorksheet(); var ws = this.wb.getWorksheet();
if (ws.objectRender.selectedGraphicObjectsExists() && ws.objectRender.controller.setCellVertAlign) { if (ws.objectRender.selectedGraphicObjectsExists() && ws.objectRender.controller.setCellVertAlign) {
ws.objectRender.controller.setCellVertAlign(va); ws.objectRender.controller.setCellVertAlign(align);
} else { } else {
this.wb.getWorksheet().setSelectionInfo("va", va); this.wb.getWorksheet().setSelectionInfo("va", align);
this.wb.restoreFocus(); this.wb.restoreFocus();
} }
}; };
......
...@@ -91,28 +91,6 @@ ...@@ -91,28 +91,6 @@
} }
return ha; return ha;
} }
function verticalAlignFromString(val) {
var va = null;
switch (val) {
case "bottom": va = Asc.c_oAscVAlign.Bottom;break;
case "center": va = Asc.c_oAscVAlign.Center;break;
case "distributed": va = Asc.c_oAscVAlign.Dist;break;
case "justify": va = Asc.c_oAscVAlign.Just;break;
case "top": va = Asc.c_oAscVAlign.Top;break;
}
return va;
}
function verticalAlignToString(val) {
var va = "none";
switch (val) {
case Asc.c_oAscVAlign.Bottom: va = "bottom";break;
case Asc.c_oAscVAlign.Center: va = "center";break;
case Asc.c_oAscVAlign.Dist: va = "distributed";break;
case Asc.c_oAscVAlign.Just: va = "justify";break;
case Asc.c_oAscVAlign.Top: va = "top";break;
}
return va;
}
function applyFunction(callback) { function applyFunction(callback) {
if (kFunctionL === typeof callback) { if (kFunctionL === typeof callback) {
...@@ -2355,8 +2333,6 @@ ...@@ -2355,8 +2333,6 @@
window["AscCommonExcel"].applyFunction = applyFunction; window["AscCommonExcel"].applyFunction = applyFunction;
window["AscCommonExcel"].horizontalAlignFromString = horizontalAlignFromString; window["AscCommonExcel"].horizontalAlignFromString = horizontalAlignFromString;
window["AscCommonExcel"].horizontalAlignToString = horizontalAlignToString; window["AscCommonExcel"].horizontalAlignToString = horizontalAlignToString;
window["AscCommonExcel"].verticalAlignFromString = verticalAlignFromString;
window["AscCommonExcel"].verticalAlignToString = verticalAlignToString;
window["Asc"].typeOf = typeOf; window["Asc"].typeOf = typeOf;
window["Asc"].lastIndexOf = lastIndexOf; window["Asc"].lastIndexOf = lastIndexOf;
window["Asc"].search = search; window["Asc"].search = search;
......
...@@ -6800,7 +6800,7 @@ ...@@ -6800,7 +6800,7 @@
cell_info.text = c.getValueForEdit(); cell_info.text = c.getValueForEdit();
cell_info.halign = AscCommonExcel.horizontalAlignToString(align.getAlignHorizontal()); cell_info.halign = AscCommonExcel.horizontalAlignToString(align.getAlignHorizontal());
cell_info.valign = AscCommonExcel.verticalAlignToString(align.getAlignVertical()); cell_info.valign = align.getAlignVertical();
var tablePartsOptions = selectionRange.isSingleRange() ? var tablePartsOptions = selectionRange.isSingleRange() ?
this.model.autoFilters.searchRangeInTableParts(selectionRange.getLast()) : -2; this.model.autoFilters.searchRangeInTableParts(selectionRange.getLast()) : -2;
...@@ -7006,7 +7006,7 @@ ...@@ -7006,7 +7006,7 @@
} }
objectInfo.halign = AscCommonExcel.horizontalAlignToString(horAlign); objectInfo.halign = AscCommonExcel.horizontalAlignToString(horAlign);
objectInfo.valign = AscCommonExcel.verticalAlignToString(vertAlign); objectInfo.valign = vertAlign;
objectInfo.angle = angle; objectInfo.angle = angle;
objectInfo.font = new asc_CFont(); objectInfo.font = new asc_CFont();
......
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