Commit b8fbe262 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

при чтении из бинарника учитываю paraRun

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55578 954022d7-b5bf-4e40-9824-e11837661b57
parent cda028bf
......@@ -3296,6 +3296,7 @@
var row, colorText, cTextPr, fontFamily = "Arial";
var text = null;
var oNewItem = [];
var paraRunContent;
var aResult = this.aResult;
if(row === undefined)
......@@ -3327,7 +3328,7 @@
//backgroundColor
var backgroundColor = null;
if(paragraph.Parent && paragraph.Parent.Parent && paragraph.Parent.Parent instanceof CTableCell2 && paragraph.Parent.Parent.CompiledPr && paragraph.Parent.Parent.CompiledPr.Pr.Shd && paragraph.Parent.Parent.CompiledPr.Pr.Shd.Color)
if(paragraph.Parent && paragraph.Parent.Parent && paragraph.Parent.Parent instanceof CTableCell && paragraph.Parent.Parent.CompiledPr && paragraph.Parent.Parent.CompiledPr.Pr.Shd && paragraph.Parent.Parent.CompiledPr.Pr.Shd.Color)
{
var color = paragraph.Parent.Parent.CompiledPr.Pr.Shd.Color;
backgroundColor = new RgbColor(this.clipboard._getBinaryColor("rgb(" + color.r + "," + color.g + "," + color.b + ")"));
......@@ -3363,8 +3364,12 @@
if(text == null)
text = "";
if(content[n] instanceof ParaTextPr2)//settings for text
if(content[n] instanceof ParaRun)
{
paraRunContent = content[n].Content;
for(var pR = 0; pR < paraRunContent.length; pR++)
{
if(paraRunContent[pR] instanceof ParaTextPr)//settings for text
{
if(text !== null && oNewItem[oNewItem.length - 1])//oNewItem - массив, аналогичный value2
oNewItem[oNewItem.length - 1].text = text;
......@@ -3373,7 +3378,7 @@
this.fontsNew["Arial"] = 1;
colorText = new RgbColor(this.clipboard._getBinaryColor("rgb(0, 0, 0)"));
var calcValue = content[n].CalcValue;
var calcValue = paraRunContent[pR].CalcValue;
oNewItem.push({
format: {
fn: calcValue.FontFamily && calcValue.FontFamily.Name ? calcValue.FontFamily.Name : paragraphFontFamily,
......@@ -3391,7 +3396,7 @@
text = "";
cTextPr = content[n].CalcValue;
cTextPr = paraRunContent[pR].CalcValue;
if(cTextPr.Color)
colorText = new RgbColor(this.clipboard._getBinaryColor("rgb(" + cTextPr.Color.r + "," + cTextPr.Color.g + "," + cTextPr.Color.b + ")"));
......@@ -3421,15 +3426,15 @@
}
});
}
else if(content[n] instanceof ParaText2)//text
else if(paraRunContent[pR] instanceof ParaText)//text
{
text += content[n].Value;
text += paraRunContent[pR].Value;
}
else if(content[n] instanceof ParaSpace2)
else if(paraRunContent[pR] instanceof ParaSpace)
{
text += " ";
}
else if(content[n] instanceof ParaTab2)//tab
else if(paraRunContent[pR] instanceof ParaTab)//tab
{
if(!oNewItem.length)
{
......@@ -3465,7 +3470,7 @@
oNewItem = [];
s++;
}
else if(content[n] instanceof ParaEnd2)//end
else if(paraRunContent[pR] instanceof ParaEnd)//end
{
if(!oNewItem.length)
{
......@@ -3497,7 +3502,7 @@
aResult[row][s + c1][0] = oNewItem;
}
}
else if(n == content.length - 1)//end of row
else if(n == paraRunContent[pR].length - 1)//end of row
{
text = "";
oNewItem = [];
......@@ -3505,6 +3510,8 @@
};
}
};
}
};
var c_oAscBoundsElementType = {
Content : 0,
......
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