From 99f20a014aaf36e2a65209ee4f34ec7899ce0bd1 Mon Sep 17 00:00:00 2001 From: sukoi26 Date: Mon, 9 Jul 2018 18:21:01 +0200 Subject: [PATCH 1/2] error what(): xl/sharedStrings.xml: error: duplicate attribute #290 --- source/detail/serialization/xlsx_producer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index b7cae367..928c7e2c 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -868,7 +868,7 @@ void xlsx_producer::write_shared_string_table(const relationship & /*rel*/) { write_attribute(xml::qname(xmlns_xml, "space"), "preserve"); } - write_characters(string.plain_text(), has_trailing_whitespace(string.plain_text())); + write_characters(string.plain_text()); write_end_element(xmlns, "t"); write_end_element(xmlns, "si"); From 28a71572cf220b3835745456a98c03192e4edd22 Mon Sep 17 00:00:00 2001 From: sukoi26 Date: Tue, 10 Jul 2018 09:32:34 +0200 Subject: [PATCH 2/2] update #290 suggested by Crzyrndm --- source/detail/serialization/xlsx_producer.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index 928c7e2c..aef2a050 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -864,11 +864,7 @@ void xlsx_producer::write_shared_string_table(const relationship & /*rel*/) { write_start_element(xmlns, "si"); write_start_element(xmlns, "t"); - if (string.runs().front().preserve_space) - { - write_attribute(xml::qname(xmlns_xml, "space"), "preserve"); - } - write_characters(string.plain_text()); + write_characters(string.plain_text(),string.runs().front().preserve_space); write_end_element(xmlns, "t"); write_end_element(xmlns, "si");