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 инициализация или нет
......
This diff is collapsed.
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