Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/odr/internal/html/common.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <odr/internal/html/common.hpp>

#include <odr/internal/abstract/file.hpp>
#include <odr/internal/common/path.hpp>
#include <odr/internal/crypto/crypto_util.hpp>
#include <odr/internal/util/stream_util.hpp>
#include <odr/internal/util/string_util.hpp>
Expand Down
7 changes: 4 additions & 3 deletions src/odr/internal/html/document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ class PageHtmlFragment final : public HtmlFragmentBase {

namespace odr::internal {

odr::HtmlService html::create_document_service(
const Document &document, const std::string & /*cache_path*/,
HtmlConfig config, std::shared_ptr<Logger> logger) {
HtmlService html::create_document_service(const Document &document,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
std::vector<std::shared_ptr<HtmlFragmentBase>> fragments;

if (document.document_type() == DocumentType::text) {
Expand Down
8 changes: 4 additions & 4 deletions src/odr/internal/html/document.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class Logger;

namespace odr::internal::html {

odr::HtmlService create_document_service(const Document &document,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);
HtmlService create_document_service(const Document &document,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);

} // namespace odr::internal::html
7 changes: 4 additions & 3 deletions src/odr/internal/html/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ class HtmlServiceImpl final : public HtmlService {

namespace odr::internal {

odr::HtmlService html::create_filesystem_service(
const Filesystem &filesystem, const std::string & /*cache_path*/,
HtmlConfig config, std::shared_ptr<Logger> logger) {
HtmlService html::create_filesystem_service(const Filesystem &filesystem,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
return odr::HtmlService(std::make_unique<HtmlServiceImpl>(
filesystem, std::move(config), std::move(logger)));
}
Expand Down
9 changes: 4 additions & 5 deletions src/odr/internal/html/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <string>

namespace odr {
enum class FileType;
struct HtmlConfig;
class HtmlService;
class Filesystem;
Expand All @@ -13,9 +12,9 @@ class Logger;

namespace odr::internal::html {

odr::HtmlService create_filesystem_service(const Filesystem &filesystem,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);
HtmlService create_filesystem_service(const Filesystem &filesystem,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);

}
4 changes: 2 additions & 2 deletions src/odr/internal/html/html_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ void write_element_options(std::ostream &out,

} // namespace

HtmlElementOptions &HtmlElementOptions::set_inline(const bool _inline_element) {
inline_element = _inline_element;
HtmlElementOptions &HtmlElementOptions::set_inline(const bool is_inline) {
inline_element = is_inline;
return *this;
}

Expand Down
12 changes: 6 additions & 6 deletions src/odr/internal/html/html_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ struct HtmlElementOptions {

std::optional<HtmlWritable> extra{};

HtmlElementOptions &set_inline(bool);
HtmlElementOptions &set_close_type(HtmlCloseType);
HtmlElementOptions &set_attributes(std::optional<HtmlAttributes>);
HtmlElementOptions &set_style(std::optional<HtmlWritable>);
HtmlElementOptions &set_class(std::optional<HtmlWritable>);
HtmlElementOptions &set_extra(std::optional<HtmlWritable>);
HtmlElementOptions &set_inline(bool is_inline);
HtmlElementOptions &set_close_type(HtmlCloseType _close_type);
HtmlElementOptions &set_attributes(std::optional<HtmlAttributes> _attributes);
HtmlElementOptions &set_style(std::optional<HtmlWritable> _style);
HtmlElementOptions &set_class(std::optional<HtmlWritable> _class);
HtmlElementOptions &set_extra(std::optional<HtmlWritable> _extra);
};

class HtmlWriter {
Expand Down
8 changes: 4 additions & 4 deletions src/odr/internal/html/image_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ void html::translate_image_src(const ImageFile &image_file, std::ostream &out,
}
}

odr::HtmlService html::create_image_service(const ImageFile &image_file,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
HtmlService html::create_image_service(const ImageFile &image_file,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
return odr::HtmlService(std::make_unique<HtmlServiceImpl>(
image_file, std::move(config), std::move(logger)));
}
Expand Down
8 changes: 4 additions & 4 deletions src/odr/internal/html/image_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ void translate_image_src(const File &file, std::ostream &out,
void translate_image_src(const ImageFile &image_file, std::ostream &out,
const HtmlConfig &config);

odr::HtmlService create_image_service(const ImageFile &image_file,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);
HtmlService create_image_service(const ImageFile &image_file,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);

} // namespace odr::internal::html
8 changes: 4 additions & 4 deletions src/odr/internal/html/pdf_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ class HtmlServiceImpl final : public HtmlService {

namespace odr::internal {

odr::HtmlService html::create_pdf_service(const PdfFile &pdf_file,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
HtmlService html::create_pdf_service(const PdfFile &pdf_file,
const std::string & /*cache_path*/,
HtmlConfig config,
std::shared_ptr<Logger> logger) {
return odr::HtmlService(std::make_unique<HtmlServiceImpl>(
pdf_file, std::move(config), std::move(logger)));
}
Expand Down
7 changes: 3 additions & 4 deletions src/odr/internal/html/pdf_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ class Logger;

namespace odr::internal::html {

odr::HtmlService create_pdf_service(const PdfFile &pdf_file,
const std::string &cache_path,
HtmlConfig config,
std::shared_ptr<Logger> logger);
HtmlService create_pdf_service(const PdfFile &pdf_file,
const std::string &cache_path, HtmlConfig config,
std::shared_ptr<Logger> logger);

}
Loading
Loading