Skip to content
Merged
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
3 changes: 3 additions & 0 deletions docraft/include/docraft/craft/docraft_craft_language_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ namespace docraft::craft {

~DocraftCraftLanguageParser() = default;

DocraftCraftLanguageParser(const DocraftCraftLanguageParser&) = delete;
DocraftCraftLanguageParser& operator=(const DocraftCraftLanguageParser&) = delete;

/**
* @brief Parses craft language source (a single root element) as a string.
* @param craft_language_source XML source as string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ namespace docraft::loom::craft {
public:
static DocraftLoomTagHandlerRegistry& instance();

DocraftLoomTagHandlerRegistry(const DocraftLoomTagHandlerRegistry&) = delete;
DocraftLoomTagHandlerRegistry& operator=(const DocraftLoomTagHandlerRegistry&) = delete;

void register_handler(const std::string& tag, std::unique_ptr<IDocraftLoomTagHandler> handler);

/**
Expand Down
2 changes: 1 addition & 1 deletion docraft/include/docraft/loom/docraft_loom_pdf_creator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace docraft::loom {
* and re-visited by the rendering pass for each physical page. The body is laid out
* as one continuous flow and then split across pages by DocraftLoomPaginationProcessor.
*/
class DocraftLoomPdfCreator
class DOCRAFT_LIB DocraftLoomPdfCreator
{
public:
/**
Expand Down
2 changes: 1 addition & 1 deletion docraft/include/docraft/tools/docraft_validator.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace docraft::tools {
* @brief Aggregated result of DocraftValidator::validate(): every diagnostic found,
* in the order they were discovered.
*/
struct DocraftValidationResult
struct DOCRAFT_LIB DocraftValidationResult
{
std::vector<DocraftValidationIssue> issues;

Expand Down
9 changes: 9 additions & 0 deletions docraft/src/docraft/backend/pdf/docraft_haru_line_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ namespace docraft::backend::pdf {
template <typename PageT, typename ElemT, typename NumT, typename PhaseT>
ElemT dash_pattern_element_type(HPDF_STATUS (*)(PageT, const ElemT*, NumT, PhaseT));

#if defined(_MSC_VER) && defined(_M_IX86)
// On 32-bit MSVC, HPDF_EXPORT declares libharu's API __stdcall, a distinct
// function pointer type from the implicit __cdecl overload above (they only
// coincide on x64) -- without this overload, deducing against
// &HPDF_Page_SetDash fails to compile on x86.
template <typename PageT, typename ElemT, typename NumT, typename PhaseT>
ElemT dash_pattern_element_type(HPDF_STATUS(__stdcall*)(PageT, const ElemT*, NumT, PhaseT));
#endif

using DashPatternElement = decltype(dash_pattern_element_type(&HPDF_Page_SetDash));

void invoke_set_dash(HPDF_Page page, const std::vector<float>& pattern) {
Expand Down
2 changes: 1 addition & 1 deletion docraft/src/docraft/loom/nodes/docraft_loom_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace docraft::loom::nodes {

std::vector<int> DocraftLoomNode::paint_order_indices() const {
std::vector<int> indices(children_.size());
std::ranges::iota(indices, 0);
std::iota(indices.begin(), indices.end(), 0);
std::ranges::stable_sort(indices, [this](int a, int b) {
return children_[static_cast<std::size_t>(a)]->z_index()
< children_[static_cast<std::size_t>(b)]->z_index();
Expand Down
Loading