Commit 3184b2d7 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 30018 - [TextArt] Нет возможности показать комментарий, который был...

Bug 30018 - [TextArt] Нет возможности показать комментарий, который был добавлен к тексту, находящему внутри textart

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64229 954022d7-b5bf-4e40-9824-e11837661b57
parent f07fb9fe
......@@ -710,7 +710,6 @@ TextArtPreviewManager.prototype.getShapeByPrst = function(prst)
oContent.Set_ApplyToAll(true);
oContent.Set_ParagraphAlign(align_Center);
oContent.Paragraph_Add(new ParaTextPr({FontSize: 36, Spacing: TextSpacing}));
//oContent.Set_ParagraphAlign(new ParaTextPr({FontSize: 16}));
oContent.Set_ApplyToAll(false);
var oBodypr = oShape.getBodyPr().createDuplicate();
......
......@@ -258,7 +258,8 @@ function checkFiniteNumber(num)
}
var G_O_VISITED_HLINK_COLOR = CreateUniFillSolidFillWidthTintOrShade(CreateUnifillSolidFillSchemeColorByIndex(10), 0);
var G_O_NO_ACTIVE_COMMENT_BRUSH = CreateUniFillByUniColor(CreateUniColorRGB(248, 231, 195));
var G_O_ACTIVE_COMMENT_BRUSH = CreateUniFillByUniColor(CreateUniColorRGB(240, 200, 120));
/*function addPointToMap(map, worksheet, row, col, pt)
{
if(!Array.isArray(map[worksheet.getId()+""]))
......
......@@ -3659,6 +3659,10 @@ CShape.prototype =
}
else
{
var oContent = this.getDocContent();
var result_page_index = isRealNumber(graphics.shapePageIndex) ? graphics.shapePageIndex : (oContent ? oContent.Get_StartPage_Relative() : 0);
graphics.PageNum = result_page_index;
var bNeedRestoreState = false;
var bEditTextArt = isRealObject(oController) && (getTargetTextObject(oController) === this);
if(this.bWordShape && this.clipRect && (!this.bodyPr.prstTxWarp || this.bodyPr.prstTxWarp.preset === "textNoShape" || bEditTextArt))
......@@ -3704,6 +3708,7 @@ CShape.prototype =
this.txWarpStruct.draw(graphics, oTransform, oTheme, oColorMap);
}
}
delete graphics.PageNum;
if(bNeedRestoreState)
{
graphics.RestoreGrState();
......
This diff is collapsed.
"use strict";
function OverlayObject(geometry, extX, extY, brush, pen, transform )
//({check_bounds: function(){},brush: this.originalShape.brush, pen: this.originalShape.pen, ext:{cx:this.originalShape.absExtX, cy:this.originalShape.absExtY}, geometry: this.geometry, TransformMatrix: this.originalShape.transform})
{
......@@ -147,17 +149,19 @@ function OverlayObject(geometry, extX, extY, brush, pen, transform )
}
}
function ObjectToDraw(brush, pen, extX, extY, geometry, transform, x, y)
function ObjectToDraw(brush, pen, extX, extY, geometry, transform, x, y, oComment)
{
this.brush = brush;
this.pen = pen;
this.extX = extX;
this.extY = extY;
this.transform = transform;
this.TransformMatrix = transform;
this.geometry = geometry;
this.parentShape = null;
/* */
this.Comment = oComment;
this.pen = pen;
this.brush = brush;
/*������� �������*/
this.x = x;
this.y = y;
}
......@@ -236,6 +240,26 @@ ObjectToDraw.prototype =
oTransform = this.TransformMatrix;
}
}
if(this.Comment)
{
if(editor && editor.WordControl && editor.WordControl.m_oLogicDocument && editor.WordControl.m_oLogicDocument.Comments &&
(graphics instanceof CGraphics) && ( editor.WordControl.m_oLogicDocument.Comments.Is_Use() && true != editor.isViewMode))
{
if(this.Comment.Additional.CommentId === editor.WordControl.m_oLogicDocument.Comments.Get_CurrentId())
{
this.brush = G_O_ACTIVE_COMMENT_BRUSH;
}
else
{
this.brush = G_O_NO_ACTIVE_COMMENT_BRUSH;
}
var _x0 = oTransform.TransformPointX( this.Comment.x0, this.Comment.y0 );
var _y0 = oTransform.TransformPointY( this.Comment.x0, this.Comment.y0 );
var _x1 = oTransform.TransformPointX( this.Comment.x1, this.Comment.y1 );
var _y1 = oTransform.TransformPointY( this.Comment.x1, this.Comment.y1 );
editor.WordControl.m_oLogicDocument.Comments.Add_DrawingRect(_x0, _y0, _x1 - _x0, _y1 - _y0, graphics.PageNum, this.Comment.Additional.CommentId);
}
}
if(oTheme && oColorMap)
{
if(this.brush)
......
......@@ -1784,26 +1784,32 @@ Paragraph.prototype =
Element = ( pGraphics.RENDERER_PDF_FLAG === true ? null : aComm.Get_Next() );
while ( null != Element )
{
if ( Element.Additional.Active === true )
pGraphics.b_color1( 240, 200, 120, 255 );
else
pGraphics.b_color1( 248, 231, 195, 255 );
if(!pGraphics.DrawTextArtComment)
{
if ( Element.Additional.Active === true )
pGraphics.b_color1( 240, 200, 120, 255 );
else
pGraphics.b_color1( 248, 231, 195, 255 );
pGraphics.rect( Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0 );
pGraphics.df();
pGraphics.rect( Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0 );
pGraphics.df();
var TextTransform = this.Get_ParentTextTransform();
if (TextTransform)
{
var _x0 = TextTransform.TransformPointX( Element.x0, Element.y0 );
var _y0 = TextTransform.TransformPointY( Element.x0, Element.y0 );
var _x1 = TextTransform.TransformPointX( 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);
var TextTransform = this.Get_ParentTextTransform();
if (TextTransform)
{
var _x0 = TextTransform.TransformPointX( Element.x0, Element.y0 );
var _y0 = TextTransform.TransformPointY( Element.x0, Element.y0 );
var _x1 = TextTransform.TransformPointX( 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);
}
else
DocumentComments.Add_DrawingRect(Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0, Page_abs, Element.Additional.CommentId);
}
else
DocumentComments.Add_DrawingRect(Element.x0, Element.y0, Element.x1 - Element.x0, Element.y1 - Element.y0, Page_abs, Element.Additional.CommentId);
{
pGraphics.DrawTextArtComment(Element);
}
Element = aComm.Get_Next();
}
......
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