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 = ...@@ -368,7 +368,7 @@ DrawingObjectsController.prototype =
handleSlideComments: function(e, x, y, pageIndex) 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}; return {result: null, selectedIndex: -1};
} }
...@@ -4923,8 +4923,8 @@ DrawingObjectsController.prototype = ...@@ -4923,8 +4923,8 @@ DrawingObjectsController.prototype =
} }
if (oTargetTextObject) { if (oTargetTextObject) {
var oBodyPr = oTargetTextObject.getBodyPr && oTargetTextObject.getBodyPr(); var warpGeometry = oTargetTextObject.recalcInfo && oTargetTextObject.recalcInfo.warpGeometry;
if((oBodyPr && oBodyPr.prstTxWarp && oBodyPr.prstTxWarp.preset !== "textNoShape") || oTargetTextObject.checkContentWordArt && oTargetTextObject.checkContentWordArt(oTargetTextObject.getDocContent())) if(warpGeometry && warpGeometry.preset !== "textNoShape")
{ {
if (oTargetTextObject.recalcInfo.bRecalculatedTitle) if (oTargetTextObject.recalcInfo.bRecalculatedTitle)
{ {
...@@ -4968,7 +4968,6 @@ DrawingObjectsController.prototype = ...@@ -4968,7 +4968,6 @@ DrawingObjectsController.prototype =
else else
{ {
nPageNum2 = 0; nPageNum2 = 0;
oTargetTextObject.addToRecalculate();
} }
} }
...@@ -4991,7 +4990,7 @@ DrawingObjectsController.prototype = ...@@ -4991,7 +4990,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
this.startRecalculate(); this.drawingObjects.showDrawingObjects(true);
} }
} }
if(isRealNumber(nPageNum2) && nPageNum2 !== nPageNum1) if(isRealNumber(nPageNum2) && nPageNum2 !== nPageNum1)
...@@ -5012,7 +5011,7 @@ DrawingObjectsController.prototype = ...@@ -5012,7 +5011,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
this.startRecalculate(); this.drawingObjects.showDrawingObjects(true);
} }
} }
......
...@@ -3454,7 +3454,7 @@ CShape.prototype = ...@@ -3454,7 +3454,7 @@ CShape.prototype =
graphics.SetIntegerGrid(false); graphics.SetIntegerGrid(false);
var transform_text; 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; transform_text = this.transformText2;
} }
else if (this.txBody.content) { else if (this.txBody.content) {
...@@ -3483,9 +3483,13 @@ CShape.prototype = ...@@ -3483,9 +3483,13 @@ CShape.prototype =
shape_drawer.fromShape2(this, graphics, this.spPr.geometry); shape_drawer.fromShape2(this, graphics, this.spPr.geometry);
shape_drawer.draw(this.spPr.geometry); shape_drawer.draw(this.spPr.geometry);
} }
if (this.isEmptyPlaceholder() && graphics.IsNoDrawingEmptyPlaceholder !== true) { if (this.isEmptyPlaceholder() && graphics.IsNoDrawingEmptyPlaceholder !== true)
if (graphics.m_oContext !== undefined && graphics.IsTrack === undefined && !this.addTextFlag) { {
if (global_MatrixTransformer.IsIdentity2(_transform)) { 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); graphics.transform3(_transform, false);
var tr = graphics.m_oFullTransform; var tr = graphics.m_oFullTransform;
graphics.SetIntegerGrid(true); graphics.SetIntegerGrid(true);
...@@ -3530,7 +3534,8 @@ CShape.prototype = ...@@ -3530,7 +3534,8 @@ CShape.prototype =
graphics._s(); graphics._s();
} }
} }
else { else
{
graphics.SetIntegerGrid(false); graphics.SetIntegerGrid(false);
graphics.p_width(70); graphics.p_width(70);
graphics.transform3(_transform, false); graphics.transform3(_transform, false);
...@@ -3555,7 +3560,7 @@ CShape.prototype = ...@@ -3555,7 +3560,7 @@ CShape.prototype =
graphics.SaveGrState(); graphics.SaveGrState();
graphics.SetIntegerGrid(false); graphics.SetIntegerGrid(false);
var transform_text; 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; transform_text = this.transformText2;
} }
else if (this.txBody.content) { else if (this.txBody.content) {
...@@ -3634,7 +3639,6 @@ CShape.prototype = ...@@ -3634,7 +3639,6 @@ CShape.prototype =
graphics.UncheckUseFonts2(); graphics.UncheckUseFonts2();
this.textBoxContent.Set_StartPage(old_start_page); this.textBoxContent.Set_StartPage(old_start_page);
graphics.RestoreGrState(); graphics.RestoreGrState();
} }
} }
...@@ -3642,7 +3646,7 @@ CShape.prototype = ...@@ -3642,7 +3646,7 @@ CShape.prototype =
{ {
var oTheme = this.getParentObjects().theme; var oTheme = this.getParentObjects().theme;
var oColorMap = this.Get_ColorMap(); 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) if(editor && editor.ShowParaMarks)
{ {
...@@ -3663,11 +3667,9 @@ CShape.prototype = ...@@ -3663,11 +3667,9 @@ CShape.prototype =
if(!this.bodyPr.upright) if(!this.bodyPr.upright)
{ {
graphics.SaveGrState(); graphics.SaveGrState();
graphics.SetIntegerGrid(false); graphics.SetIntegerGrid(false);
graphics.transform3(this.transform); graphics.transform3(this.transform);
graphics.AddClipRect(clip_rect.x, clip_rect.y, clip_rect.w, clip_rect.h); graphics.AddClipRect(clip_rect.x, clip_rect.y, clip_rect.w, clip_rect.h);
} }
else else
{ {
...@@ -5065,9 +5067,6 @@ CShape.prototype = ...@@ -5065,9 +5067,6 @@ CShape.prototype =
} }
} }
this.recalcInfo.warpGeometry = warpGeometry;
if(isRealObject(editor)) if(isRealObject(editor))
{ {
editor.ShowParaMarks = OldShowParaMarks; editor.ShowParaMarks = OldShowParaMarks;
......
...@@ -254,7 +254,7 @@ ObjectToDraw.prototype = ...@@ -254,7 +254,7 @@ ObjectToDraw.prototype =
shape_drawer.fromShape2(this, graphics, this.geometry); shape_drawer.fromShape2(this, graphics, this.geometry);
if(graphics.IsSlideBoundsCheckerType) if(graphics.IsSlideBoundsCheckerType)
{ {
shape_drawer.bIsNoStrokeAttack = false; shape_drawer.bIsNoFillAttack = false;
} }
shape_drawer.draw(this.geometry); shape_drawer.draw(this.geometry);
graphics.RestoreGrState(); graphics.RestoreGrState();
......
...@@ -421,8 +421,8 @@ CShape.prototype.recalculateContent = function() ...@@ -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); var oTextWarpContent = this.checkTextWarp(content, body_pr, oRecalcObj.w + oRecalcObj.correctW, oRecalcObj.h + oRecalcObj.correctH, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks; this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct; this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform; this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform; this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform;
......
...@@ -502,8 +502,8 @@ CShape.prototype.recalculateContent = function() ...@@ -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); var oTextWarpContent = this.checkTextWarp(content, body_pr, oRecalcObject.w + oRecalcObject.correctW, oRecalcObject.h + oRecalcObject.correctH, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks; this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct; this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform; this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform; this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform;
......
...@@ -4,7 +4,7 @@ var SNAP_DISTANCE = 1.27; ...@@ -4,7 +4,7 @@ var SNAP_DISTANCE = 1.27;
function checkEmptyPlaceholderContent(content) 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 content;
return null; return null;
} }
...@@ -217,6 +217,8 @@ NullState.prototype = ...@@ -217,6 +217,8 @@ NullState.prototype =
} }
ret = handleSelectedObjects(this.drawingObjects, e, x, y, selection.groupSelection, pageIndex, true); ret = handleSelectedObjects(this.drawingObjects, e, x, y, selection.groupSelection, pageIndex, true);
if(ret) if(ret)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); 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((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
...@@ -224,17 +226,20 @@ NullState.prototype = ...@@ -224,17 +226,20 @@ NullState.prototype =
this.drawingObjects.drawingDocument.OnRecalculatePage( pageIndex, this.drawingObjects.document.Pages[pageIndex] ); this.drawingObjects.drawingDocument.OnRecalculatePage( pageIndex, this.drawingObjects.document.Pages[pageIndex] );
this.drawingObjects.drawingDocument.OnEndRecalculate( false, true ); this.drawingObjects.drawingDocument.OnEndRecalculate( false, true );
} }
}
return ret; return ret;
} }
ret = handleFloatObjects(this.drawingObjects, selection.groupSelection.arrGraphicObjects, e, x, y, selection.groupSelection, pageIndex, true); ret = handleFloatObjects(this.drawingObjects, selection.groupSelection.arrGraphicObjects, e, x, y, selection.groupSelection, pageIndex, true);
if(ret) if(ret)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{ {
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.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
} }
...@@ -258,6 +263,8 @@ NullState.prototype = ...@@ -258,6 +263,8 @@ NullState.prototype =
{ {
ret = handleSelectedObjects(this.drawingObjects, e, x, y, null, pageIndex, true); ret = handleSelectedObjects(this.drawingObjects, e, x, y, null, pageIndex, true);
if(ret) if(ret)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); 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 ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
...@@ -265,6 +272,7 @@ NullState.prototype = ...@@ -265,6 +272,7 @@ NullState.prototype =
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]); this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
} }
...@@ -282,6 +290,8 @@ NullState.prototype = ...@@ -282,6 +290,8 @@ NullState.prototype =
{ {
ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true); ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true);
if(ret) if(ret)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); 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 ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
...@@ -289,6 +299,7 @@ NullState.prototype = ...@@ -289,6 +299,7 @@ NullState.prototype =
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]); this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
...@@ -300,6 +311,8 @@ NullState.prototype = ...@@ -300,6 +311,8 @@ NullState.prototype =
} }
ret = handleInlineObjects(this.drawingObjects, no_shape_child_array, e, x, y, pageIndex, true); ret = handleInlineObjects(this.drawingObjects, no_shape_child_array, e, x, y, pageIndex, true);
if(ret) if(ret)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); 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 ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
...@@ -307,6 +320,7 @@ NullState.prototype = ...@@ -307,6 +320,7 @@ NullState.prototype =
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]); this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
...@@ -314,6 +328,8 @@ NullState.prototype = ...@@ -314,6 +328,8 @@ NullState.prototype =
{ {
ret = handleFloatObjects(this.drawingObjects, drawing_page.wrappingObjects, e, x, y, null, pageIndex, true); ret = handleFloatObjects(this.drawingObjects, drawing_page.wrappingObjects, e, x, y, null, pageIndex, true);
if(ret) if(ret)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); 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 ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
...@@ -321,18 +337,21 @@ NullState.prototype = ...@@ -321,18 +337,21 @@ NullState.prototype =
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]); this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
ret = handleFloatObjects(this.drawingObjects, drawing_page.behindDocObjects, e, x, y, null, pageIndex, true); ret = handleFloatObjects(this.drawingObjects, drawing_page.behindDocObjects, e, x, y, null, pageIndex, true);
if(ret) if(ret)
{ {
end_target_doc_content = checkEmptyPlaceholderContent(this.drawingObjects.getTargetDocContent()); if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
if ((start_target_doc_content || end_target_doc_content) && (start_target_doc_content !== end_target_doc_content))
{ {
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.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
this.drawingObjects.drawingDocument.OnEndRecalculate(false, true); this.drawingObjects.drawingDocument.OnEndRecalculate(false, true);
} }
}
return ret; return ret;
} }
} }
......
...@@ -228,8 +228,8 @@ CShape.prototype.recalculateTxBoxContent = function() ...@@ -228,8 +228,8 @@ CShape.prototype.recalculateTxBoxContent = function()
this.recalcInfo.recalcTitle = null; this.recalcInfo.recalcTitle = null;
var oTextWarpContent = this.checkTextWarp(this.textBoxContent, oBodyPr, oRecalcObj.w, oRecalcObj.h, true, false); var oTextWarpContent = this.checkTextWarp(this.textBoxContent, oBodyPr, oRecalcObj.w, oRecalcObj.h, true, false);
this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarks; this.txWarpStructParamarks = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStruct = oTextWarpContent.oTxWarpStruct; this.txWarpStruct = oTextWarpContent.oTxWarpStructNoTransform;
this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform; this.txWarpStructParamarksNoTransform = oTextWarpContent.oTxWarpStructParamarksNoTransform;
this.txWarpStructNoTransform = oTextWarpContent.oTxWarpStructNoTransform; 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