From 016c95bb4a9ee3d1a84277ca5b5d888ee2a3ffd3 Mon Sep 17 00:00:00 2001 From: sukoi26 Date: Thu, 19 Jul 2018 14:05:28 +0200 Subject: [PATCH 1/3] Best fit (#1) * bestFit change remove from skip_attributes list * update bestFit commit error compiling std::vector --- source/detail/serialization/xlsx_consumer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/detail/serialization/xlsx_consumer.cpp b/source/detail/serialization/xlsx_consumer.cpp index e15ef435..336ddaa3 100644 --- a/source/detail/serialization/xlsx_consumer.cpp +++ b/source/detail/serialization/xlsx_consumer.cpp @@ -601,7 +601,7 @@ std::string xlsx_consumer::read_worksheet_begin(const std::string &rel_id) { expect_start_element(qn("spreadsheetml", "col"), xml::content::simple); - skip_attributes({"bestFit", "collapsed", "outlineLevel"}); + skip_attributes(std::vector{"collapsed", "outlineLevel"}); auto min = static_cast(std::stoull(parser().attribute("min"))); auto max = static_cast(std::stoull(parser().attribute("max"))); From 7be7172ff534dd8175e267312c9ffc48093c6e13 Mon Sep 17 00:00:00 2001 From: sukoi26 Date: Sun, 22 Jul 2018 16:35:41 +0200 Subject: [PATCH 2/3] update attribute required required attribute default_row_height --- include/xlnt/worksheet/sheet_format_properties.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xlnt/worksheet/sheet_format_properties.hpp b/include/xlnt/worksheet/sheet_format_properties.hpp index c71eefbe..52e4ceb1 100644 --- a/include/xlnt/worksheet/sheet_format_properties.hpp +++ b/include/xlnt/worksheet/sheet_format_properties.hpp @@ -40,9 +40,9 @@ public: optional base_col_width; /// - /// The default row height + /// The default row height is required /// - optional default_row_height; + double default_row_height = 15.0; /// /// The default column width From 8f4248d9c35c3e8b7d09d65065c7b7e1d8463085 Mon Sep 17 00:00:00 2001 From: sukoi26 Date: Sun, 22 Jul 2018 18:44:31 +0200 Subject: [PATCH 3/3] change SheetFormatPr change "defaultRowHeight" not optional --- source/detail/serialization/xlsx_producer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index 5d854d7d..70949984 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -2351,11 +2351,9 @@ void xlsx_producer::write_worksheet(const relationship &rel) write_attribute("defaultColWidth", format_properties.default_column_width.get()); } - if (format_properties.default_row_height.is_set()) - { - write_attribute("defaultRowHeight", - format_properties.default_row_height.get()); - } + + write_attribute("defaultRowHeight", + format_properties.default_row_height); if (format_properties.dy_descent.is_set()) {