Commit 284f829c authored by Sergey.Konovalov's avatar Sergey.Konovalov

Bug 22953 - [Copy&Paste] Не осуществляется вставка таблицы из CDE в MS Word под Firefox

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54230 954022d7-b5bf-4e40-9824-e11837661b57
parent f1c6f15a
......@@ -487,7 +487,7 @@ CopyProcessor.prototype =
if(null != Item_pPr.Brd)
{
apPr.push("border:none");
var borderStyle = this._BordersToStyle(Item_pPr.Brd, "mso-", "-alt");
var borderStyle = this._BordersToStyle(Item_pPr.Brd, false, true, "mso-", "-alt");
if(null != borderStyle)
{
var nborderStyleLength = borderStyle.length;
......@@ -1042,7 +1042,7 @@ CopyProcessor.prototype =
res = styleName + ":"+(nMarginTop * g_dKoef_mm_to_pt)+"pt "+(nMarginRight * g_dKoef_mm_to_pt)+"pt "+(nMarginBottom * g_dKoef_mm_to_pt)+"pt "+(nMarginLeft * g_dKoef_mm_to_pt)+"pt;";
return res;
},
_BordersToStyle : function(borders, mso, alt)
_BordersToStyle : function(borders, bUseInner, bUseBetween, mso, alt)
{
var res = "";
if(null == mso)
......@@ -1057,12 +1057,18 @@ CopyProcessor.prototype =
res += this._BorderToStyle(borders.Right, mso + "border-right" + alt);
if(null != borders.Bottom)
res += this._BorderToStyle(borders.Bottom, mso + "border-bottom" + alt);
if(null != borders.InsideV)
res += this._BorderToStyle(borders.InsideV, "mso-border-insidev");
if(null != borders.InsideH)
res += this._BorderToStyle(borders.InsideH, "mso-border-insideh");
if(null != borders.Between)
res += this._BorderToStyle(borders.Between, "mso-border-between");
if(bUseInner)
{
if(null != borders.InsideV)
res += this._BorderToStyle(borders.InsideV, "mso-border-insidev");
if(null != borders.InsideH)
res += this._BorderToStyle(borders.InsideH, "mso-border-insideh");
}
if(bUseBetween)
{
if(null != borders.Between)
res += this._BorderToStyle(borders.Between, "mso-border-between");
}
return res;
},
_MergeProp : function(elem1, elem2)
......@@ -1125,7 +1131,7 @@ CopyProcessor.prototype =
this._MergeProp(oCellBorder, cellPr.TableCellBorders);
if(null != tablePr && null != tablePr.TableBorders)
this._MergeProp(oCellBorder, tablePr.TableBorders);
tcStyle += this._BordersToStyle(oCellBorder);
tcStyle += this._BordersToStyle(oCellBorder, false, false);
if("" != tcStyle)
tc.setAttribute("style", tcStyle);
......@@ -1295,7 +1301,7 @@ CopyProcessor.prototype =
if(null != Pr.TableCellMar)
tblStyle += this._MarginToStyle(Pr.TableCellMar, "mso-padding-alt");
if(null != Pr.TableBorders)
tblStyle += this._BordersToStyle(Pr.TableBorders);
tblStyle += this._BordersToStyle(Pr.TableBorders, true, false);
}
//���� cellSpacing
var bAddSpacing = false;
......
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