Skip to content

Commit

Permalink
[wb_add_drawing] read and add "mc:alternateContent" (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Sep 1, 2023
1 parent 28aa515 commit 999cda7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/class-workbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -4540,9 +4540,10 @@ wbWorkbook <- R6::R6Class(
xml <- read_xml(xml, pointer = FALSE)

if (!(xml_node_name(xml) == "xdr:wsDr")) {
error("xml needs to be a drawing.")
stop("xml needs to be a drawing.")
}

altc <- xml_node(xml, "xdr:wsDr", "xdr:absoluteAnchor", "mc:AlternateContent")
ext <- xml_node(xml, "xdr:wsDr", "xdr:absoluteAnchor", "xdr:ext")
pic <- xml_node(xml, "xdr:wsDr", "xdr:absoluteAnchor", "xdr:pic")
grpSp <- xml_node(xml, "xdr:wsDr", "xdr:absoluteAnchor", "xdr:grpSp")
Expand Down Expand Up @@ -4608,6 +4609,7 @@ wbWorkbook <- R6::R6Class(
xdr_typ,
xml_children = c(
anchor,
altc,
ext,
pic,
grpSp,
Expand Down

0 comments on commit 999cda7

Please sign in to comment.