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 = ...@@ -487,7 +487,7 @@ CopyProcessor.prototype =
if(null != Item_pPr.Brd) if(null != Item_pPr.Brd)
{ {
apPr.push("border:none"); 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) if(null != borderStyle)
{ {
var nborderStyleLength = borderStyle.length; var nborderStyleLength = borderStyle.length;
...@@ -1042,7 +1042,7 @@ CopyProcessor.prototype = ...@@ -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;"; 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; return res;
}, },
_BordersToStyle : function(borders, mso, alt) _BordersToStyle : function(borders, bUseInner, bUseBetween, mso, alt)
{ {
var res = ""; var res = "";
if(null == mso) if(null == mso)
...@@ -1057,12 +1057,18 @@ CopyProcessor.prototype = ...@@ -1057,12 +1057,18 @@ CopyProcessor.prototype =
res += this._BorderToStyle(borders.Right, mso + "border-right" + alt); res += this._BorderToStyle(borders.Right, mso + "border-right" + alt);
if(null != borders.Bottom) if(null != borders.Bottom)
res += this._BorderToStyle(borders.Bottom, mso + "border-bottom" + alt); res += this._BorderToStyle(borders.Bottom, mso + "border-bottom" + alt);
if(null != borders.InsideV) if(bUseInner)
res += this._BorderToStyle(borders.InsideV, "mso-border-insidev"); {
if(null != borders.InsideH) if(null != borders.InsideV)
res += this._BorderToStyle(borders.InsideH, "mso-border-insideh"); res += this._BorderToStyle(borders.InsideV, "mso-border-insidev");
if(null != borders.Between) if(null != borders.InsideH)
res += this._BorderToStyle(borders.Between, "mso-border-between"); res += this._BorderToStyle(borders.InsideH, "mso-border-insideh");
}
if(bUseBetween)
{
if(null != borders.Between)
res += this._BorderToStyle(borders.Between, "mso-border-between");
}
return res; return res;
}, },
_MergeProp : function(elem1, elem2) _MergeProp : function(elem1, elem2)
...@@ -1125,7 +1131,7 @@ CopyProcessor.prototype = ...@@ -1125,7 +1131,7 @@ CopyProcessor.prototype =
this._MergeProp(oCellBorder, cellPr.TableCellBorders); this._MergeProp(oCellBorder, cellPr.TableCellBorders);
if(null != tablePr && null != tablePr.TableBorders) if(null != tablePr && null != tablePr.TableBorders)
this._MergeProp(oCellBorder, tablePr.TableBorders); this._MergeProp(oCellBorder, tablePr.TableBorders);
tcStyle += this._BordersToStyle(oCellBorder); tcStyle += this._BordersToStyle(oCellBorder, false, false);
if("" != tcStyle) if("" != tcStyle)
tc.setAttribute("style", tcStyle); tc.setAttribute("style", tcStyle);
...@@ -1295,7 +1301,7 @@ CopyProcessor.prototype = ...@@ -1295,7 +1301,7 @@ CopyProcessor.prototype =
if(null != Pr.TableCellMar) if(null != Pr.TableCellMar)
tblStyle += this._MarginToStyle(Pr.TableCellMar, "mso-padding-alt"); tblStyle += this._MarginToStyle(Pr.TableCellMar, "mso-padding-alt");
if(null != Pr.TableBorders) if(null != Pr.TableBorders)
tblStyle += this._BordersToStyle(Pr.TableBorders); tblStyle += this._BordersToStyle(Pr.TableBorders, true, false);
} }
//���� cellSpacing //���� cellSpacing
var bAddSpacing = false; 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