When providing an id in ph_location_type() that exceeds the number of phs of that type, no warning or error is thrown. However, when creating the .pptx file, it is corrupted. PPTX tries to repair it but does not succeed.
Probably, it would be best to throw an error, if id is out of range.
x <- read_pptx()
x <- x |> add_slide("Two Content")
x |> ph_with("unknown id", ph_location_type("body", id = 3)) # 3 does not exists => no error or warning
print(x, "corrupted.pptx")
x <- read_pptx()
x <- x |> add_slide("Two Content")
x |> ph_with("unknown id", ph_location_type("title", id = 2)) # 2 does not exists => no error or warning
print(x, "corrupted.pptx")
When providing an
id
inph_location_type()
that exceeds the number of phs of that type, no warning or error is thrown. However, when creating the .pptx file, it is corrupted. PPTX tries to repair it but does not succeed.Probably, it would be best to throw an error, if
id
is out of range.