Commit 7e11a436 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Вставка гиперссылок в шейпы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51163 954022d7-b5bf-4e40-9824-e11837661b57
parent 32465710
......@@ -4912,6 +4912,7 @@ function DrawingObjects() {
objectInfo.id = graphicObjectInfo.objectId;
objectInfo.object = _this.getDrawingBase(graphicObjectInfo.objectId);
objectInfo.cursor = graphicObjectInfo.cursorType;
objectInfo.hyperlink = graphicObjectInfo.hyperlink;
objectInfo.isGraphicObject = true;
return objectInfo;
......
......@@ -1914,7 +1914,8 @@ Hyperlink.prototype = {
},
setVisited : function (bVisited) {
this.bVisited = bVisited;
this.Ref.cleanCache();
if (this.Ref)
this.Ref.cleanCache();
},
getVisited : function () {
return this.bVisited;
......
......@@ -522,7 +522,8 @@
if (isHyperlinkClick) {
if (false === ct.hyperlink.hyperlinkModel.getVisited()) {
ct.hyperlink.hyperlinkModel.setVisited(true);
ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkModel.Ref.getBBox0(), isLockDraw: false, canChangeColWidth: false});
if (ct.hyperlink.hyperlinkModel.Ref)
ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkModel.Ref.getBBox0(), isLockDraw: false, canChangeColWidth: false});
}
switch (ct.hyperlink.asc_getType()) {
case c_oAscHyperlinkType.WebLink:
......
......@@ -4957,6 +4957,7 @@
var drawingInfo = this.objectRender.checkCursorDrawingObject(x, y);
if (drawingInfo && drawingInfo.id) {
// Возможно картинка с lock
lockInfo = this.collaborativeEditing.getLockInfo(c_oAscLockTypeElem.Object, null, sheetId, drawingInfo.id);
isLocked = this.collaborativeEditing.getLockIntersection(lockInfo, c_oAscLockTypes.kLockTypeOther,false);
......@@ -4966,6 +4967,27 @@
lockRangePosLeft = drawingInfo.object.getVisibleLeftOffset(true);
lockRangePosTop = drawingInfo.object.getVisibleTopOffset(true);
}
if ( drawingInfo.hyperlink && (drawingInfo.hyperlink instanceof ParaHyperlinkStart) ) {
var oHyperlink = new Hyperlink();
oHyperlink.Hyperlink = drawingInfo.hyperlink.Value;
oHyperlink.Tooltip = drawingInfo.hyperlink.ToolTip;
var cellCursor = {cursor: kCurCells, target: "cells", col: (c ? c.col : -1),
row: (r ? r.row : -1), userId: userId,
lockRangePosLeft: undefined, lockRangePosTop: undefined,
userIdAllProps: undefined, lockAllPosLeft: undefined,
lockAllPosTop: undefined, userIdAllSheet: undefined,
commentIndexes: undefined, commentCoords: undefined};
return {cursor: kCurHyperlink, target: "hyperlink",
hyperlink: new asc_CHyperlink(oHyperlink), cellCursor: cellCursor,
userId: userId, lockRangePosLeft: undefined,
lockRangePosTop: undefined, userIdAllProps: undefined,
userIdAllSheet: undefined, lockAllPosLeft: undefined,
lockAllPosTop: undefined, commentIndexes: undefined, commentCoords: undefined};
}
return {cursor: drawingInfo.cursor, target: "shape", drawingId: drawingInfo.id, col: -1, row: -1,
userId: userId, lockRangePosLeft: lockRangePosLeft, lockRangePosTop: lockRangePosTop};
......@@ -5721,7 +5743,10 @@
var oHyperlink = new asc_CHyperlink(hyperlink);
oHyperlink.asc_setText (cell_info.text);
cell_info.hyperlink = oHyperlink;
} else
}
//else if ( graphicObjects.length > 0 ) {
//}
else
cell_info.hyperlink = null;
cell_info.flags.merge = null !== range.hasMerged();
......
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