@@ -214,17 +214,23 @@ void HtmlResource::write_resource(std::ostream &os) const {
214214
215215HtmlService html::translate (const DecodedFile &decoded_file,
216216 const std::string &output_path,
217- const HtmlConfig &config) {
217+ const HtmlConfig &config,
218+ std::shared_ptr<Logger> logger) {
218219 if (decoded_file.is_text_file ()) {
219- return translate (decoded_file.as_text_file (), output_path, config);
220+ return translate (decoded_file.as_text_file (), output_path, config,
221+ std::move (logger));
220222 } else if (decoded_file.is_image_file ()) {
221- return translate (decoded_file.as_image_file (), output_path, config);
223+ return translate (decoded_file.as_image_file (), output_path, config,
224+ std::move (logger));
222225 } else if (decoded_file.is_archive_file ()) {
223- return translate (decoded_file.as_archive_file (), output_path, config);
226+ return translate (decoded_file.as_archive_file (), output_path, config,
227+ std::move (logger));
224228 } else if (decoded_file.is_document_file ()) {
225- return translate (decoded_file.as_document_file (), output_path, config);
229+ return translate (decoded_file.as_document_file (), output_path, config,
230+ std::move (logger));
226231 } else if (decoded_file.is_pdf_file ()) {
227- return translate (decoded_file.as_pdf_file (), output_path, config);
232+ return translate (decoded_file.as_pdf_file (), output_path, config,
233+ std::move (logger));
228234 }
229235
230236 throw UnsupportedFileType (decoded_file.file_type ());
@@ -257,75 +263,89 @@ HtmlResourceLocator html::standard_resource_locator() {
257263
258264HtmlService html::translate (const TextFile &text_file,
259265 const std::string &output_path,
260- const HtmlConfig &config) {
266+ const HtmlConfig &config,
267+ std::shared_ptr<Logger> logger) {
261268 std::filesystem::create_directories (output_path);
262- return internal::html::create_text_service (text_file, output_path, config);
269+ return internal::html::create_text_service (text_file, output_path, config,
270+ std::move (logger));
263271}
264272
265273HtmlService html::translate (const ImageFile &image_file,
266274 const std::string &output_path,
267- const HtmlConfig &config) {
275+ const HtmlConfig &config,
276+ std::shared_ptr<Logger> logger) {
268277 std::filesystem::create_directories (output_path);
269- return internal::html::create_image_service (image_file, output_path, config);
278+ return internal::html::create_image_service (image_file, output_path, config,
279+ std::move (logger));
270280}
271281
272282HtmlService html::translate (const ArchiveFile &archive_file,
273283 const std::string &output_path,
274- const HtmlConfig &config) {
275- return translate (archive_file.archive (), output_path, config);
284+ const HtmlConfig &config,
285+ std::shared_ptr<Logger> logger) {
286+ return translate (archive_file.archive (), output_path, config,
287+ std::move (logger));
276288}
277289
278290HtmlService html::translate (const DocumentFile &document_file,
279291 const std::string &output_path,
280- const HtmlConfig &config) {
292+ const HtmlConfig &config,
293+ std::shared_ptr<Logger> logger) {
281294 auto document_file_impl = document_file.impl ();
282295
283296#ifdef ODR_WITH_WVWARE
284297 if (auto wv_document_file =
285298 std::dynamic_pointer_cast<internal::WvWareLegacyMicrosoftFile>(
286299 document_file_impl)) {
287300 std::filesystem::create_directories (output_path);
288- return internal::html::create_wvware_oldms_service (*wv_document_file,
289- output_path, config);
301+ return internal::html::create_wvware_oldms_service (
302+ *wv_document_file, output_path, config, std::move (logger) );
290303 }
291304#endif
292305
293- return translate (document_file.document (), output_path, config);
306+ return translate (document_file.document (), output_path, config,
307+ std::move (logger));
294308}
295309
296310HtmlService html::translate (const PdfFile &pdf_file,
297311 const std::string &output_path,
298- const HtmlConfig &config) {
312+ const HtmlConfig &config,
313+ std::shared_ptr<Logger> logger) {
299314 auto pdf_file_impl = pdf_file.impl ();
300315
301316#ifdef ODR_WITH_PDF2HTMLEX
302317 if (auto poppler_pdf_file =
303318 std::dynamic_pointer_cast<internal::PopplerPdfFile>(pdf_file_impl)) {
304319 std::filesystem::create_directories (output_path);
305- return internal::html::create_poppler_pdf_service (*poppler_pdf_file,
306- output_path, config);
320+ return internal::html::create_poppler_pdf_service (
321+ *poppler_pdf_file, output_path, config, std::move (logger) );
307322 }
308323#endif
309324
310- return internal::html::create_pdf_service (pdf_file, output_path, config);
325+ return internal::html::create_pdf_service (pdf_file, output_path, config,
326+ std::move (logger));
311327}
312328
313329HtmlService html::translate (const Archive &archive,
314330 const std::string &output_path,
315- const HtmlConfig &config) {
331+ const HtmlConfig &config,
332+ std::shared_ptr<Logger> logger) {
316333 std::filesystem::create_directories (output_path);
317- return internal::html::create_filesystem_service (archive. as_filesystem (),
318- output_path, config);
334+ return internal::html::create_filesystem_service (
335+ archive. as_filesystem (), output_path, config, std::move (logger) );
319336}
320337
321338HtmlService html::translate (const Document &document,
322339 const std::string &output_path,
323- const HtmlConfig &config) {
340+ const HtmlConfig &config,
341+ std::shared_ptr<Logger> logger) {
324342 std::filesystem::create_directories (output_path);
325- return internal::html::create_document_service (document, output_path, config);
343+ return internal::html::create_document_service (document, output_path, config,
344+ std::move (logger));
326345}
327346
328- void html::edit (const Document &document, const char *diff) {
347+ void html::edit (const Document &document, const char *diff,
348+ Logger & /* logger*/ ) {
329349 auto json = nlohmann::json::parse (diff);
330350 for (const auto &[key, value] : json[" modifiedText" ].items ()) {
331351 auto element =
0 commit comments