-
Notifications
You must be signed in to change notification settings - Fork 32
/
CellProtection.R
39 lines (37 loc) · 1.21 KB
/
CellProtection.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
######################################################################
# Deal with CellProtection
#' @rdname CellProtection
#' @export
is.CellProtection <- function(x) inherits(x, "CellProtection")
######################################################################
# Create an CellProtection
#
#' Create a CellProtection object.
#'
#' Create a CellProtection object used for cell styles.
#'
#' @param locked a logical indicating the cell is locked.
#' @param hidden a logical indicating the cell is hidden.
#' @param x A CellProtection object, as returned by \code{CellProtection}.
#' @return
#'
#' \code{CellProtection} returns a list with components from the input
#' argument, and a class attribute "CellProtection". CellProtection objects
#' are used when constructing cell styles.
#'
#' \code{is.CellProtection} returns \code{TRUE} if the argument is of class
#' "CellProtection" and \code{FALSE} otherwise.
#' @author Adrian Dragulescu
#' @seealso \code{\link{CellStyle}} for using the a \code{CellProtection}
#' object.
#' @examples
#'
#'
#' font <- CellProtection(locked=TRUE)
#'
#' @export
CellProtection <- function(locked=TRUE, hidden=FALSE)
{
structure(list(locked=locked, hidden=hidden),
class="CellProtection")
}