Commit 0151a09a authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Баги с трансформом для комментов в автофигурах

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57336 954022d7-b5bf-4e40-9824-e11837661b57
parent 6f89d8ee
...@@ -9817,10 +9817,10 @@ CDocument.prototype = ...@@ -9817,10 +9817,10 @@ CDocument.prototype =
var OldX = CurPara.CurPos.X; var OldX = CurPara.CurPos.X;
var OldY = CurPara.CurPos.Y; var OldY = CurPara.CurPos.Y;
if ( true === CurPara.Parent.Is_DrawingShape() )
{
var DrawMatrix = CurPara.Parent.Parent.parent.GraphicObj.transformText;
var DrawMatrix = CurPara.Get_ParentTextTransform();
if (DrawMatrix)
{
var _OldX = DrawMatrix.TransformPointX(OldX, OldY); var _OldX = DrawMatrix.TransformPointX(OldX, OldY);
var _OldY = DrawMatrix.TransformPointY(OldX, OldY); var _OldY = DrawMatrix.TransformPointY(OldX, OldY);
...@@ -9937,9 +9937,10 @@ CDocument.prototype = ...@@ -9937,9 +9937,10 @@ CDocument.prototype =
var Comment_X = this.Get_PageLimits(PageIndex).XLimit; var Comment_X = this.Get_PageLimits(PageIndex).XLimit;
var Para = g_oTableId.Get_ById( Comment.StartId ); var Para = g_oTableId.Get_ById( Comment.StartId );
if ( null !== Para && Para.Parent && Para.Parent.Parent && Para.Parent.Parent.transformText )
var TextTransform = Para.Get_ParentTextTransform();
if (TextTransform)
{ {
var TextTransform = Para.Parent.Parent.transformText;
Comment_Y = TextTransform.TransformPointY( Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y ); Comment_Y = TextTransform.TransformPointY( Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y );
} }
...@@ -12762,11 +12763,14 @@ CDocument.prototype = ...@@ -12762,11 +12763,14 @@ CDocument.prototype =
var Comment_X = this.Get_PageLimits(Comment_PageNum).XLimit; var Comment_X = this.Get_PageLimits(Comment_PageNum).XLimit;
var Para = g_oTableId.Get_ById( Comment.StartId ); var Para = g_oTableId.Get_ById( Comment.StartId );
if ( null !== Para && Para.Parent && Para.Parent.Parent && Para.Parent.Parent.transformText ) if ( null !== Para)
{
var TextTransform = Para.Get_ParentTextTransform();
if(TextTransform)
{ {
var TextTransform = Para.Parent.Parent.transformText;
Comment_Y = TextTransform.TransformPointY( Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y ); Comment_Y = TextTransform.TransformPointY( Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y );
} }
}
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( Comment_X, Comment_Y, Comment_PageNum ); var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( Comment_X, Comment_Y, Comment_PageNum );
editor.sync_UpdateCommentPosition( Comment.Get_Id(), Coords.X, Coords.Y ); editor.sync_UpdateCommentPosition( Comment.Get_Id(), Coords.X, Coords.Y );
......
...@@ -458,6 +458,7 @@ CGraphicPage.prototype = ...@@ -458,6 +458,7 @@ CGraphicPage.prototype =
drawWrappingObjectsByContent: function(graphics, content) drawWrappingObjectsByContent: function(graphics, content)
{ {
var bIntegerGrid = graphics.m_bIntegerGrid;
var drawing; var drawing;
for(var _object_index = 0; _object_index < this.wrappingObjects.length; ++_object_index) for(var _object_index = 0; _object_index < this.wrappingObjects.length; ++_object_index)
{ {
...@@ -467,7 +468,7 @@ CGraphicPage.prototype = ...@@ -467,7 +468,7 @@ CGraphicPage.prototype =
drawing.draw(graphics); drawing.draw(graphics);
} }
} }
graphics.SetIntegerGrid(true); graphics.SetIntegerGrid(bIntegerGrid);
}, },
......
...@@ -3031,15 +3031,13 @@ Paragraph.prototype = ...@@ -3031,15 +3031,13 @@ Paragraph.prototype =
pGraphics.rect( Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0 ); pGraphics.rect( Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0 );
pGraphics.df(); pGraphics.df();
if ( this.Parent && this.Parent.Parent && this.Parent.Parent.transformText ) var TextTransform = this.Get_ParentTextTransform();
if (TextTransform)
{ {
var TextTransform = this.Parent.Parent.transformText;
var _x0 = TextTransform.TransformPointX( Element.x0, Element.y0 ); var _x0 = TextTransform.TransformPointX( Element.x0, Element.y0 );
var _y0 = TextTransform.TransformPointY( Element.x0, Element.y0 ); var _y0 = TextTransform.TransformPointY( Element.x0, Element.y0 );
var _x1 = TextTransform.TransformPointX( Element.x1, Element.y1 ); var _x1 = TextTransform.TransformPointX( Element.x1, Element.y1 );
var _y1 = TextTransform.TransformPointY( Element.x1, Element.y1 ); var _y1 = TextTransform.TransformPointY( Element.x1, Element.y1 );
DocumentComments.Add_DrawingRect(_x0, _y0, _x1 - _x0, _y1 - _y0, Page_abs, Element.Additional.CommentId); DocumentComments.Add_DrawingRect(_x0, _y0, _x1 - _x0, _y1 - _y0, Page_abs, Element.Additional.CommentId);
} }
else else
...@@ -9218,13 +9216,23 @@ Paragraph.prototype = ...@@ -9218,13 +9216,23 @@ Paragraph.prototype =
return this.ApplyToAll; return this.ApplyToAll;
}, },
Update_CursorType : function(X, Y, PageIndex) Get_ParentTextTransform : function()
{ {
var text_transform = null; var CurDocContent = this.Parent;
if(this.Parent && this.Parent.Parent && this.Parent.Parent.transformText) while(CurDocContent.Is_TableCellContent())
{
CurDocContent = CurDocContent.Parent.Row.Table.Parent;
}
if(CurDocContent.Parent && CurDocContent.Parent.transformText)
{ {
text_transform = this.Parent.Parent.transformText; return CurDocContent.Parent.transformText;
} }
return null;
},
Update_CursorType : function(X, Y, PageIndex)
{
var text_transform = this.Get_ParentTextTransform();
var MMData = new CMouseMoveData(); var MMData = new CMouseMoveData();
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( X, Y, this.Get_StartPage_Absolute() + ( PageIndex - this.PageNum ), text_transform ); var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( X, Y, this.Get_StartPage_Absolute() + ( PageIndex - this.PageNum ), text_transform );
MMData.X_abs = Coords.X; MMData.X_abs = Coords.X;
......
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