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

scripts new version

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58412 954022d7-b5bf-4e40-9824-e11837661b57
parent 2959ab8b
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -75566,6 +75566,10 @@ function DrawingObjects() { ...@@ -75566,6 +75566,10 @@ function DrawingObjects() {
return val * ascCvtRatio(from, to); return val * ascCvtRatio(from, to);
}; };
_this.convertPixToMM = function(pix)
{
return this.convertMetric(pix, 0, 3);
};
_this.getSelectedGraphicObjects = function() { _this.getSelectedGraphicObjects = function() {
return _this.controller.selectedObjects; return _this.controller.selectedObjects;
}; };
...@@ -96312,6 +96316,7 @@ CImageShape.prototype = ...@@ -96312,6 +96316,7 @@ CImageShape.prototype =
{ {
this.setWorksheet(worksheet); this.setWorksheet(worksheet);
this.setParent(null); this.setParent(null);
this.setBDeleted(false);
return this; return this;
}, },
...@@ -97045,6 +97050,24 @@ CGroupShape.prototype = ...@@ -97045,6 +97050,24 @@ CGroupShape.prototype =
this.bDeleted = pr; this.bDeleted = pr;
}, },
setBDeleted2: function(pr)
{
this.bDeleted = pr;
for(var i = 0; i < this.spTree.length; ++i)
{
if(this.spTree[i].setBDeleted2)
{
this.spTree[i].setBDeleted2(pr);
}
else
{
this.spTree[i].bDeleted = pr;
}
}
},
documentUpdateSelectionState: function() documentUpdateSelectionState: function()
{ {
if(this.selection.textSelection) if(this.selection.textSelection)
...@@ -97271,6 +97294,7 @@ CGroupShape.prototype = ...@@ -97271,6 +97294,7 @@ CGroupShape.prototype =
var sp_tree_copy = [].concat(this.spTree), i; var sp_tree_copy = [].concat(this.spTree), i;
this.setWorksheet(worksheet); this.setWorksheet(worksheet);
this.setParent(null); this.setParent(null);
this.setBDeleted(false);
for(i = this.spTree.length-1; i > -1; --i) for(i = this.spTree.length-1; i > -1; --i)
{ {
this.removeFromSpTreeByPos(i); this.removeFromSpTreeByPos(i);
...@@ -97278,6 +97302,7 @@ CGroupShape.prototype = ...@@ -97278,6 +97302,7 @@ CGroupShape.prototype =
for(i = 0; i < sp_tree_copy.length; ++i) for(i = 0; i < sp_tree_copy.length; ++i)
{ {
this.addToSpTree(this.spTree.length, sp_tree_copy[i].convertToPPTX(drawingDocument, worksheet)); this.addToSpTree(this.spTree.length, sp_tree_copy[i].convertToPPTX(drawingDocument, worksheet));
this.spTree[this.spTree.length - 1].setGroup(this);
} }
return this; return this;
}, },
...@@ -100026,6 +100051,7 @@ CChartSpace.prototype = ...@@ -100026,6 +100051,7 @@ CChartSpace.prototype =
convertToPPTX: function(drawingDocument, worksheet) convertToPPTX: function(drawingDocument, worksheet)
{ {
this.setBDeleted(false);
this.setWorksheet(worksheet); this.setWorksheet(worksheet);
this.setParent(null); this.setParent(null);
return this; return this;
...@@ -106570,9 +106596,9 @@ CChartSpace.prototype = ...@@ -106570,9 +106596,9 @@ CChartSpace.prototype =
for(i = 0; i < series.length; ++i) for(i = 0; i < series.length; ++i)
{ {
ser = series[i]; ser = series[i];
arr_str_labels.push(ser.getSeriesName());
if(ser.isHidden) if(ser.isHidden)
continue; continue;
arr_str_labels.push(ser.getSeriesName());
calc_entry = new CalcLegendEntry(legend, this); calc_entry = new CalcLegendEntry(legend, this);
calc_entry.txBody = CreateTextBodyFromString(arr_str_labels[i], this.getDrawingDocument(), calc_entry); calc_entry.txBody = CreateTextBodyFromString(arr_str_labels[i], this.getDrawingDocument(), calc_entry);
entry = legend.findLegendEntryByIndex(i); entry = legend.findLegendEntryByIndex(i);
...@@ -109622,6 +109648,20 @@ CPivotSource.prototype = ...@@ -109622,6 +109648,20 @@ CPivotSource.prototype =
} }
}, },
createDuplicate: function()
{
var copy = new CPivotSource();
if(isRealNumber(this.fmtId))
{
copy.setFmtId(this.fmtId);
}
if(typeof this.name === "string")
{
copy.setName(this.name);
}
return copy;
},
Save_Changes: function(data, w) Save_Changes: function(data, w)
{ {
w.WriteLong(data.Type); w.WriteLong(data.Type);
...@@ -109724,6 +109764,17 @@ CProtection.prototype = ...@@ -109724,6 +109764,17 @@ CProtection.prototype =
this.userInterface = pr; this.userInterface = pr;
}, },
createDuplicate: function()
{
var c = new CProtection();
c.setChartObject (this.chartObject );
c.setData (this.data);
c.setFormatting (this.formatting);
c.setSelection (this.selection);
c.setUserInterface(this.userInterface);
return c;
},
Undo: function(data) Undo: function(data)
{ {
...@@ -181524,12 +181575,12 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -181524,12 +181575,12 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
{ {
this.Paragraph = PRS.Paragraph; this.Paragraph = PRS.Paragraph;
if(this.Type == para_Math_Run) /*if(this.Type == para_Math_Run)
{ {
this.ArgSize = PRS.ArgSize.value; this.ArgSize = PRS.ArgSize.value;
this.bEqqArray = PRS.bEqqArray; this.bEqqArray = PRS.bEqqArray;
this.Parent = PRS.Parent; this.Parent = PRS.Parent;
} }*/
this.RecalcInfo.TextPr = true; this.RecalcInfo.TextPr = true;
this.Paragraph.RecalcInfo.Set_Type_0_Spell( pararecalc_0_Spell_All ); this.Paragraph.RecalcInfo.Set_Type_0_Spell( pararecalc_0_Spell_All );
...@@ -188018,6 +188069,13 @@ function MathMenu (type) ...@@ -188018,6 +188069,13 @@ function MathMenu (type)
this.Type = para_Math; this.Type = para_Math;
this.Menu = type; this.Menu = type;
} }
MathMenu.prototype =
{
Get_Type : function()
{
return this.Type;
}
}
function ParaMath() function ParaMath()
{ {
this.Id = g_oIdCounter.Get_NewId(); this.Id = g_oIdCounter.Get_NewId();
...@@ -188171,7 +188229,7 @@ ParaMath.prototype = ...@@ -188171,7 +188229,7 @@ ParaMath.prototype =
if ( para_Text === Type) if ( para_Text === Type)
{ {
var oText = new CMathText(false); var oText = new CMathText(false);
oText.addTxt(Item.Value); oText.add(Item.Value);
oStartContent.Add(oText, true); oStartContent.Add(oText, true);
} }
else if ( para_Space === Type ) else if ( para_Space === Type )
...@@ -188562,7 +188620,6 @@ ParaMath.prototype = ...@@ -188562,7 +188620,6 @@ ParaMath.prototype =
if(PRS.NewRange == false) if(PRS.NewRange == false)
this.Root.Recalculate_Reset(PRS.Range, PRS.Line); this.Root.Recalculate_Reset(PRS.Range, PRS.Line);
this.Root.Resize(g_oTextMeasurer, null, this, RPI/*recalculate properties info*/, ArgSize, TextPr); this.Root.Resize(g_oTextMeasurer, null, this, RPI/*recalculate properties info*/, ArgSize, TextPr);
//this.Root.Resize(null, this, g_oTextMeasurer, RPI/*recalculate properties info*/, TextPr); //this.Root.Resize(null, this, g_oTextMeasurer, RPI/*recalculate properties info*/, TextPr);
...@@ -295148,6 +295205,9 @@ var ACCENT_ARROW_RIGHT = 27; ...@@ -295148,6 +295205,9 @@ var ACCENT_ARROW_RIGHT = 27;
var ACCENT_ARROW_LR = 28; var ACCENT_ARROW_LR = 28;
var ACCENT_HALF_ARROW_LEFT = 29; var ACCENT_HALF_ARROW_LEFT = 29;
var ACCENT_HALF_ARROW_RIGHT = 30; var ACCENT_HALF_ARROW_RIGHT = 30;
var PARENTHESIS_TOP = 31;
var PARENTHESIS_BOTTOM = 32;
var BRACKET_SQUARE_TOP = 33;
var ACCENT_ONE_DOT = 31; var ACCENT_ONE_DOT = 31;
var ACCENT_TWO_DOTS = 32; var ACCENT_TWO_DOTS = 32;
...@@ -296926,8 +296986,10 @@ CMPrp.prototype = ...@@ -296926,8 +296986,10 @@ CMPrp.prototype =
this.sty = STY_ITALIC; this.sty = STY_ITALIC;
else if(Bold == true) else if(Bold == true)
this.sty = STY_BOLD; this.sty = STY_BOLD;
else else if(Bold == false && Italic == false)
this.sty = STY_PLAIN; this.sty = STY_PLAIN;
else
this.sty = undefined;
} }
} }
...@@ -300870,6 +300932,7 @@ CMathContent.prototype = ...@@ -300870,6 +300932,7 @@ CMathContent.prototype =
ctrPrp = current.Get_CtrPrp(); ctrPrp = current.Get_CtrPrp();
mathPrp = new CMPrp(); mathPrp = new CMPrp();
mathPrp.SetStyle(ctrPrp.Bold, ctrPrp.Italic); mathPrp.SetStyle(ctrPrp.Bold, ctrPrp.Italic);
emptyRun.Set_MathPr(mathPrp); emptyRun.Set_MathPr(mathPrp);
...@@ -305510,12 +305573,6 @@ CMathBase.prototype = ...@@ -305510,12 +305573,6 @@ CMathBase.prototype =
} }
} }
/*if(this.constructor.name == "CDegreeSubSup")
{
console.log("startX " + startX + " startY " + startY + "; " + "endX " + endX + " endY " + endY);
}*/
this.bSelectionUse = true; this.bSelectionUse = true;
}, },
...@@ -308814,7 +308871,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -308814,7 +308871,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
this.Parent = Parent; this.Parent = Parent;
this.ParaMath = ParaMath; this.ParaMath = ParaMath;
//this.Set_CompiledCtrPrp(ParaMath);
if(this.RecalcInfo.bProps == true || RPI.bChangeInline == true) if(this.RecalcInfo.bProps == true || RPI.bChangeInline == true)
{ {
...@@ -308866,7 +308922,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -308866,7 +308922,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
} }
if(RPI.bInline == true && RPI.bMathFunc == true) if(RPI.bInline == true && RPI.bMathFunc == true)
{ {
this.elements[0][0].Resize(oMeasure, this, ParaMath, RPI, ArgSize); this.elements[0][0].Resize(oMeasure, this, ParaMath, RPI, ArgSize);
...@@ -308880,8 +308935,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -308880,8 +308935,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
} }
else else
{ {
//this.setDistance();
this.FName.Resize(oMeasure, this, ParaMath, RPI, ArgSize); this.FName.Resize(oMeasure, this, ParaMath, RPI, ArgSize);
var ArgSzIter = ArgSize.Copy(); var ArgSzIter = ArgSize.Copy();
...@@ -308905,28 +308958,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -308905,28 +308958,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
width += this.GapLeft + this.GapRight; width += this.GapLeft + this.GapRight;
/*var width = 0;
var height = 0;
var maxWH = this.getWidthsHeights();
this.setDistance();
var Widths = maxWH.widths;
var Heights = maxWH.heights;
for( var j = 0 ; j < this.nRow; j++ )
height += Heights[j];
height += this.dH*(this.nRow - 1);
for(var i=0; i < this.nCol ; i++)
width += Widths[i];
width += this.dW*(this.nCol - 1) + this.GapLeft + this.GapRight;
var ascent = this.getAscent(oMeasure);*/
this.size = {width: width, height: height, ascent: ascent}; this.size = {width: width, height: height, ascent: ascent};
} }
...@@ -312985,7 +313016,6 @@ CGlyphOperator.prototype.getCoordinateGlyph = function() ...@@ -312985,7 +313016,6 @@ CGlyphOperator.prototype.getCoordinateGlyph = function()
}*/ }*/
/*var shW = 0, /*var shW = 0,
shH = 0; shH = 0;
...@@ -313053,10 +313083,6 @@ CGlyphOperator.prototype.relate = function(parent) ...@@ -313053,10 +313083,6 @@ CGlyphOperator.prototype.relate = function(parent)
{ {
this.Parent = parent; this.Parent = parent;
} }
CGlyphOperator.prototype.IsArrow = function()
{
return false;
}
function COperatorBracket() function COperatorBracket()
...@@ -313068,8 +313094,18 @@ COperatorBracket.prototype.calcSize = function( stretch ) ...@@ -313068,8 +313094,18 @@ COperatorBracket.prototype.calcSize = function( stretch )
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var heightBr, widthBr;
var minBoxH = 4.917529296874999 *betta; //width of 0x28
if(this.Parent.type == OPER_GROUP_CHAR)
{
// перевернутая скобка
widthBr = 7.347222222222221*betta;
heightBr = minBoxH;
}
else
{
// перевернутая скобка // перевернутая скобка
var minBoxH = 4.917529296874999 *betta, //width of 0x28
widthBr = 12.347222222222221*betta; widthBr = 12.347222222222221*betta;
var maxBoxH; var maxBoxH;
...@@ -313086,8 +313122,9 @@ COperatorBracket.prototype.calcSize = function( stretch ) ...@@ -313086,8 +313122,9 @@ COperatorBracket.prototype.calcSize = function( stretch )
var delta = maxBoxH - minBoxH; var delta = maxBoxH - minBoxH;
var heightBr = delta/4.3 * (rx - 1) + minBoxH; heightBr = delta/4.3 * (rx - 1) + minBoxH;
heightBr = heightBr > maxBoxH ? maxBoxH : heightBr; heightBr = heightBr > maxBoxH ? maxBoxH : heightBr;
}
return {width: widthBr, height: heightBr}; return {width: widthBr, height: heightBr};
} }
...@@ -313495,13 +313532,19 @@ COperatorBracket.prototype.calcCoord = function(stretch) ...@@ -313495,13 +313532,19 @@ COperatorBracket.prototype.calcCoord = function(stretch)
} }
var H = Y[53]*RX[53];
for(var i = 0; i < 54; i++) for(var i = 0; i < 54; i++)
{ {
YY[i] = (H - Y[i]*RX[i])*alpha; //YY[i] = (H - Y[i]*RX[i])*alpha;
if(this.Parent.type == OPER_GROUP_CHAR)
YY[i] = (Y[53] - Y[i])*alpha;
else
YY[i] = (Y[53]*RX[53] - Y[i]*RX[i])*alpha;
XX[i] = XX[i]*alpha; XX[i] = XX[i]*alpha;
} }
for(var i = 0; i < 50; i++) for(var i = 0; i < 50; i++)
YY[54 + i] = YY[51 - i]; YY[54 + i] = YY[51 - i];
...@@ -313575,7 +313618,6 @@ COperatorBracket.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -313575,7 +313618,6 @@ COperatorBracket.prototype.drawPath = function(pGraphics, XX, YY)
pGraphics._c(XX[102], YY[102], XX[103], YY[103], XX[0], YY[0]); pGraphics._c(XX[102], YY[102], XX[103], YY[103], XX[0], YY[0]);
} }
// TODO: сделать так, чтобы размер скобки совпадал в начальном случае (плейсхолдер), сейчас по размеру аргумента
function COperatorParenthesis() function COperatorParenthesis()
{ {
...@@ -313586,15 +313628,29 @@ COperatorParenthesis.prototype.calcSize = function(stretch) ...@@ -313586,15 +313628,29 @@ COperatorParenthesis.prototype.calcSize = function(stretch)
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var maxBoxH = 9.63041992187 *betta, //9.63 width of 0x239D var heightBr, widthBr;
minBoxH = 5.27099609375 *betta, //width of 0x28 var minBoxH = 5.27099609375 *betta; //width of 0x28
if(this.Parent.type == OPER_GROUP_CHAR)
{
// перевернутая скобка
widthBr = 6.99444444444*betta;
heightBr = minBoxH;
}
else
{
var maxBoxH = 9.63041992187 *betta; //9.63 width of 0x239D
widthBr = 11.99444444444 *betta; widthBr = 11.99444444444 *betta;
var ry = stretch / widthBr, var ry = stretch / widthBr,
delta = maxBoxH - minBoxH; delta = maxBoxH - minBoxH;
var heightBr = delta/4.3 * (ry - 1) + minBoxH; heightBr = delta/4.3 * (ry - 1) + minBoxH;
heightBr = heightBr > maxBoxH ? maxBoxH : heightBr; heightBr = heightBr > maxBoxH ? maxBoxH : heightBr;
}
return {height: heightBr, width : widthBr}; return {height: heightBr, width : widthBr};
} }
...@@ -313622,15 +313678,17 @@ COperatorParenthesis.prototype.calcCoord = function(stretch) ...@@ -313622,15 +313678,17 @@ COperatorParenthesis.prototype.calcCoord = function(stretch)
var aug = stretch/(X[9]*alpha)/2; //Y[9]*alpha - высота скобки var aug = stretch/(X[9]*alpha)/2; //Y[9]*alpha - высота скобки
var RX, RY; var RX, RY;
var MIN_AUG = this.Parent.type == OPER_GROUP_CHAR ? 0.5 : 1;
if(aug > 6.53) if(aug > 6.53)
{ {
RX = 6.53; RX = 6.53;
RY = 2.05; RY = 2.05;
} }
else if(aug < 1) else if(aug < MIN_AUG)
{ {
RX = 1; RX = MIN_AUG;
RY = 1; RY = MIN_AUG;
} }
else else
{ {
...@@ -313638,6 +313696,8 @@ COperatorParenthesis.prototype.calcCoord = function(stretch) ...@@ -313638,6 +313696,8 @@ COperatorParenthesis.prototype.calcCoord = function(stretch)
RY = 1 + (aug - 1)*0.19; RY = 1 + (aug - 1)*0.19;
} }
if(this.Parent.type !== OPER_GROUP_CHAR)
{
var DistH = []; var DistH = [];
for(var i= 0; i< 5; i++) for(var i= 0; i< 5; i++)
DistH[i] = Y[9-i] - Y[i]; DistH[i] = Y[9-i] - Y[i];
...@@ -313647,6 +313707,7 @@ COperatorParenthesis.prototype.calcCoord = function(stretch) ...@@ -313647,6 +313707,7 @@ COperatorParenthesis.prototype.calcCoord = function(stretch)
Y[i] = Y[i]*RY; //точки правой дуги Y[i] = Y[i]*RY; //точки правой дуги
Y[9-i] = Y[i] - DistH[9-i]; //точки левой дуги Y[9-i] = Y[i] - DistH[9-i]; //точки левой дуги
} }
}
// X // X
var DistW = []; var DistW = [];
...@@ -313674,8 +313735,10 @@ COperatorParenthesis.prototype.calcCoord = function(stretch) ...@@ -313674,8 +313735,10 @@ COperatorParenthesis.prototype.calcCoord = function(stretch)
for(var i = 0; i < 10; i++) for(var i = 0; i < 10; i++)
{ {
YY[19 - i] = shiftY - Y[i]*alpha; YY[19 - i] = shiftY - Y[i]*alpha;
YY[i] = shiftY - Y[i]*alpha; YY[i] = shiftY - Y[i]*alpha;
XX[19 - i] = X[i]*alpha; XX[19 - i] = X[i]*alpha;
XX[i] = stretch - X[i]*alpha; XX[i] = stretch - X[i]*alpha;
} }
...@@ -314273,10 +314336,6 @@ CSingleArrow.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -314273,10 +314336,6 @@ CSingleArrow.prototype.drawPath = function(pGraphics, XX, YY)
pGraphics._l(XX[9], YY[9]); pGraphics._l(XX[9], YY[9]);
pGraphics._l(XX[10], YY[10]); pGraphics._l(XX[10], YY[10]);
} }
CSingleArrow.prototype.IsArrow = function()
{
return true;
}
function CLeftRightArrow() function CLeftRightArrow()
{ {
...@@ -314362,10 +314421,6 @@ CLeftRightArrow.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -314362,10 +314421,6 @@ CLeftRightArrow.prototype.drawPath = function(pGraphics, XX, YY)
pGraphics._l(XX[16], YY[16]); pGraphics._l(XX[16], YY[16]);
} }
CLeftRightArrow.prototype.IsArrow = function()
{
return true;
}
function CDoubleArrow() function CDoubleArrow()
{ {
...@@ -314461,10 +314516,7 @@ CDoubleArrow.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -314461,10 +314516,7 @@ CDoubleArrow.prototype.drawPath = function(pGraphics, XX, YY)
pGraphics._m(XX[16], YY[16]); pGraphics._m(XX[16], YY[16]);
pGraphics._l(XX[17], YY[17]); pGraphics._l(XX[17], YY[17]);
} }
CDoubleArrow.prototype.IsArrow = function()
{
return true;
}
function CLR_DoubleArrow() function CLR_DoubleArrow()
{ {
...@@ -314570,11 +314622,6 @@ CLR_DoubleArrow.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -314570,11 +314622,6 @@ CLR_DoubleArrow.prototype.drawPath = function(pGraphics, XX, YY)
pGraphics._l(XX[22], YY[22]); pGraphics._l(XX[22], YY[22]);
pGraphics._l(XX[23], YY[23]); pGraphics._l(XX[23], YY[23]);
} }
CLR_DoubleArrow.prototype.IsArrow = function()
{
return true;
}
function CCombiningArrow() function CCombiningArrow()
...@@ -315396,6 +315443,45 @@ COperator.prototype.mergeProperties = function(properties, defaultProps) // pr ...@@ -315396,6 +315443,45 @@ COperator.prototype.mergeProperties = function(properties, defaultProps) // pr
}; };
operator.init(prp); operator.init(prp);
} }
else if(code === 0x23DC || type === PARENTHESIS_TOP)
{
codeChr = 0x23DC;
typeOper = PARENTHESIS_TOP;
operator = new COperatorParenthesis();
prp =
{
location: location,
turn: TURN_0
};
operator.init(prp);
}
else if(code === 0x23DD || type === PARENTHESIS_BOTTOM)
{
codeChr = 0x23DD;
typeOper = PARENTHESIS_BOTTOM;
operator = new COperatorParenthesis();
prp =
{
location: location,
turn: TURN_MIRROR_0
};
operator.init(prp);
}
else if(code === 0x23E0 || type === BRACKET_SQUARE_TOP)
{
codeChr = 0x23E0;
typeOper = BRACKET_SQUARE_TOP;
operator = new CSquareBracket();
prp =
{
location: location,
turn: TURN_0
};
operator.init(prp);
}
else if(code === 0x2190 || type === ARROW_LEFT) else if(code === 0x2190 || type === ARROW_LEFT)
{ {
codeChr = 0x2190; codeChr = 0x2190;
...@@ -315882,7 +315968,13 @@ COperator.prototype.getChr = function() ...@@ -315882,7 +315968,13 @@ COperator.prototype.getChr = function()
} }
COperator.prototype.IsArrow = function() COperator.prototype.IsArrow = function()
{ {
return this.operator.IsArrow(); //return this.operator.IsArrow();
var bArrow = this.typeOper == ARROW_LEFT || this.typeOper == ARROW_RIGHT || this.typeOper == ARROW_LR,
bDoubleArrow = this.typeOper == DOUBLE_LEFT_ARROW || this.typeOper == DOUBLE_RIGHT_ARROW || this.typeOper == DOUBLE_ARROW_LR,
bAccentArrow = his.typeOper == ACCENT_ARROW_LEFT || this.typeOper == ACCENT_ARROW_RIGHT || this.typeOper == ACCENT_ARROW_LR || this.typeOper == ACCENT_HALF_ARROW_LEFT || this.typeOper == ACCENT_HALF_ARROW_RIGHT;
return bArrow || bDoubleArrow;
} }
function CDelimiter(props) function CDelimiter(props)
...@@ -316588,6 +316680,7 @@ CCharacter.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -316588,6 +316680,7 @@ CCharacter.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
height = base.size.height + this.operator.size.height, height = base.size.height + this.operator.size.height,
ascent = this.getAscent(oMeasure); ascent = this.getAscent(oMeasure);
width += this.GapLeft + this.GapRight;
this.size = {height: height, width: width, ascent: ascent}; this.size = {height: height, width: width, ascent: ascent};
} }
...@@ -316631,7 +316724,7 @@ CCharacter.prototype.setPosition = function(pos, PosInfo) ...@@ -316631,7 +316724,7 @@ CCharacter.prototype.setPosition = function(pos, PosInfo)
} }
CCharacter.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, _CurRange, StepEnd) CCharacter.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, _CurRange, StepEnd)
{ {
var align = (this.size.width - this.elements[0][0].size.width)/2; var align = (this.size.width - this.elements[0][0].size.width - this.GapLeft - this.GapRight)/2;
SearchPos.CurX += this.GapLeft + align; SearchPos.CurX += this.GapLeft + align;
...@@ -317467,28 +317560,6 @@ CSign.prototype.setPosition = function(pos) ...@@ -317467,28 +317560,6 @@ CSign.prototype.setPosition = function(pos)
{ {
this.sign.setPosition(pos); this.sign.setPosition(pos);
} }
/*CSign.prototype.setPosition = function(pos)
{
var shX = 0;
if(this.typeOper == ACCENT_GRAVE)
shX = 1.1*this.sign.size.widthG;
else if(this.typeOper == ACCENT_ACUTE)
shX = 1.25*this.sign.size.widthG;
else if(this.typeOper == ACCENT_ONE_DOT)
shX = 1.53*this.sign.size.widthG;
else if(this.typeOper == ACCENT_TWO_DOTS)
shX = 0.95*this.sign.size.widthG;
else if(this.typeOper == ACCENT_THREE_DOTS)
shX = 0.015*this.sign.size.widthG;
var position =
{
x: pos.x + shX,
y: pos.y + this.sign.size.ascent
};
this.sign.setPosition(position);
}*/
CSign.prototype.fixSize = function(oMeasure, stretch, bIncline) CSign.prototype.fixSize = function(oMeasure, stretch, bIncline)
{ {
var ctrPrp = this.Parent.Get_CompiledCtrPrp(); var ctrPrp = this.Parent.Get_CompiledCtrPrp();
...@@ -317585,519 +317656,6 @@ CAccent.prototype.IsAccent = function() ...@@ -317585,519 +317656,6 @@ CAccent.prototype.IsAccent = function()
{ {
return true; return true;
} }
CAccent.prototype.old_init = function(properties)
{
var type = properties.chrType,
code;
var typeOper, codeChr;
var operator;
//// ВРЕМЕННО !!!!
var bCode = false,
bType = typeof(type) !== "undefined" && type !== null;
if(typeof(properties.chr) === "string")
{
bCode = true;
code = properties.chr.charCodeAt(0);
}
/*var bDot = code === 0x307 || props.chr.type === ACCENT_ONE_DOT,
b2Dots = code === 0x308 || props.chr.type === ACCENT_TWO_DOTS,
b3Dots = code === 0x20DB || props.chr.type === ACCENT_THREE_DOTS,
bAccGrave = code === 0x300 || props.chr.type === ACCENT_GRAVE,
bAccAcute = code === 0x301 || props.chr.type === ACCENT_ACUTE;
if(bDot || b2Dots || b3Dots || bAccGrave || bAccAcute)
{
this.accent = new CMathText();
this.accent.add(code);
typeOper = props.chr.type;
}*/
if(code === 0x302 || type === ACCENT_CIRCUMFLEX)
{
typeOper = ACCENT_CIRCUMFLEX;
codeChr = 0x302;
operator = new CCircumflex();
var props =
{
turn: TURN_MIRROR_0
};
operator.init(props);
}
else if(code === 0x30C || type === ACCENT_COMB_CARON)
{
typeOper = ACCENT_COMB_CARON;
codeChr = 0x30C;
operator = new CCircumflex();
var props =
{
turn: TURN_0
};
operator.init(props);
}
else if(code === 0x305 || type === ACCENT_LINE)
{
typeOper = ACCENT_LINE;
//codeChr = 0x332;
codeChr = 0x305;
operator = new CLine();
}
else if(code === 0x33F || type === ACCENT_DOUBLE_LINE)
{
typeOper = ACCENT_DOUBLE_LINE;
//codeChr = 0x333;
codeChr = 0x33F;
operator = new CDoubleLine();
}
else if(code === 0x303 || type === ACCENT_TILDE)
{
typeOper = ACCENT_TILDE;
codeChr = 0x303;
operator = new CTilde();
}
else if(code === 0x306 || type === ACCENT_BREVE)
{
typeOper = ACCENT_BREVE;
codeChr = 0x306;
operator = new CBreve();
var props =
{
turn: TURN_MIRROR_0
};
operator.init(props);
}
else if(code == 0x311 || type == ACCENT_INVERT_BREVE)
{
typeOper = ACCENT_INVERT_BREVE;
codeChr = 0x311;
operator = new CBreve();
var props =
{
turn: TURN_0
};
operator.init(props);
}
else if(code === 0x20D6 || type === ACCENT_ARROW_LEFT)
{
typeOper = ACCENT_ARROW_LEFT;
codeChr = 0x20D6;
/*var glyph = new CCombiningArrow();
var props =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(props);*/
operator = new COperator(OPER_ACCENT);
var props =
{
type: properties.chrType,
chr: properties.chr
};
var defaultProps =
{
loc: LOCATION_TOP
};
operator.init(props, defaultProps);
}
else if(code === 0x20D7 || type === ACCENT_ARROW_RIGHT)
{
typeOper = ACCENT_ARROW_RIGHT;
codeChr = 0x20D7;
/*var glyph = new CCombiningArrow();
var props =
{
location: LOCATION_TOP,
turn: TURN_180
};
glyph.init(props);
operator = new COperator(glyph);*/
operator = new COperator(OPER_ACCENT);
var props =
{
type: properties.chrType,
chr: properties.chr
};
var defaultProps =
{
loc: LOCATION_TOP
};
operator.init(props, defaultProps);
}
else if(code === 0x20E1 || type === ACCENT_ARROW_LR)
{
typeOper = ACCENT_ARROW_LR;
codeChr = 0x20E1;
/*var glyph = new CCombining_LR_Arrow();
var props =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(props);
operator = new COperator(glyph);*/
operator = new COperator(OPER_ACCENT);
var props =
{
type: properties.chrType,
chr: properties.chr
};
var defaultProps =
{
loc: LOCATION_TOP
};
operator.init(props, defaultProps);
}
else if(code === 0x20D0 || type === ACCENT_HALF_ARROW_LEFT)
{
typeOper = ACCENT_HALF_ARROW_LEFT;
codeChr = 0x20D0;
/*var glyph = new CCombiningHalfArrow();
var props =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(props);
operator = new COperator(glyph);*/
operator = new COperator(OPER_ACCENT);
var props =
{
type: properties.chrType,
chr: properties.chr
};
var defaultProps =
{
loc: LOCATION_TOP
};
operator.init(props, defaultProps);
}
else if(code === 0x20D1 || type === ACCENT_HALF_ARROW_RIGHT)
{
typeOper = ACCENT_HALF_ARROW_RIGHT;
codeChr = 0x20D1;
/*var glyph = new CCombiningHalfArrow();
var props =
{
location: LOCATION_TOP,
turn: TURN_180
};
glyph.init(props);
operator = new COperator(glyph);*/
operator = new COperator(OPER_ACCENT);
var props =
{
type: properties.chrType,
chr: properties.chr
};
var defaultProps =
{
loc: LOCATION_TOP
};
operator.init(props, defaultProps);
}
/*if(code === 0x302 || type === ACCENT_CIRCUMFLEX)
{
typeOper = ACCENT_CIRCUMFLEX;
this.code = 0x302;
accent = new CCircumflex();
accent.setTurn(TURN_0);
}
else if(code === 0x30C || type === ACCENT_COMB_CARON)
{
typeOper = ACCENT_COMB_CARON;
this.code = 0x30C;
accent = new CCircumflex();
accent.setTurn(TURN_MIRROR_0);
}
else if(code === 0x332 || type === ACCENT_LINE)
{
typeOper = ACCENT_LINE;
this.code = 0x332;
accent = new CLine();
}
else if(code === 0x333 || type === ACCENT_DOUBLE_LINE)
{
typeOper = ACCENT_DOUBLE_LINE;
this.code = 0x333;
accent = new CDoubleLine();
}
else if(code === 0x303 || type === ACCENT_TILDE)
{
typeOper = ACCENT_TILDE;
this.code = 0x303;
accent = new CTilde();
}
else if(code === 0x306 || type === ACCENT_BREVE)
{
typeOper = ACCENT_BREVE;
this.code = 0x306;
accent = new CBreve();
accent.setTurn(TURN_MIRROR_0);
}
else if(code == 0x311 || type == ACCENT_INVERT_BREVE)
{
typeOper = ACCENT_INVERT_BREVE;
this.code = 0x311;
accent = new CBreve();
accent.setTurn(TURN_0);
}
else if(code === 0x20D6 || type === ACCENT_ARROW_LEFT)
{
typeOper = ACCENT_ARROW_LEFT;
this.code = 0x20D6;
glyph = new CCombiningArrow();
var prp =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(prp);
accent = new COperator(glyph);
}
else if(code === 0x20D7 || type === ACCENT_ARROW_RIGHT)
{
typeOper = ACCENT_ARROW_RIGHT;
this.code = 0x20D7;
glyph = new CCombiningArrow();
var prp =
{
location: LOCATION_TOP,
turn: TURN_180
};
glyph.init(prp);
accent = new COperator(glyph);
}
else if(code === 0x20E1 || type === ACCENT_ARROW_LR)
{
typeOper = ACCENT_ARROW_LR;
this.code = 0x20E1;
glyph = new CCombining_LR_Arrow();
var prp =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(prp);
accent = new COperator(glyph);
}
else if(code === 0x20D0 || type === ACCENT_HALF_ARROW_LEFT)
{
typeOper = ACCENT_HALF_ARROW_LEFT;
this.code = 0x20D0;
glyph = new CCombiningHalfArrow();
var prp =
{
location: LOCATION_TOP,
turn: TURN_0
};
glyph.init(prp);
accent = new COperator(glyph);
}
else if(code === 0x20D1 || type === ACCENT_HALF_ARROW_RIGHT)
{
typeOper = ACCENT_HALF_ARROW_RIGHT;
this.code = 0x20D1;
glyph = new CCombiningHalfArrow();
var prp =
{
location: LOCATION_TOP,
turn: TURN_180
};
glyph.init(prp);
accent = new COperator(glyph);
}*/
///// group characters /////
/*else if(code === 0x2190 || type === ARROW_LEFT)
{
typeOper = ARROW_LEFT;
codeChr = 0x2190;
operator = new CSingleArrow();
var props =
{
location: this.loc,
turn: TURN_0
};
operator.init(props);
}
else if(code === 0x2192 || type === ARROW_RIGHT)
{
typeOper = ARROW_RIGHT;
codeChr = 0x2192;
glyph = new CSingleArrow();
var prp =
{
location: this.loc,
turn: TURN_180
};
glyph.init(prp);
}
else if(code === 0x2194 || type === ARROW_LR)
{
typeOper = ARROW_LR;
codeChr = 0x2194;
glyph = new CLeftRightArrow();
var prp =
{
location: this.loc,
turn: TURN_0
};
glyph.init(prp);
}
else if(code === 0x21D0 || type === DOUBLE_LEFT_ARROW)
{
typeOper = DOUBLE_LEFT_ARROW;
codeChr = 0x21D0;
glyph = new CDoubleArrow();
var prp =
{
location: this.loc,
turn: TURN_0
};
glyph.init(prp);
}
else if(code === 0x21D2 || type === DOUBLE_RIGHT_ARROW)
{
typeOper = DOUBLE_RIGHT_ARROW;
codeChr = 0x21D2;
glyph = new CDoubleArrow();
var prp =
{
location: this.loc,
turn: TURN_180
};
glyph.init(prp);
}
else if(code === 0x21D4 || type === DOUBLE_ARROW_LR)
{
typeOper = DOUBLE_ARROW_LR;
codeChr = 0x21D4;
glyph = new CLR_DoubleArrow();
var prp =
{
location: this.loc,
turn: TURN_0
};
glyph.init(prp);
}*/
/////
else if(bCode || bType)
{
typeOper = ACCENT_SIGN;
operator = new CSign();
var props =
{
type: type,
code: code
};
operator.init(props);
codeChr = operator.getCodeCharacter();
}
else
{
/*typeOper = ACCENT_COMB_CARON;
codeChr = 0x30C;
operator = new CCircumflex();
var props =
{
turn: TURN_MIRROR_0
};
operator.init(props);*/
typeOper = ACCENT_CIRCUMFLEX;
codeChr = 0x302;
operator = new CCircumflex();
var props =
{
turn: TURN_MIRROR_0
};
operator.init(props);
}
this.operator = operator;
this.operator.relate(this);
////
// TO DO
// убрать
//
this.typeOper = typeOper;
this.code = codeChr;
////
this.setDimension(1, 1);
this.setContent();
//this.setOperator(accent);
this.elements[0][0].SetDot(true);
}
CAccent.prototype.setPosition = function(pos, PosInfo) CAccent.prototype.setPosition = function(pos, PosInfo)
{ {
this.pos.x = pos.x; this.pos.x = pos.x;
...@@ -318165,7 +317723,6 @@ CAccent.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -318165,7 +317723,6 @@ CAccent.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
this.operator.fixSize(ParaMath, oMeasure, base.size.width); this.operator.fixSize(ParaMath, oMeasure, base.size.width);
if(this.operator.typeOper == OPERATOR_TEXT) if(this.operator.typeOper == OPERATOR_TEXT)
{ {
var letterX = new CMathText(true); var letterX = new CMathText(true);
...@@ -318182,6 +317739,7 @@ CAccent.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -318182,6 +317739,7 @@ CAccent.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
height = base.size.height + this.operator.size.height + this.gap, height = base.size.height + this.operator.size.height + this.gap,
ascent = this.operator.size.height + this.gap + this.elements[0][0].size.ascent; ascent = this.operator.size.height + this.gap + this.elements[0][0].size.ascent;
width += this.GapLeft + this.GapRight;
this.size = {height: height, width: width, ascent: ascent}; this.size = {height: height, width: width, ascent: ascent};
} }
...@@ -340403,8 +339961,6 @@ Range.prototype.getValueWithFormat=function(){ ...@@ -340403,8 +339961,6 @@ Range.prototype.getValueWithFormat=function(){
}; };
Range.prototype.getValue2=function(dDigitsCount, fIsFitMeasurer){ Range.prototype.getValue2=function(dDigitsCount, fIsFitMeasurer){
//[{"text":"qwe","format":{"b":true, "i":false, "u":Asc.EUnderline.underlineNone, "s":false, "fn":"Arial", "fs": 12, "c": 0xff00ff, "va": "subscript" }},{}...] //[{"text":"qwe","format":{"b":true, "i":false, "u":Asc.EUnderline.underlineNone, "s":false, "fn":"Arial", "fs": 12, "c": 0xff00ff, "va": "subscript" }},{}...]
var nRow0 = this.bbox.r1;
var nCol0 = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(this.bbox.r1, this.bbox.c1); var cell = this.worksheet._getCellNoEmpty(this.bbox.r1, this.bbox.c1);
if(null != cell) if(null != cell)
return cell.getValue2(dDigitsCount, fIsFitMeasurer); return cell.getValue2(dDigitsCount, fIsFitMeasurer);
...@@ -340475,6 +340031,19 @@ Range.prototype.getNumFormatStr=function(){ ...@@ -340475,6 +340031,19 @@ Range.prototype.getNumFormatStr=function(){
Range.prototype.getNumFormatType=function(){ Range.prototype.getNumFormatType=function(){
return this.getNumFormat().getType(); return this.getNumFormat().getType();
}; };
// Узнаем отличается ли шрифт (размер и гарнитура) в ячейке от шрифта в строке
Range.prototype.isNotDefaultFont = function () {
// Получаем фонт ячейки
var cellFont = this.getFont();
var rowFont = g_oDefaultFont;
var row = this.worksheet._getRowNoEmpty(this.bbox.r1);
if (null != row && null != row.xfs && null != row.xfs.font)
rowFont = row.xfs.font;
else if (null != this.oAllCol)
rowFont = this.oAllCol;
return (cellFont.fn !== rowFont.fn || cellFont.fs !== rowFont.fs);
};
Range.prototype.getFont = function(){ Range.prototype.getFont = function(){
var nRow = this.bbox.r1; var nRow = this.bbox.r1;
var nCol = this.bbox.c1; var nCol = this.bbox.c1;
...@@ -340498,180 +340067,28 @@ Range.prototype.getFont = function(){ ...@@ -340498,180 +340067,28 @@ Range.prototype.getFont = function(){
return g_oDefaultFont; return g_oDefaultFont;
}; };
Range.prototype.getFontname=function(){ Range.prototype.getFontname=function(){
var nRow = this.bbox.r1; return this.getFont().fn;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.fn;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.fn;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.fn;
}
return g_oDefaultFont.fn;
}; };
Range.prototype.getFontsize=function(){ Range.prototype.getFontsize=function(){
var nRow = this.bbox.r1; return this.getFont().fs;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.fs;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.fs;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.fs;
}
return g_oDefaultFont.fs;
}; };
Range.prototype.getFontcolor=function(){ Range.prototype.getFontcolor=function(){
var nRow = this.bbox.r1; return this.getFont().c;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.c;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.c;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.c;
}
return g_oDefaultFont.c;
}; };
Range.prototype.getBold=function(){ Range.prototype.getBold=function(){
var nRow = this.bbox.r1; return this.getFont().b;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.b;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.b;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.b;
}
return g_oDefaultFont.b;
}; };
Range.prototype.getItalic=function(){ Range.prototype.getItalic=function(){
var nRow = this.bbox.r1; return this.getFont().i;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.i;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.i;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.i;
}
return g_oDefaultFont.i;
}; };
Range.prototype.getUnderline=function(){ Range.prototype.getUnderline=function(){
var nRow = this.bbox.r1; return this.getFont().u;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.u;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.u;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.u;
}
return g_oDefaultFont.u;
}; };
Range.prototype.getStrikeout=function(){ Range.prototype.getStrikeout=function(){
var nRow = this.bbox.r1; return this.getFont().s;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.s;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.s;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.s;
}
return g_oDefaultFont.s;
}; };
Range.prototype.getFontAlign=function(){ Range.prototype.getFontAlign=function(){
var nRow = this.bbox.r1; return this.getFont().va;
var nCol = this.bbox.c1;
var cell = this.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell)
{
var xfs = cell.getCompiledStyle();
if(null != xfs && null != xfs.font)
return xfs.font.va;
}
else
{
//стили столбов и колонок
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row && null != row.xfs && null != row.xfs.font)
return row.xfs.font.va;
var col = this.worksheet._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs && null != col.xfs.font)
return col.xfs.font.va;
}
return g_oDefaultFont.va;
}; };
Range.prototype.getQuotePrefix=function(){ Range.prototype.getQuotePrefix=function(){
var nRow = this.bbox.r1; var nRow = this.bbox.r1;
...@@ -353004,6 +352421,9 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File) ...@@ -353004,6 +352421,9 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File)
if (this.GenerateNativeStyles !== undefined) if (this.GenerateNativeStyles !== undefined)
{ {
this.GenerateNativeStyles(); this.GenerateNativeStyles();
if (this.WordControl.m_oDrawingDocument.CheckTableStylesOne !== undefined)
this.WordControl.m_oDrawingDocument.CheckTableStylesOne();
} }
}; };
...@@ -353637,6 +353057,8 @@ function CTableOutlineDr() ...@@ -353637,6 +353057,8 @@ function CTableOutlineDr()
this.TableStylesSheckLook = null; this.TableStylesSheckLook = null;
this.TableStylesSheckLookFlag = false; this.TableStylesSheckLookFlag = false;
this.TableStylesSendOne = false;
this.Native = window["native"]; this.Native = window["native"];
this.checkMouseDown = function(pos, drDoc) this.checkMouseDown = function(pos, drDoc)
...@@ -354082,6 +353504,8 @@ function CDrawingDocument() ...@@ -354082,6 +353504,8 @@ function CDrawingDocument()
this.TableOutlineDr = new CTableOutlineDr(); this.TableOutlineDr = new CTableOutlineDr();
} }
var _table_styles = null;
CDrawingDocument.prototype = CDrawingDocument.prototype =
{ {
AfterLoad : function() AfterLoad : function()
...@@ -355004,8 +354428,24 @@ CDrawingDocument.prototype = ...@@ -355004,8 +354428,24 @@ CDrawingDocument.prototype =
} }
}, },
CheckTableStylesOne : function()
{
var _tableLook = new CTablePropLook(undefined);
_tableLook.FirstRow = true;
_tableLook.BandHor = true;
_tableLook.FirstCol = true;
this.CheckTableStyles(_tableLook);
this.TableStylesSendOne = true;
},
CheckTableStyles : function(tableLook) CheckTableStyles : function(tableLook)
{ {
if (true === this.TableStylesSendOne)
return;
if (this.TableStylesSheckLookFlag) if (this.TableStylesSheckLookFlag)
{ {
this.TableStylesSheckLook = tableLook; this.TableStylesSheckLook = tableLook;
...@@ -359430,6 +358870,7 @@ asc_docs_api.prototype.Internal_Update_Ind_Right = function(Right) ...@@ -359430,6 +358870,7 @@ asc_docs_api.prototype.Internal_Update_Ind_Right = function(Right)
asc_docs_api.prototype["NativeAfterLoad"] = function() asc_docs_api.prototype["NativeAfterLoad"] = function()
{ {
this.WordControl.m_oDrawingDocument.AfterLoad(); this.WordControl.m_oDrawingDocument.AfterLoad();
this.WordControl.m_oLogicDocument.Set_UseTextShd(false);
}; };
asc_docs_api.prototype["GetNativePageMeta"] = function(pageIndex) asc_docs_api.prototype["GetNativePageMeta"] = function(pageIndex)
{ {
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