From 04bf439409d6c5837671d8447bdbbddfe13fec59 Mon Sep 17 00:00:00 2001 From: David Gohel Date: Mon, 19 Apr 2021 22:22:25 +0200 Subject: [PATCH] dont warn, stop and give a clear message --- DESCRIPTION | 2 +- R/ph_location.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 86df47e3..0d9218d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: officer Type: Package Title: Manipulation of Microsoft Word and PowerPoint Documents -Version: 0.3.19.001 +Version: 0.3.19.002 Authors@R: c( person("David", "Gohel", role = c("aut", "cre"), email = "david.gohel@ardata.fr"), diff --git a/R/ph_location.R b/R/ph_location.R index 6d358af3..ed6422a9 100644 --- a/R/ph_location.R +++ b/R/ph_location.R @@ -261,7 +261,8 @@ fortify_location.location_label <- function( x, doc, ...){ } if( nrow(props) > 1) { - warning("more than a row have been selected") + stop("Placeholder ", shQuote(x$ph_label), + " in the slide layout is duplicated. It needs to be unique.") } props <- props[, c("offx", "offy", "cx", "cy", "ph_label", "ph", "type")]