Skip to content

Commit

Permalink
Unexpose pdf2htmlEX and wvWare in odr::OpenDocumentReader class
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Aug 27, 2024
1 parent 0322ffb commit cde62f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 55 deletions.
28 changes: 1 addition & 27 deletions src/odr/open_document_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@
#include <odr/internal/common/path.hpp>
#include <odr/internal/git_info.hpp>
#include <odr/internal/open_strategy.hpp>
#include <odr/internal/project_info.hpp>
#include <odr/internal/resource.hpp>

#include <fstream>

#if defined(WITH_PDF2HTMLEX)
#include <odr/internal/html/pdf2htmlEX_wrapper.hpp>
#endif
#if defined(WITH_WVWARE)
#include <odr/internal/html/wvWare_wrapper.hpp>
#endif

namespace odr {

std::string OpenDocumentReader::version() noexcept {
Expand Down Expand Up @@ -251,26 +245,6 @@ Html OpenDocumentReader::html(const PdfFile &pdf_file,
return html::translate(pdf_file, output_path, config);
}

#if defined(WITH_PDF2HTMLEX)
Html OpenDocumentReader::pdf2htmlEX(const std::string &input_path,
const std::string &output_path,
const HtmlConfig &config,
std::optional<std::string> &password) {
return internal::html::pdf2htmlEX_wrapper(input_path, output_path, config,
password);
}
#endif

#if defined(WITH_WVWARE)
Html OpenDocumentReader::wvHtml(const std::string &input_path,
const std::string &output_path,
const HtmlConfig &config,
std::optional<std::string> &password) {
return internal::html::wvWare_wrapper(input_path, output_path, config,
password);
}
#endif

void OpenDocumentReader::edit(const Document &document, const char *diff) {
html::edit(document, diff);
}
Expand Down
28 changes: 0 additions & 28 deletions src/odr/open_document_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#define ODR_OPEN_DOCUMENT_READER_HPP

#include <functional>
#include <odr/internal/project_info.hpp>
#include <optional>
#include <string>
#include <vector>

Expand Down Expand Up @@ -141,32 +139,6 @@ class OpenDocumentReader final {
const std::string &output_path,
const HtmlConfig &config);

#if defined(WITH_PDF2HTMLEX)
/// @brief Translates a PDF file to HTML using pdf2htmlEX.
///
/// @param input_path Path to the file to translate.
/// @param output_path Path to save the HTML output.
/// @param config Configuration for the HTML output.
/// @return HTML output.
[[nodiscard]] static Html pdf2htmlEX(const std::string &input_path,
const std::string &output_path,
const HtmlConfig &config,
std::optional<std::string> &password);
#endif

#if defined(WITH_WVWARE)
/// @brief Translates a doc file to HTML using wvWare.
///
/// @param input_path Path to the file to translate.
/// @param output_path Path to save the HTML output.
/// @param config Configuration for the HTML output.
/// @return HTML output.
[[nodiscard]] static Html wvHtml(const std::string &input_path,
const std::string &output_path,
const HtmlConfig &config,
std::optional<std::string> &password);
#endif

/// @brief Edit a document.
/// @param document The document.
/// @param diff The diff.
Expand Down

0 comments on commit cde62f8

Please sign in to comment.