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

(2.0.1.326): ASCOfficeDocxFile2

для wordart: чтение/запись TextOutlone, TextFill

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62796 954022d7-b5bf-4e40-9824-e11837661b57
parent 158e4d7b
......@@ -205,7 +205,9 @@ var c_oSerProp_rPrType = {
LangEA: 27,
ColorTheme: 28,
Shd: 29,
Vanish: 30
Vanish: 30,
TextOutline: 31,
TextFill : 32
};
var c_oSerProp_rowPrType = {
CantSplit:0,
......@@ -1847,6 +1849,18 @@ function Binary_rPrWriter(memory)
this.memory.WriteByte(c_oSerPropLenType.Byte);
this.memory.WriteBool(rPr.Vanish);
}
if(null != rPr.TextOutline)
{
this.memory.WriteByte(c_oSerProp_rPrType.TextOutline);
this.memory.WriteByte(c_oSerPropLenType.Variable);
this.bs.WriteItemWithLength(function () { window.global_pptx_content_writer.WriteSpPr(_this.memory, rPr.TextOutline, 0); });
}
if(null != rPr.TextFill)
{
this.memory.WriteByte(c_oSerProp_rPrType.TextFill);
this.memory.WriteByte(c_oSerPropLenType.Variable);
this.bs.WriteItemWithLength(function () { window.global_pptx_content_writer.WriteSpPr(_this.memory, rPr.TextFill, 1); });
}
};
};
function Binary_oMathWriter(memory, oMathPara)
......@@ -6441,6 +6455,24 @@ function Binary_rPrReader(doc, stream)
case c_oSerProp_rPrType.Vanish:
rPr.Vanish = this.stream.GetBool();
break;
case c_oSerProp_rPrType.TextOutline:
if(length > 0){
var TextOutline = window.global_pptx_content_loader.ReadShapeProperty(this.stream, 0);
if(null != TextOutline)
rPr.TextOutline = TextOutline;
}
else
res = c_oSerConstants.ReadUnknown;
break;
case c_oSerProp_rPrType.TextFill:
if(length > 0){
var TextFill = window.global_pptx_content_loader.ReadShapeProperty(this.stream, 1);
if(null != TextFill)
rPr.TextFill = TextFill;
}
else
res = c_oSerConstants.ReadUnknown;
break;
default:
res = c_oSerConstants.ReadUnknown;
break;
......
......@@ -217,7 +217,7 @@ function CPPTXContentLoader()
return txBody;
}
this.ReadShapeProperty = function(stream)
this.ReadShapeProperty = function(stream, type)
{
if (this.Reader == null)
this.Reader = new BinaryPPTYLoader();
......@@ -243,9 +243,17 @@ function CPPTXContentLoader()
var s = this.stream;
var _main_type = s.GetUChar(); // 0!!!
var oNewSpPr = new CSpPr();
this.Reader.ReadSpPr(oNewSpPr);
var oNewSpPr;
if(0 == type){
oNewSpPr = this.Reader.ReadLn()
}
else if(1 == type){
oNewSpPr = this.Reader.ReadUniFill();
}
else{
oNewSpPr = new CSpPr();
this.Reader.ReadSpPr(oNewSpPr);
}
stream.pos = s.pos;
stream.cur = s.cur;
......@@ -813,7 +821,7 @@ function CPPTXContentWriter()
this.arrayStackStarts.splice(this.arrayStackStarts.length - 1, 1);
}
}
this.WriteSpPr = function(memory, spPr)
this.WriteSpPr = function(memory, spPr, type)
{
if (this.BinaryFileWriter.UseContinueWriter)
{
......@@ -830,7 +838,12 @@ function CPPTXContentWriter()
var _writer = this.BinaryFileWriter;
_writer.StartRecord(0);
_writer.WriteSpPr(spPr);
if(0 == type)
_writer.WriteLn(spPr);
else if(1 == type)
_writer.WriteUniFill(spPr);
else
_writer.WriteSpPr(spPr);
_writer.EndRecord();
if (this.BinaryFileWriter.UseContinueWriter)
......
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