Commit eb75d32a 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@56131 954022d7-b5bf-4e40-9824-e11837661b57
parent 2157b330
......@@ -111,6 +111,20 @@ function CreateBlipFillUniFillFromUrl(url)
return ret;
}
function getTargetTextObject(controller)
{
if(controller.selection.textSelection)
{
return controller.selection.textSelection;
}
else if(controller.selection.groupSelection && controller.selection.groupSelection.selection.textSelection)
{
return controller.selection.groupSelection.selection.textSelection;
}
return null;
}
function DrawingObjectsController(drawingObjects)
{
this.drawingObjects = drawingObjects;
......@@ -752,16 +766,8 @@ DrawingObjectsController.prototype =
getTargetDocContent: function()
{
var content;
if(this.selection.textSelection)
{
content = this.selection.textSelection.getDocContent();
}
else if(this.selection.groupSelection && this.selection.groupSelection.selection.textSelection)
{
content = this.selection.groupSelection.selection.textSelection.getDocContent();
}
return content;
var text_object = getTargetTextObject(this);
return text_object && text_object.getDocContent();
},
......
......@@ -802,20 +802,8 @@ CGroupShape.prototype =
return false;
},
applyAllTextProps: function(textPr)
{
for(var i = 0; i < this.spTree.length; ++i)
{
if(typeof this.spTree[i].applyAllTextProps === "function")
this.spTree[i].applyAllTextProps(textPr);
}
},
changeSize: function(kw, kh)
{
if(this.spPr.xfrm.isNotNullForGroup())
{
var xfrm = this.spPr.xfrm;
......
......@@ -639,7 +639,7 @@ CShape.prototype =
break;
}
}
this.setLine(ln);
this.spPr.setLn(ln);
}
},
......@@ -734,7 +734,7 @@ CShape.prototype =
ln.Fill.fill.color = (new CUniColor());
ln.Fill.fill.color.color = (new CPrstColor());
ln.Fill.fill.color.color.id = ("black");
this.setLine(ln);
this.spPr.setLn(ln);
this.setTextBody(new CTextBody(this));
},
......@@ -1886,12 +1886,16 @@ CShape.prototype =
{
var parent_objects = this.getParentObjects();
var default_style = new CStyle("defaultStyle", null, null, null);
default_style.ParaPr.Spacing.LineRule = linerule_Auto;
default_style.ParaPr.Spacing.Line = 1;
default_style.ParaPr.Spacing.Before = 0;
default_style.ParaPr.Spacing.After = 0;
if (isRealObject(parent_objects.presentation) && isRealObject(parent_objects.presentation.defaultTextStyle)
&& isRealObject(parent_objects.presentation.defaultTextStyle.levels[level]))
{
var default_ppt_style = parent_objects.presentation.defaultTextStyle.levels[level];
default_style.ParaPr = default_ppt_style.pPr.Copy();
default_style.TextPr = default_ppt_style.rPr.Copy();
default_style.ParaPr.Merge(default_ppt_style.pPr.Copy());
default_style.TextPr.Merge(default_ppt_style.rPr.Copy());
}
var master_style;
......@@ -3588,10 +3592,10 @@ CShape.prototype =
if (isRealObject(_new_line)) {
new_line2.merge(_new_line);
}
this.setLine(new_line2);
this.spPr.setLn(new_line2);
}
else
this.setLine(_new_line);
this.spPr.setLn(_new_line);
},
setGeometry: function (geometry) {
......@@ -3757,15 +3761,7 @@ CShape.prototype =
return new MoveShapeImageTrackInGroup(this);
},
applyAllTextProps: function (textPr) {
if (this.txBody) {
this.txBody.content.Set_ApplyToAll(true);
this.txBody.content.Paragraph_Add(textPr);
this.txBody.content.Set_ApplyToAll(false);
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
}
},
remove: function (Count, bOnlyText, bRemoveOnlySelection) {
if (this.txBody) {
......
......@@ -19,7 +19,7 @@ StartAddNewShape.prototype =
onMouseDown: function(e, x, y)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
this.startX = x;
this.startY = y;
this.drawingObjects.arrPreTrackObjects.length = 0;
......@@ -820,7 +820,7 @@ SplineBezierState.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
this.drawingObjects.startTrackPos = {x: x, y: y, pageIndex: pageIndex};
this.drawingObjects.clearTrackObjects();
this.drawingObjects.addTrackObject(new Spline(this.drawingObjects, this.drawingObjects.getTheme(), null, null, null, pageIndex));
......@@ -856,7 +856,7 @@ SplineBezierState33.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
},
onMouseMove: function(e, x, y, pageIndex)
......@@ -900,7 +900,7 @@ SplineBezierState2.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
if(e.ClickCount >= 2)
{
this.bStart = true;
......@@ -965,7 +965,7 @@ SplineBezierState3.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
if(e.ClickCount >= 2)
{
this.bStart = true;
......@@ -1055,7 +1055,7 @@ SplineBezierState4.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
if(e.ClickCount >= 2)
{
this.bStart = true;
......@@ -1169,7 +1169,7 @@ SplineBezierState5.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
if(e.ClickCount >= 2)
{
this.bStart = true;
......@@ -1271,7 +1271,7 @@ PolyLineAddState.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
this.drawingObjects.startTrackPos = {x: x, y: y, pageIndex:pageIndex};
this.drawingObjects.clearTrackObjects();
this.drawingObjects.addTrackObject(new PolyLine(this.drawingObjects, this.drawingObjects.getTheme(), null, null, null, pageIndex));
......@@ -1305,7 +1305,7 @@ PolyLineAddState2.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
},
onMouseMove: function(e, x, y, pageIndex)
......@@ -1365,7 +1365,7 @@ AddPolyLine2State.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
this.drawingObjects.startTrackPos = {x: x, y: y, pageIndex : pageIndex};
this.drawingObjects.resetSelection();
this.drawingObjects.updateOverlay();
......@@ -1397,7 +1397,7 @@ AddPolyLine2State2.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
if(e.ClickCount > 1)
{
this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));
......@@ -1443,7 +1443,7 @@ AddPolyLine2State3.prototype =
onMouseDown: function(e, x, y, pageIndex)
{
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_CURSOR)
return {objectId: null, bMarker: true};
return {objectId: "1", bMarker: true};
var tr_x, tr_y;
if(pageIndex === this.drawingObjects.startTrackPos.pageIndex)
{
......
......@@ -146,7 +146,7 @@ function PolyLine (drawingObjects, theme, master, layout, slide, pageIndex)
if(drawingObjects)
{
shape.setDrawingObjects(drawingObjects);
shape.setWorksheet(drawingObjects.getWorksheetModel());
shape.addToDrawingObjects();
}
shape.setSpPr(new CSpPr());
......
......@@ -246,7 +246,7 @@ function Spline(drawingObjects, theme, master, layout, slide, pageIndex)
var shape = new CShape();
if(drawingObjects)
{
shape.setDrawingObjects(drawingObjects);
shape.setWorksheet(drawingObjects.getWorksheetModel());
shape.addToDrawingObjects();
}
shape.setSpPr(new CSpPr());
......
......@@ -422,7 +422,7 @@ CShape.prototype.recalculateContent = function()
content.Set_StartPage(0);
content.Reset(0, 0, w, h);
content.Reset(0, 0, w, 20000);
content.Recalculate_Page(content.StartPage, true);
}
};
......
......@@ -5068,7 +5068,6 @@
this.aMerged = [];
this.aHyperlinks = [];
var oNewWorksheet = new Woorksheet(this.wb, wb.aWorksheets.length);
oNewWorksheet.DrawingDocument = new CDrawingDocument();
this.curWorksheet = oNewWorksheet;
res = this.bcr.Read1(length, function(t,l){
return oThis.ReadWorksheet(t,l, oNewWorksheet);
......
......@@ -1743,7 +1743,7 @@ function Woorksheet(wb, _index, sId){
data.Ref.cleanFormat();
});
this.hyperlinkManager.setDependenceManager(this.mergeManager);
this.DrawingDocument = new CDrawingDocument()
this.DrawingDocument = new CDrawingDocument();
this.sheetViews = [];
this.aConditionalFormatting = [];
this.sheetPr = null;
......
......@@ -221,7 +221,13 @@ NullState.prototype =
},
onMouseMove: function(e, x, y, pageIndex)
{},
{
var text_object = getTargetTextObject(this.drawingObjects);
if(text_object && e.IsLocked)
{
text_object.selectionSetEnd(e, x, y, pageIndex);
}
},
onMouseUp: function(e, x, y, pageIndex)
{}
......
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