Commit d7957837 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@63776 954022d7-b5bf-4e40-9824-e11837661b57
parent af383363
......@@ -368,7 +368,7 @@ DrawingObjectsController.prototype =
handleSlideComments: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
if(this.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
return {result: null, selectedIndex: -1};
}
......@@ -4923,8 +4923,8 @@ DrawingObjectsController.prototype =
}
if (oTargetTextObject) {
var oBodyPr = oTargetTextObject.getBodyPr && oTargetTextObject.getBodyPr();
if((oBodyPr && oBodyPr.prstTxWarp && oBodyPr.prstTxWarp.preset !== "textNoShape") || oTargetTextObject.checkContentWordArt && oTargetTextObject.checkContentWordArt(oTargetTextObject.getDocContent()))
var warpGeometry = oTargetTextObject.recalcInfo && oTargetTextObject.recalcInfo.warpGeometry;
if(warpGeometry && warpGeometry.preset !== "textNoShape")
{
if (oTargetTextObject.recalcInfo.bRecalculatedTitle)
{
......@@ -4968,7 +4968,6 @@ DrawingObjectsController.prototype =
else
{
nPageNum2 = 0;
oTargetTextObject.addToRecalculate();
}
}
......@@ -4991,7 +4990,7 @@ DrawingObjectsController.prototype =
}
else
{
this.startRecalculate();
this.drawingObjects.showDrawingObjects(true);
}
}
if(isRealNumber(nPageNum2) && nPageNum2 !== nPageNum1)
......@@ -5012,7 +5011,7 @@ DrawingObjectsController.prototype =
}
else
{
this.startRecalculate();
this.drawingObjects.showDrawingObjects(true);
}
}
......
......@@ -3454,7 +3454,7 @@ CShape.prototype =
graphics.SetIntegerGrid(false);
var transform_text;
if ((!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.addTextFlag && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false) && this.transformText2) {
if ((!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.txBody.checkCurrentPlaceholder() && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false) && this.transformText2) {
transform_text = this.transformText2;
}
else if (this.txBody.content) {
......@@ -3483,9 +3483,13 @@ CShape.prototype =
shape_drawer.fromShape2(this, graphics, this.spPr.geometry);
shape_drawer.draw(this.spPr.geometry);
}
if (this.isEmptyPlaceholder() && graphics.IsNoDrawingEmptyPlaceholder !== true) {
if (graphics.m_oContext !== undefined && graphics.IsTrack === undefined && !this.addTextFlag) {
if (global_MatrixTransformer.IsIdentity2(_transform)) {
if (this.isEmptyPlaceholder() && graphics.IsNoDrawingEmptyPlaceholder !== true)
{
var drawingObjects = this.getDrawingObjectsController();
if (graphics.m_oContext !== undefined && graphics.IsTrack === undefined && (!drawingObjects || getTargetTextObject(drawingObjects) !== this ))
{
if (global_MatrixTransformer.IsIdentity2(_transform))
{
graphics.transform3(_transform, false);
var tr = graphics.m_oFullTransform;
graphics.SetIntegerGrid(true);
......@@ -3530,7 +3534,8 @@ CShape.prototype =
graphics._s();
}
}
else {
else
{
graphics.SetIntegerGrid(false);
graphics.p_width(70);
graphics.transform3(_transform, false);
......@@ -3555,7 +3560,7 @@ CShape.prototype =
graphics.SaveGrState();
graphics.SetIntegerGrid(false);
var transform_text;
if ((!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.addTextFlag && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false) && this.transformText2) {
if ((!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.txBody.checkCurrentPlaceholder() && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false) && this.transformText2) {
transform_text = this.transformText2;
}
else if (this.txBody.content) {
......@@ -3634,7 +3639,6 @@ CShape.prototype =
graphics.UncheckUseFonts2();
this.textBoxContent.Set_StartPage(old_start_page);
graphics.RestoreGrState();
}
}
......@@ -3642,7 +3646,7 @@ CShape.prototype =
{
var oTheme = this.getParentObjects().theme;
var oColorMap = this.Get_ColorMap();
if(!this.bWordShape && (!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.addTextFlag && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false))
if(!this.bWordShape && (!this.txBody.content || this.txBody.content.Is_Empty()) && this.txBody.content2 != null && !this.txBody.checkCurrentPlaceholder() && (this.isEmptyPlaceholder ? this.isEmptyPlaceholder() : false))
{
if(editor && editor.ShowParaMarks)
{
......@@ -3663,11 +3667,9 @@ CShape.prototype =
if(!this.bodyPr.upright)
{
graphics.SaveGrState();
graphics.SetIntegerGrid(false);
graphics.transform3(this.transform);
graphics.AddClipRect(clip_rect.x, clip_rect.y, clip_rect.w, clip_rect.h);
}
else
{
......@@ -5065,9 +5067,6 @@ CShape.prototype =
}
}
this.recalcInfo.warpGeometry = warpGeometry;
if(isRealObject(editor))
{
editor.ShowParaMarks = OldShowParaMarks;
......
......@@ -254,7 +254,7 @@ ObjectToDraw.prototype =
shape_drawer.fromShape2(this, graphics, this.geometry);
if(graphics.IsSlideBoundsCheckerType)
{
shape_drawer.bIsNoStrokeAttack = false;
shape_drawer.bIsNoFillAttack = false;
}
shape_drawer.draw(this.geometry);
graphics.RestoreGrState();
......
......@@ -421,8 +421,8 @@ CShape.prototype.recalculateContent = function()
var oTextWarpContent = this.checkTextWarp(content, body_pr, oRecalcObj.w + oRecalcObj.correctW, oRecalcObj.h + oRecalcObj.correctH, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct;
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform;
......
......@@ -502,8 +502,8 @@ CShape.prototype.recalculateContent = function()
var oTextWarpContent = this.checkTextWarp(content, body_pr, oRecalcObject.w + oRecalcObject.correctW, oRecalcObject.h + oRecalcObject.correctH, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct;
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform;
......
......@@ -4,7 +4,7 @@ var SNAP_DISTANCE = 1.27;
function checkEmptyPlaceholderContent(content)
{
if(!content || content.Parent && content.Parent.txWarpStruct)
if(!content || content.Parent && content.Parent.txWarpStruct && content.Parent.recalcInfo.warpGeometry && content.Parent.recalcInfo.warpGeometry.preset !== "textNoShape" )
return content;
return null;
}
......@@ -218,22 +218,27 @@ NullState.prototype =
ret = handleSelectedObjects(this.drawingObjects, e, x, y, selection.groupSelection, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage( pageIndex, this.drawingObjects.document.Pages[pageIndex] );
this.drawingObjects.drawingDocument.OnEndRecalculate( false, true );
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{
this.drawingObjects.drawingDocument.OnRecalculatePage( pageIndex, this.drawingObjects.document.Pages[pageIndex] );
this.drawingObjects.drawingDocument.OnEndRecalculate( false, true );
}
}
return ret;
}
ret = handleFloatObjects(this.drawingObjects, selection.groupSelection.arrGraphicObjects, e, x, y, selection.groupSelection, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content)) {
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......@@ -259,11 +264,14 @@ NullState.prototype =
ret = handleSelectedObjects(this.drawingObjects, e, x, y, null, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......@@ -283,11 +291,14 @@ NullState.prototype =
ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......@@ -301,11 +312,14 @@ NullState.prototype =
ret = handleInlineObjects(this.drawingObjects, no_shape_child_array, e, x, y, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......@@ -315,11 +329,14 @@ NullState.prototype =
ret = handleFloatObjects(this.drawingObjects, drawing_page.wrappingObjects, e, x, y, null, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......@@ -327,11 +344,13 @@ NullState.prototype =
ret = handleFloatObjects(this.drawingObjects, drawing_page.behindDocObjects, e, x, y, null, pageIndex, true);
if(ret)
{
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent());
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content)) {
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
}
}
return ret;
}
......
......@@ -228,8 +228,8 @@ CShape.prototype.recalculateTxBoxContent = function()
this.recalcInfo.recalcTitle = null;
var oTextWarpContent = this.checkTextWarp(this.textBoxContent, oBodyPr, oRecalcObj.w, oRecalcObj.h, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct;
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform;
......
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