Skip to content

Commit

Permalink
remaining pending changes from #688
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Aug 12, 2023
1 parent c8c894a commit 8bdc827
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions R/xl_open.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ xl_open.default <- function(x, interactive = NA) {
shell.exec(file) # nolint
},
Darwin = {
# system2('/Applications/LibreOffice.app/Contents/MacOS/soffice', shQuote(file), wait = FALSE)
# system2('open', paste0("-a numbers", shQuote(file)))
system2('open', shQuote(file))
},
stop("Operating system not handled: ", toString(userSystem))
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PKG_CPPFLAGS = -I. -I../inst/include/pugixml
PKG_CPPFLAGS = -I. -I../inst/include/pugixml
3 changes: 3 additions & 0 deletions src/helper_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,13 @@ void wide_to_long(
Rcpp::CharacterVector zz_r = Rcpp::as<Rcpp::CharacterVector>(zz["r"]);

for (auto i = 0; i < m; ++i) {
Rcpp::checkUserInterrupt();

Rcpp::CharacterVector cvec = Rcpp::as<Rcpp::CharacterVector>(z[i]);

auto startrow = start_row;
for (auto j = 0; j < n; ++j) {
Rcpp::checkUserInterrupt();

int8_t vtyp = (int8_t)vtyps[i];
// if colname is provided, the first row is always a character
Expand Down
3 changes: 3 additions & 0 deletions src/load_workbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ void loadvals(Rcpp::Environment sheet_data, XPtrXML doc) {

auto itr_rows = 0;
for (auto worksheet: ws.children("row")) {
Rcpp::checkUserInterrupt();

/* ---------------------------------------------------------------------- */
/* read cval, and ctyp -------------------------------------------------- */
/* ---------------------------------------------------------------------- */
Expand All @@ -222,6 +224,7 @@ void loadvals(Rcpp::Environment sheet_data, XPtrXML doc) {

auto itr_cols = 0;
for (auto col : worksheet.children("c")) {
Rcpp::checkUserInterrupt();

// contains all values of a col
xml_col single_xml_col;
Expand Down

0 comments on commit 8bdc827

Please sign in to comment.