Commit 883dcc67 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51653 954022d7-b5bf-4e40-9824-e11837661b57
parent 4bf0a19a
......@@ -6554,6 +6554,86 @@ function BinaryPPTYLoader()
return txbody;
}
this.ReadTextBodyTxPr = function(shape)
{
var txbody;
if(shape.txPr)
txbody = shape.txPr;
else
{
shape.txPr = new CTextBody(shape);
txbody = shape.txPr;
}
var s = this.stream;
var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4;
while (s.cur < _end_rec)
{
var _at = s.GetUChar();
switch (_at)
{
case 0:
{
shape.setBodyPr(this.ReadBodyPr());
break;
}
case 1:
{
txbody.setLstStyle(this.ReadTextListStyle());
break;
}
case 2:
{
s.Skip2(4);
var _c = s.GetULong();
/*if(History != null)
{
History.TurnOff();
}*/
if(!txbody.content)
txbody.content = new CDocumentContent(shape, this.presentation ? this.presentation.DrawingDocument : null, 0, 0, 0, 0, 0, 0);
if(_c>0)
{
txbody.content.Internal_Content_RemoveAll();
}
var _last_field_type = false;
for (var i = 0; i < _c; i++)
{
s.Skip2(1); // type
var _paragraph = this.ReadParagraph(txbody.content);
_paragraph.Set_Parent(txbody.content);
txbody.content.Internal_Content_Add(txbody.content.Content.length, _paragraph);
if(_paragraph.f_type != undefined || _paragraph.f_text != undefined || _paragraph.f_id != undefined)
{
_last_field_type = true;
}
}
if(_last_field_type)
{
txbody.textFieldFlag = true;
}
/*if(History != null)
{
History.TurnOn();
}*/
break;
}
default:
{
break;
}
}
}
s.Seek2(_end_rec);
return txbody;
}
this.ReadTextBody2 = function(content)
{
var s = this.stream;
......
......@@ -168,6 +168,40 @@ function CPPTXContentLoader()
return txBody;
}
this.ReadTextBodyTxPr = function(reader, stream, shape)
{
this.BaseReader = reader;
if (this.Reader == null)
this.Reader = new BinaryPPTYLoader();
this.LogicDocument = null;
this.Reader.ImageMapChecker = this.ImageMapChecker;
if (null == this.stream)
{
this.stream = new FileStream();
this.stream.obj = stream.obj;
this.stream.data = stream.data;
this.stream.size = stream.size;
}
this.stream.pos = stream.pos;
this.stream.cur = stream.cur;
this.Reader.stream = this.stream;
var s = this.stream;
var _main_type = s.GetUChar(); // 0!!!
var txBody = this.Reader.ReadTextBodyTxPr(shape);
stream.pos = s.pos;
stream.cur = s.cur;
return txBody;
}
this.ReadShapeProperty = function(stream)
{
......
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