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

fix error with border options

parent 3953762c
......@@ -6668,6 +6668,7 @@ function offline_calculate_complete_range(x, y, w, h) {
function offline_set_translate(translate) {_s.translate = translate;}
function offline_apply_event(type,params) {
var _borderOptions = Asc.c_oAscBorderOptions;
var _stream = null;
var _return = undefined;
var _current = {pos: 0};
......@@ -7110,7 +7111,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border) {
borders[c_oAscBorderOptions.Left] = border;
borders[_borderOptions.Left] = border;
}
break;
}
......@@ -7120,7 +7121,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Top] = border;
borders[_borderOptions.Top] = border;
}
break;
}
......@@ -7130,7 +7131,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Right] = border;
borders[_borderOptions.Right] = border;
}
break;
}
......@@ -7140,7 +7141,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Bottom] = border;
borders[_borderOptions.Bottom] = border;
}
break;
}
......@@ -7150,7 +7151,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.DiagD] = border;
borders[_borderOptions.DiagD] = border;
}
break;
}
......@@ -7160,7 +7161,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.DiagU] = border;
borders[_borderOptions.DiagU] = border;
}
break;
}
......@@ -7170,7 +7171,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.InnerV] = border;
borders[_borderOptions.InnerV] = border;
}
break;
}
......@@ -7180,7 +7181,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.InnerH] = border;
borders[_borderOptions.InnerH] = border;
}
break;
}
......
......@@ -42,6 +42,7 @@
* -----------------------------------------------------------------------------
*/
var asc = window["Asc"];
var borderOptions = asc.c_oAscBorderOptions;
var asc_applyFunction = asc.applyFunction;
var asc_calcnpt = asc.calcNearestPt;
var asc_getcvt = asc.getCvtRatio;
......@@ -8947,17 +8948,17 @@
}
res = new Border();
// Diagonal
res.d = makeBorder( val[c_oAscBorderOptions.DiagD] || val[c_oAscBorderOptions.DiagU] );
res.dd = val[c_oAscBorderOptions.DiagD] ? true : false;
res.du = val[c_oAscBorderOptions.DiagU] ? true : false;
res.d = makeBorder( val[borderOptions.DiagD] || val[borderOptions.DiagU] );
res.dd = val[borderOptions.DiagD] ? true : false;
res.du = val[borderOptions.DiagU] ? true : false;
// Vertical
res.l = makeBorder( val[c_oAscBorderOptions.Left] );
res.iv = makeBorder( val[c_oAscBorderOptions.InnerV] );
res.r = makeBorder( val[c_oAscBorderOptions.Right] );
res.l = makeBorder( val[borderOptions.Left] );
res.iv = makeBorder( val[borderOptions.InnerV] );
res.r = makeBorder( val[borderOptions.Right] );
// Horizontal
res.t = makeBorder( val[c_oAscBorderOptions.Top] );
res.ih = makeBorder( val[c_oAscBorderOptions.InnerH] );
res.b = makeBorder( val[c_oAscBorderOptions.Bottom] );
res.t = makeBorder( val[borderOptions.Top] );
res.ih = makeBorder( val[borderOptions.InnerH] );
res.b = makeBorder( val[borderOptions.Bottom] );
// Change border
range.setBorder( res );
break;
......
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