Commit 523f5d5d authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

поправлен баг 25555 - Смещение автофигуры при изменении размеров элемента...

поправлен баг 25555 - Смещение автофигуры при изменении размеров элемента автофигуры. Удалён неиспользуемый код.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57397 954022d7-b5bf-4e40-9824-e11837661b57
parent 79a045d1
......@@ -2786,6 +2786,7 @@ function DrawingObjects() {
_this.rebuildChartGraphicObjects = function(data)
{
var wsViews = Asc["editor"].wb.wsViews;
for(var i = 0; i < wsViews.length; ++i)
{
if(wsViews[i])
......@@ -4144,166 +4145,7 @@ function CoordsManager(ws) {
//{ Common
function writeToBinaryDocContent(docContent, w)
{
w.WriteBool(docContent.TurnOffInnerWrap);
w.WriteBool(docContent.Split);
var Count = docContent.Content.length;
w.WriteLong(Count);
for ( var Index = 0; Index < Count; Index++ )
writeToBinaryParagraph(docContent.Content[Index], w);
}
function readFromBinaryDocContent(docContent, r)
{
docContent.TurnOffInnerWrap = r.GetBool();
docContent.Split = r.GetBool();
var Count = r.GetLong();
docContent.Content = [];
for ( var Index = 0; Index < Count; Index++ )
{
var p = new Paragraph(docContent.DrawingDocument, docContent, 0, 0, 0, 0, 0);
readFromBinaryParagraph(p, r);
docContent.Content.push(p);
}
}
function writeToBinaryParagraph(p, w)
{
p.Pr.Write_ToBinary( w );
//p.TextPr.writeToBinary(w);
var StartPos = w.GetCurPosition();
w.Skip( 4 );
var Len = p.Content.length;
var Count = 0;
for ( var Index = 0; Index < Len; Index++ )
{
var Item = p.Content[Index];
if ( true === Item.Is_RealContent())
{
writeToBinaryParagraphContent(Item, w);
w.WriteLong(Index);
Count++;
}
}
var EndPos = w.GetCurPosition();
w.Seek( StartPos );
w.WriteLong( Count );
w.Seek( EndPos );
}
function readFromBinaryParagraph(p, r)
{
p.Pr = new CParaPr();
p.Pr.Read_FromBinary( r );
p.TextPr = new ParaTextPr();
//p.TextPr.readFromBinary(r);
p.Content = [];
var Count = r.GetLong();
for ( var Index = 0; Index < Count; Index++ )
{
var Element = readFromBinaryParagraphContent(r);
if ( null != Element )
p.Content.push( Element );
}
}
function writeToBinaryParagraphContent(Element, w)
{
var ElementType = Element.Type;
// w.WriteLong(ElementType);
switch ( ElementType )
{
case para_TextPr :
// case para_HyperlinkStart :
{
w.WriteLong(ElementType);
Element.Value.Write_ToBinary(w);
break;
}
case para_HyperlinkStart:
{
w.WriteLong( Element.Type );
w.WriteString2( Element.Id );
w.WriteString2( Element.Value );
w.WriteString2( Element.ToolTip );
break;
}
case para_Text :
case para_Space :
case para_End :
case para_NewLine :
case para_NewLineRendered :
case para_InlineBreak :
case para_PageBreakRendered :
case para_Empty :
case para_Numbering :
case para_Tab :
case para_PageNum :
case para_FlowObjectAnchor :
case para_HyperlinkEnd :
case para_CommentStart :
case para_CommentEnd :
case para_PresentationNumbering :
Element.Write_ToBinary(w);
break;
}
return Element;
}
function readFromBinaryParagraphContent(r)
{
var ElementType = r.GetLong();
var Element = null;
switch ( ElementType )
{
case para_TextPr :
// case para_Drawing :
// case para_HyperlinkStart :
{
Element = new ParaTextPr();
Element.Value = new CTextPr();
Element.Value.Read_FromBinary(r);
return Element;
}
case para_HyperlinkStart:
{
Element = new ParaHyperlinkStart();
Element.Id = r.GetString2();
Element.Value = r.GetString2();
Element.ToolTip = r.GetString2();
return Element;
}
case para_Text : Element = new ParaText(); break;
case para_Space : Element = new ParaSpace(); break;
case para_End : Element = new ParaEnd(); break;
case para_NewLine : Element = new ParaNewLine(); break;
case para_NewLineRendered : Element = new ParaNewLineRendered(); break;
case para_InlineBreak : Element = new ParaInlineBreak(); break;
case para_PageBreakRendered : Element = new ParaPageBreakRenderer(); break;
case para_Empty : Element = new ParaEmpty(); break;
case para_Numbering : Element = new ParaNumbering(); break;
case para_Tab : Element = new ParaTab(); break;
case para_PageNum : Element = new ParaPageNum(); break;
case para_FlowObjectAnchor : Element = new ParaFlowObjectAnchor(); break;
case para_HyperlinkEnd : Element = new ParaHyperlinkEnd(); break;
case para_CommentStart : Element = new ParaCommentStart(); break;
case para_CommentEnd : Element = new ParaCommentEnd(); break;
case para_PresentationNumbering : Element = new ParaPresentationNumbering(); break;
}
if ( null != Element )
Element.Read_FromBinary(r);
return Element;
}
var CARD_DIRECTION_N = 0;
......@@ -4324,27 +4166,3 @@ CURSOR_TYPES_BY_CARD_DIRECTION[CARD_DIRECTION_S] = "s-resize";
CURSOR_TYPES_BY_CARD_DIRECTION[CARD_DIRECTION_SW] = "sw-resize";
CURSOR_TYPES_BY_CARD_DIRECTION[CARD_DIRECTION_W] = "w-resize";
CURSOR_TYPES_BY_CARD_DIRECTION[CARD_DIRECTION_NW] = "nw-resize";
function CreateParagraphContent(s)
{
if(s != " ")
return new ParaText(s);
return new ParaSpace(1);
}
function getTextString(docContent)
{
var ret = "";
for(var i = 0; i < docContent.Content.length; ++i)
{
for(var j = 0; j < docContent.Content[i].Content.length; ++j)
{
if(docContent.Content[i].Content[j].Type === para_Text)
ret += docContent.Content[i].Content[j].Value;
if(docContent.Content[i].Content[j].Type === para_Space)
ret += " ";
}
}
return ret;
}
//}
\ No newline at end of file
......@@ -992,12 +992,6 @@ CTextBody.prototype =
{},
writeToBinary: function(w)
{
this.bodyPr.Write_ToBinary2(w);
writeToBinaryDocContent(this.content, w);
},
getMargins: function ()
{
......@@ -1043,47 +1037,6 @@ CTextBody.prototype =
return {L : xc - hc , T: yc - vc , R : xc + hc , B : yc + vc, textMatrix : this.shape.transform};
},
readFromBinary: function(r, drawingDocument)
{
var bodyPr = new CBodyPr();
bodyPr.Read_FromBinary2(r);
if(isRealObject(this.parent) && this.parent.setBodyPr)
{
this.parent.setBodyPr(bodyPr);
}
//this.bodyPr.Read_FromBinary2(r);
var is_on = History.Is_On();
if(is_on)
{
History.TurnOff();
}
var dc= new CDocumentContent(this, editor.WordControl.m_oDrawingDocument, 0, 0, 0, 0, false, false);
readFromBinaryDocContent(dc, r);
if(is_on)
{
History.TurnOn();
}
for(var i = 0; i < dc.Content.length; ++i)
{
if(i > 0)
{
this.content.Add_NewParagraph()
}
var par = dc.Content[i];
for(var i = 0; i < par.Content.length; ++i)
{
if(!(par.Content[i] instanceof ParaEnd || par.Content[i] instanceof ParaEmpty || par.Content[i] instanceof ParaNumbering) && par.Content[i].Copy)
this.content.Paragraph_Add(par.Content[i].Copy());
}
}
},
getSelectedTextHtml: function()
{
},
Refresh_RecalcData2: function(pageIndex)
{
......
......@@ -176,7 +176,7 @@ XYAdjustmentTrack.prototype.getBounds = function()
var bounds_checker = new CSlideBoundsChecker();
bounds_checker.init(Page_Width, Page_Height, Page_Width, Page_Height);
this.draw(bounds_checker);
var tr = this.originalShape.localTransform;
var tr = this.originalShape.transform;
var arr_p_x = [];
var arr_p_y = [];
arr_p_x.push(tr.TransformPointX(0,0));
......
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