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

горизонтальное вырвавнивание в ячейке при вставке из word

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55793 954022d7-b5bf-4e40-9824-e11837661b57
parent 52adcbf3
...@@ -3352,6 +3352,16 @@ ...@@ -3352,6 +3352,16 @@
var paraPr = paragraph.elem.Get_CompiledPr(); var paraPr = paragraph.elem.Get_CompiledPr();
var paragraphFontFamily = paraPr.TextPr.FontFamily.Name; var paragraphFontFamily = paraPr.TextPr.FontFamily.Name;
//горизонтальное выравнивание
var horisonalAlign = this._getAlignHorisontal(paraPr);
if(horisonalAlign)
oNewItem.a = this._getAlignHorisontal(paraPr);
else if(horisonalAlign == null)
oNewItem.wrap = true;
//так же wrap выставляем у параграфа, чьим родителем является ячейка таблицы
if(this._getParentByTag(paragraph, c_oAscBoundsElementType.Cell) != null)
oNewItem.wrap = true;
//Numbering //Numbering
var LvlPr = null; var LvlPr = null;
...@@ -3406,7 +3416,7 @@ ...@@ -3406,7 +3416,7 @@
s = this._parseParaRun(content[n], oNewItem, paraPr, s, row, c1, text); s = this._parseParaRun(content[n], oNewItem, paraPr, s, row, c1, text);
break; break;
}; };
case para_Hyperlink://*link* case para_Hyperlink://*hyperLink*
{ {
oNewItem.hyperLink = content[n].Value; oNewItem.hyperLink = content[n].Value;
oNewItem.toolTip = content[n].ToolTip; oNewItem.toolTip = content[n].ToolTip;
...@@ -3429,6 +3439,41 @@ ...@@ -3429,6 +3439,41 @@
}, },
_getAlignHorisontal: function(paraPr)
{
var result;
var settings = paraPr.ParaPr;
if(!settings)
return;
switch(settings.Jc)
{
case 0:
{
result = "right";
break;
}
case 1:
{
result = "left";
break;
}
case 2:
{
result = "center";
break;
}
case 3:
{
result = null;
break;
}
};
return result;
},
getBackgroundColorTCell: function(elem) getBackgroundColorTCell: function(elem)
{ {
var compiledPrCell, color; var compiledPrCell, color;
......
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