diff --git a/src/odr/internal/iwork/iwork_document.cpp b/src/odr/internal/iwork/iwork_document.cpp index bad41a953..502226801 100644 --- a/src/odr/internal/iwork/iwork_document.cpp +++ b/src/odr/internal/iwork/iwork_document.cpp @@ -197,6 +197,7 @@ class ElementAdapter final : public abstract::ElementAdapter, .print_orientation = {}, .margin = {}, .background_color = {}, + .direction = {}, }; } [[nodiscard]] ElementIdentifier slide_master_page( diff --git a/src/odr/internal/oldms/presentation/ppt_document.cpp b/src/odr/internal/oldms/presentation/ppt_document.cpp index 9fa28936c..42d8667f4 100644 --- a/src/odr/internal/oldms/presentation/ppt_document.cpp +++ b/src/odr/internal/oldms/presentation/ppt_document.cpp @@ -147,6 +147,7 @@ class ElementAdapter final : public abstract::ElementAdapter, .print_orientation = {}, .margin = {}, .background_color = {}, + .direction = {}, }; } return { @@ -155,6 +156,7 @@ class ElementAdapter final : public abstract::ElementAdapter, .print_orientation = {}, .margin = {}, .background_color = {}, + .direction = {}, }; } [[nodiscard]] ElementIdentifier slide_master_page( diff --git a/test/src/internal/odf/odf_flat_file_test.cpp b/test/src/internal/odf/odf_flat_file_test.cpp index 03b71d9d8..d5ae50376 100644 --- a/test/src/internal/odf/odf_flat_file_test.cpp +++ b/test/src/internal/odf/odf_flat_file_test.cpp @@ -587,10 +587,13 @@ TEST(FlatOpenDocumentFile, a_right_to_left_writing_mode_reads_as_a_direction) { /// Neither is a left-to-right claim. TEST(FlatOpenDocumentFile, a_writing_mode_without_a_side_names_no_direction) { for (const char *mode : {"tb-rl", "tb-lr", "tb", "page"}) { + // built outside the macro: msvc's traditional preprocessor does not read + // a raw string in a macro argument, and trips over the quotes inside it + const std::string properties = + R"(style:writing-mode=")" + std::string(mode) + R"(")"; EXPECT_EQ(std::vector>( {std::nullopt, std::nullopt, std::nullopt}), - directions_of(three_paragraphs( - "P1", R"(style:writing-mode=")" + std::string(mode) + "\""))) + directions_of(three_paragraphs("P1", properties))) << mode; } }