Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-FilterPrivacy-to-workbookPr #1154

Closed

Conversation

JDavidVR
Copy link
Contributor

more information on this ticket: #1152

@xuri xuri added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 18, 2022
Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I've left some comments.

@@ -25,6 +25,8 @@ type SheetPrOptionPtr interface {
}

type (
// FilterPrivacy is an option used for SheetPrOption and WorkbookPrOption
FilterPrivacy bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filterPrivacy attribute didn't belong to worksheets properties, so I suggest defining it in the workbook.go, and correct doc comment for it.

@@ -123,6 +123,11 @@ func (o CodeName) setWorkbookPrOption(pr *xlsxWorkbookPr) {
pr.CodeName = string(o)
}

// setWorkbookPrOption implements the WorkbookPrOption interface.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest the get and set implement functions following the order in OOXML Spec, move this function before CodeName, and update the available options document of the functions SetWorkbookPrOptions and GetWorkbookPrOptions

// filter privacy of thw workbook.
func (o *FilterPrivacy) getWorkbookPrOption(pr *xlsxWorkbookPr) {
if pr == nil {
*o = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case was not been tested, please add a test case for this.

wangxuliBY added a commit to wangxuliBY/excelize that referenced this pull request Feb 25, 2022
This fixed code review issue in PR qax-os#1154
wangxuliBY added a commit to wangxuliBY/excelize that referenced this pull request Feb 25, 2022
This fixed code review issue in PR qax-os#1154
xuri pushed a commit that referenced this pull request Feb 25, 2022
@xuri xuri closed this Feb 25, 2022
@JDavidVR JDavidVR deleted the add-FilterPrivacy-to-workbookPr branch March 24, 2022 20:12
xuri pushed a commit to carbin-gun/excelize that referenced this pull request Oct 9, 2022
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this pull request Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants