| 1744 | |
| 1745 | |
| 1746 | void NBrowserWindow::deleteTableColumnButtonPressed() { |
| 1747 | if (!editor->deleteTableColumnAction->isEnabled()) |
| 1748 | return; |
| 1749 | |
| 1750 | QString js = "function deleteTableColumn() {" |
| 1751 | " var selObj = window.getSelection();" |
| 1752 | " var selRange = selObj.getRangeAt(0);" |
| 1753 | " var workingNode = window.getSelection().anchorNode.parentNode;" |
| 1754 | " var current = 0;" |
| 1755 | " while (workingNode.nodeName.toLowerCase() != 'table' && workingNode != null) {" |
| 1756 | " if (workingNode.nodeName.toLowerCase() == 'td') {" |
| 1757 | " var td = workingNode;" |
| 1758 | " while (td.previousSibling != null) { " |
| 1759 | " current = current+1; td = td.previousSibling;" |
| 1760 | " }" |
| 1761 | " }" |
| 1762 | " workingNode = workingNode.parentNode; " |
| 1763 | " }" |
| 1764 | " if (workingNode == null) return;" |
| 1765 | " for (var i=0; i<workingNode.rows.length; i++) { " |
| 1766 | " workingNode.rows[i].deleteCell(current); " |
| 1767 | " }" |
| 1768 | "} deleteTableColumn();"; |
| 1769 | editor->page()->mainFrame()->evaluateJavaScript(js); |
| 1770 | contentChanged(); |
| 1771 | } |
| 1772 | |
| 1773 | |
| 1774 |
nothing calls this directly
no outgoing calls
no test coverage detected