Commit c0e3bb39 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Перенес insertHyperlink и removeHyperlink в WorkbookView.

Заделал функцию для removeHyperlink из ячеек.
ToDo удаление гиперссылки из range. Баг http://bugzserver/show_bug.cgi?id=22162

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53879 954022d7-b5bf-4e40-9824-e11837661b57
parent 99909438
......@@ -2876,22 +2876,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
},
asc_insertHyperlink: function (options) {
var ws = this.wb.getWorksheet();
if ( ws.objectRender.selectedGraphicObjectsExists() ) {
if ( ws.objectRender.controller.canAddHyperlink() )
ws.objectRender.controller.insertHyperlink(options);
}
else {
// На всякий случай проверка (вдруг кто собирается вызвать...)
this.wb.closeCellEditor();
this.wb.getWorksheet().setSelectionInfo("hyperlink", options);
this.wb.restoreFocus();
}
this.wb.insertHyperlink(options);
},
asc_removeHyperlink: function () {
if ( ws.objectRender.selectedGraphicObjectsExists() )
ws.objectRender.controller.removeHyperlink();
this.wb.removeHyperlink();
},
asc_insertFormula: function (functionName, autoComplet) {
......
......@@ -1570,6 +1570,27 @@
this._lockDraw = true;
};
WorkbookView.prototype.insertHyperlink = function (options) {
var ws = this.getWorksheet();
if ( ws.objectRender.selectedGraphicObjectsExists() ) {
if ( ws.objectRender.controller.canAddHyperlink() )
ws.objectRender.controller.insertHyperlink(options);
} else {
// На всякий случай проверка (вдруг кто собирается вызвать...)
this.closeCellEditor();
ws.setSelectionInfo("hyperlink", options);
this.restoreFocus();
}
};
WorkbookView.prototype.removeHyperlink = function () {
var ws = this.getWorksheet();
if (ws.objectRender.selectedGraphicObjectsExists())
ws.objectRender.controller.removeHyperlink();
else {
ws.setSelectionInfo("rh");
}
};
/*
* @param {c_oAscRenderingModeType} mode Режим отрисовки
* @param {Boolean} isInit инициализация или нет
......
......@@ -7343,6 +7343,7 @@
case "value": range.setValue(val); break;
case "format": range.setNumFormat(val); canChangeColWidth = c_oAscCanChangeColWidth.numbers; break;
case "angle": range.setAngle(val); break;
case "rh": /*ToDo удаление гиперссылки из range*/ break;
case "border":
if (isLargeRange) { callTrigger = true; t.handlers.trigger("slowOperation", true); }
......@@ -7374,9 +7375,7 @@
case c_oAscMergeOptions.MergeCenter: range.merge(val); break;
case c_oAscMergeOptions.MergeAcross:
for (res = arn.r1; res <= arn.r2; ++res)
{
t.model.getRange3(res, arn.c1, res, arn.c2).merge(val);
}
break;
case c_oAscMergeOptions.Merge: range.merge(val); break;
}
......
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