Commit 41cc26ac authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

copy/paste перешел на RFonts

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49596 954022d7-b5bf-4e40-9824-e11837661b57
parent cef596e4
...@@ -522,12 +522,19 @@ CopyProcessor.prototype = ...@@ -522,12 +522,19 @@ CopyProcessor.prototype =
{ {
var oPropMap = var oPropMap =
{ {
FontFamily: function( oThis, val ) RFonts: function( oThis, val )
{ {
var sFontName = val.Name; var sFontName = null;
if (sFontName == "" && 0 <= val.Index) if(null != val.Ascii)
sFontName = oThis.fontsArray[val.Index].Name; sFontName = val.Ascii.Name;
oThis.orPr["font-family"] = "'" + sFontName + "'"; else if(null != val.HAnsi)
sFontName = val.HAnsi.Name;
else if(null != val.EastAsia)
sFontName = val.EastAsia.Name;
else if(null != val.CS)
sFontName = val.CS.Name;
if(null != sFontName)
oThis.orPr["font-family"] = "'" + sFontName + "'";
}, },
FontSize: function( oThis, val ) FontSize: function( oThis, val )
...@@ -3440,11 +3447,25 @@ PasteProcessor.prototype = ...@@ -3440,11 +3447,25 @@ PasteProcessor.prototype =
Italic : false, Italic : false,
Underline : false, Underline : false,
Strikeout : false, Strikeout : false,
FontFamily : RFonts :
{ {
Name : "Arial", Ascii: {
Index : -1 Name : "Arial",
}, Index : -1
},
EastAsia: {
Name : "Arial",
Index : -1
},
HAnsi: {
Name : "Arial",
Index : -1
},
CS: {
Name : "Arial",
Index : -1
}
},
FontSize : 11, FontSize : 11,
Color : Color :
{ {
...@@ -3465,7 +3486,13 @@ PasteProcessor.prototype = ...@@ -3465,7 +3486,13 @@ PasteProcessor.prototype =
{ {
var oFontItem = this.oFonts[font_family]; var oFontItem = this.oFonts[font_family];
if(null != oFontItem && null != oFontItem.Name) if(null != oFontItem && null != oFontItem.Name)
{
rPr.FontFamily = {Name: oFontItem.Name, Index: oFontItem.Index}; rPr.FontFamily = {Name: oFontItem.Name, Index: oFontItem.Index};
rPr.RFonts.Ascii = {Name: oFontItem.Name, Index: oFontItem.Index};
rPr.RFonts.HAnsi = {Name: oFontItem.Name, Index: oFontItem.Index};
rPr.RFonts.CS = {Name: oFontItem.Name, Index: oFontItem.Index};
rPr.RFonts.EastAsia = {Name: oFontItem.Name, Index: oFontItem.Index};
}
} }
var font_size = node.style.fontSize; var font_size = node.style.fontSize;
if(!font_size) if(!font_size)
......
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