Skip to content

Commit

Permalink
fix: Check and stop if fp_text_lite() is using a *shading.color* bu…
Browse files Browse the repository at this point in the history
…t no *color*

fix #538
  • Loading branch information
davidgohel committed Feb 3, 2024
1 parent 57944a7 commit a9e33ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: officer
Type: Package
Title: Manipulation of Microsoft Word and PowerPoint Documents
Version: 0.6.4.003
Version: 0.6.4.004
Authors@R: c(
person("David", "Gohel", role = c("aut", "cre"), email = "[email protected]"),
person("Stefan", "Moog", role = "aut", email = '[email protected]'),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The docs gain a description of the columns of the returned dataframe.

- Fix. Refactor `docx_comments()` to (properly) account for comments spanning
multiple paragraphs, multiple comments in the same paragraph and replies. Closes #541.
- Check and stop if `fp_text_lite()` is using a *shading.color* but no *color*.

# officer 0.6.3

Expand Down
3 changes: 3 additions & 0 deletions R/ooxml.R
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ rpr_wml <- function(x){
}

if(!is.na(x$shading.color)){
if (is.na(x$color)) {
stop("shading.color must be used **with** a color.")
}
if(!is_transparent(x$shading.color) ){
out <- paste0(
out,
Expand Down

0 comments on commit a9e33ea

Please sign in to comment.