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

если при записи нет цвета или заливки, пробуем восстановить его из unifill

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56643 954022d7-b5bf-4e40-9824-e11837661b57
parent b110aa62
...@@ -124,8 +124,17 @@ BinaryCommonWriter.prototype.WriteBorder = function(border) ...@@ -124,8 +124,17 @@ BinaryCommonWriter.prototype.WriteBorder = function(border)
var _this = this; var _this = this;
if(border_None != border.Value) if(border_None != border.Value)
{ {
if(null != border.Color && !border.Color.Auto) var color = null;
this.WriteColor(c_oSerBorderType.Color, border.Color); if (null != border.Color)
color = border.Color;
else if (null != border.Unifill) {
var doc = editor.WordControl.m_oLogicDocument;
border.Unifill.check(doc.Get_Theme(), doc.Get_ColorMap());
var RGBA = border.Unifill.getRGBAColor();
color = new CDocumentColor(RGBA.R, RGBA.G, RGBA.B);
}
if (null != color && !color.Auto)
this.WriteColor(c_oSerBorderType.Color, color);
if(null != border.Space) if(null != border.Space)
{ {
this.memory.WriteByte(c_oSerBorderType.Space); this.memory.WriteByte(c_oSerBorderType.Space);
...@@ -196,10 +205,17 @@ BinaryCommonWriter.prototype.WriteShd = function(Shd) ...@@ -196,10 +205,17 @@ BinaryCommonWriter.prototype.WriteShd = function(Shd)
this.memory.WriteByte(Shd.Value); this.memory.WriteByte(Shd.Value);
} }
//Value //Value
if(null != Shd.Color && !Shd.Color.Auto) var color = null;
{ if (null != Shd.Color)
this.WriteColor(c_oSerShdType.Color, Shd.Color); color = Shd.Color;
else if (null != Shd.Unifill) {
var doc = editor.WordControl.m_oLogicDocument;
Shd.Unifill.check(doc.Get_Theme(), doc.Get_ColorMap());
var RGBA = Shd.Unifill.getRGBAColor();
color = new CDocumentColor(RGBA.R, RGBA.G, RGBA.B);
} }
if (null != color && !color.Auto)
this.WriteColor(c_oSerShdType.Color, color);
if(null != Shd.Unifill || (null != Shd.Color && Shd.Color.Auto)) if(null != Shd.Unifill || (null != Shd.Color && Shd.Color.Auto))
{ {
this.memory.WriteByte(c_oSerShdType.ColorTheme); this.memory.WriteByte(c_oSerShdType.ColorTheme);
......
...@@ -1667,10 +1667,17 @@ function Binary_rPrWriter(memory) ...@@ -1667,10 +1667,17 @@ function Binary_rPrWriter(memory)
this.memory.WriteLong(rPr.FontSize * 2); this.memory.WriteLong(rPr.FontSize * 2);
} }
//Color //Color
if(null != rPr.Color && !rPr.Color.Auto) var color = null;
{ if (null != rPr.Color )
this.bs.WriteColor(c_oSerProp_rPrType.Color, rPr.Color); color = rPr.Color;
} else if (null != rPr.Unifill) {
var doc = editor.WordControl.m_oLogicDocument;
rPr.Unifill.check(doc.Get_Theme(), doc.Get_ColorMap());
var RGBA = rPr.Unifill.getRGBAColor();
color = new CDocumentColor(RGBA.R, RGBA.G, RGBA.B);
}
if (null != color && !color.Auto)
this.bs.WriteColor(c_oSerProp_rPrType.Color, color);
//VertAlign //VertAlign
if(null != rPr.VertAlign) if(null != rPr.VertAlign)
{ {
......
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