Skip to content

Commit

Permalink
[misc] return(self) to return(invisible(self))
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jun 28, 2024
1 parent a53aee9 commit 3535951
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/class-style_mgr.R
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ style_mgr <- R6::R6Class("wbStylesMgr", {
got <- self$get_cellStyle_id(name)

if (!is.null(got) && !is.na(got))
return(self)
return(invisible(self))

font_xml <- NULL
fill_xml <- NULL
Expand Down
10 changes: 5 additions & 5 deletions R/class-workbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -4014,7 +4014,7 @@ wbWorkbook <- R6::R6Class(
old <- old %||% seq_along(self$sheet_names)

if (identical(old, new)) {
return(self)
return(invisible(self))
}

if (!length(self$worksheets)) {
Expand All @@ -4030,7 +4030,7 @@ wbWorkbook <- R6::R6Class(
new_name <- replace_legal_chars(new_raw)

if (identical(self$sheet_names[pos], new_name)) {
return(self)
return(invisible(self))
}

bad <- duplicated(tolower(new))
Expand Down Expand Up @@ -4326,7 +4326,7 @@ wbWorkbook <- R6::R6Class(
# should do nothing if the cols' length is zero
# TODO why would cols ever be 0? Can we just signal this as an error?
if (length(cols) == 0L) {
return(self)
return(invisible(self))
}

cols <- col2int(cols)
Expand Down Expand Up @@ -6434,7 +6434,7 @@ wbWorkbook <- R6::R6Class(

if (!protect) {
self$workbook$workbookProtection <- NULL
return(self)
return(invisible(self))
}

# match.arg() doesn't handle numbers too well
Expand Down Expand Up @@ -6490,7 +6490,7 @@ wbWorkbook <- R6::R6Class(
if (!protect) {
# initializes as character()
self$worksheets[[sheet]]$sheetProtection <- character()
return(self)
return(invisible(self))
}

all_props <- worksheet_lock_properties()
Expand Down

0 comments on commit 3535951

Please sign in to comment.