Skip to content

Commit

Permalink
[new properties] Add new properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Matveev authored and Alexey Matveev committed Apr 9, 2018
1 parent 9c293b6 commit 48e1978
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ability to add/change hyperlinks anchored to bookmarks/headings
### Spreadsheet Editor
* The following functions are added: GetRows, GetCols, GetCount, GetHidden, SetHidden, GetColumnWidth, SetColumnWidth, GetRowHeight, SetRowHeight, GetWpar, SetOffset,
GetAdress, SetLeftMargin, GetLeftMargin, SetRightMargin, GetRightMargin, SetTopMargin, GetTopMargin, SetBottomMargin, GetBottomMargin
* The following properties are added: Rows, Cols, Count, Hidden, ColumnWidth, Width, RowHeight, Height, MergeArea, WrapText, LeftMargin
* The following properties are added: Rows, Cols, Count, Hidden, ColumnWidth, Width, RowHeight, Height, MergeArea, WrapText, LeftMargin, Orientation, PrintHeadings, PrintGridlines
* Fix change active cell in selection across merge. Previously, passing through the first cell of the merge range, we fell into the merge range, even if it was not selected (through the selection of a row / column)

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

Object.defineProperty(ApiWorksheet.prototype, "Orientation", {
get: function () {
return this.worksheet.PagePrintOptions.pageSetup.asc_getOrientation();
},
set: function (value) {
value = (value == 'xlPortrait') ? 0 : (value == 'xlLandscape') ? 1 : 0;
this.worksheet.PagePrintOptions.pageSetup.asc_setOrientation(value);
}
});

Object.defineProperty(ApiWorksheet.prototype, "PrintHeadings", {
get: function () {
return this.worksheet.PagePrintOptions.asc_getHeadings();
},
set: function (value) {
value = (typeof value === 'boolean') ? value : false;
this.worksheet.PagePrintOptions.asc_setHeadings(value);
}
});

Object.defineProperty(ApiWorksheet.prototype, "PrintGridlines", {
get: function () {
return this.worksheet.PagePrintOptions.asc_getGridLines();
},
set: function (value) {
value = (typeof value === 'boolean') ? value : false;
this.worksheet.PagePrintOptions.asc_setGridLines(value);
}
});

/**
* Set column width
* @memberof ApiWorksheet
Expand Down

0 comments on commit 48e1978

Please sign in to comment.