Skip to content

Commit

Permalink
Add new function Delete in ApiComment and ApiWorksheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Matveev authored and Alexey Matveev committed Feb 8, 2019
1 parent 307d7d3 commit 749c9c6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Selection
* Add new classes in apiBuilder: ApiName, ApiComment.
* Add new functions in ApiName: GetName, SetName, Delete, GetRefersTo, SetRefersTo and properties: Name, RefersTo.
* Add new functions in ApiRange: GetDefName, GetRows, Clear, GetWorksheet, GetComment, Select and propoerties: DefName, Rows, Worksheet, Comment.
* Add new functions in ApiWorksheet: GetDefNames, GetDefName, AddDefName SetActive, GetComments and propoerties: DefNames, Active, Comments.
* Add new functions in ApiWorksheet: GetDefNames, GetDefName, AddDefName SetActive, GetComments, Delete and propoerties: DefNames, Active, Comments.
* Add new functions in Api: Intersect, GetSelection, GetDefName, AddDefName and propoerty: Selection.
* Add new functions in WorkBook: addDefName, getDefinedNamesWS.
* Add new function in DependencyGraph: getDefinedNamesWS.
Add new function in ApiComment: GetText and property: Text.
Add new functions in ApiComment: GetText, Delete and property: Text.

### Presentation Editor
*
Expand Down
19 changes: 19 additions & 0 deletions cell/apiBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,14 @@
}
});

/**
* Deletes the object.
* @memberof ApiWorksheet
*/
ApiWorksheet.prototype.Delete = function () {
this.worksheet.workbook.removeWorksheet(this.worksheet.getIndex());
};

/**
* Add Hyperlink
* @memberof ApiWorksheet
Expand Down Expand Up @@ -2430,6 +2438,15 @@
}
});

/**
* Deletes the object.
* @typeofeditors ["CSE"]
* @memberof ApiComment
*/
ApiComment.prototype.Delete = function () {
this.Comment.worksheet.cellCommentator.removeComment(this.Comment.asc_getId());
};

Api.prototype["Format"] = Api.prototype.Format;
Api.prototype["AddSheet"] = Api.prototype.AddSheet;
Api.prototype["GetSheets"] = Api.prototype.GetSheets;
Expand Down Expand Up @@ -2480,6 +2497,7 @@
ApiWorksheet.prototype["GetDefName"] = ApiWorksheet.prototype.GetDefName;
ApiWorksheet.prototype["AddDefName"] = ApiWorksheet.prototype.AddDefName;
ApiWorksheet.prototype["GetComments"] = ApiWorksheet.prototype.GetComments;
ApiWorksheet.prototype["Delete"] = ApiWorksheet.prototype.Delete;
ApiWorksheet.prototype["SetHyperlink"] = ApiWorksheet.prototype.SetHyperlink;
ApiWorksheet.prototype["AddChart"] = ApiWorksheet.prototype.AddChart;
ApiWorksheet.prototype["AddShape"] = ApiWorksheet.prototype.AddShape;
Expand Down Expand Up @@ -2576,6 +2594,7 @@


ApiComment.prototype["GetText"] = ApiComment.prototype.GetText;
ApiComment.prototype["Delete"] = ApiComment.prototype.Delete;


function private_SetCoords(oDrawing, oWorksheet, nExtX, nExtY, nFromCol, nColOffset, nFromRow, nRowOffset, pos){
Expand Down

0 comments on commit 749c9c6

Please sign in to comment.