diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 386b6549..93344980 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -171,6 +171,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/detail/serialization/zstream.cpp PROPERTIES COMPILE_FLAGS "-Wno-undef -Wno-shorten-64-to-32") endif() +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/detail/serialization/miniz.cpp PROPERTIES COMPILE_FLAGS "-Wno-strict-aliasing") +endif() + source_group(xlnt FILES ${ROOT_HEADERS}) source_group(cell FILES ${CELL_HEADERS} ${CELL_SOURCES}) source_group(detail FILES ${DETAIL_ROOT_HEADERS} ${DETAIL_ROOT_SOURCES}) diff --git a/source/detail/cryptography/xlsx_crypto_producer.cpp b/source/detail/cryptography/xlsx_crypto_producer.cpp index 16f8b412..6d1973a0 100644 --- a/source/detail/cryptography/xlsx_crypto_producer.cpp +++ b/source/detail/cryptography/xlsx_crypto_producer.cpp @@ -45,7 +45,7 @@ encryption_info generate_encryption_info(const std::u16string &/*password*/) result.is_agile = true; - result.agile = encryption_info::agile_encryption_info{}; + result.agile = encryption_info::agile_encryption_info(); result.agile.key_data.block_size = 16; result.agile.key_data.cipher_algorithm = "AES"; diff --git a/source/detail/serialization/miniz.cpp b/source/detail/serialization/miniz.cpp index 6eb923a4..fdab680c 100644 --- a/source/detail/serialization/miniz.cpp +++ b/source/detail/serialization/miniz.cpp @@ -3173,6 +3173,7 @@ struct mz_zip_internal_state_tag #if defined(DEBUG) || defined(_DEBUG) || defined(NDEBUG) static MZ_FORCEINLINE mz_uint mz_zip_array_range_check(const mz_zip_array *pArray, mz_uint index) { + (void)pArray; MZ_ASSERT(index < pArray->m_size); return index; } diff --git a/source/detail/serialization/xlsx_producer.cpp b/source/detail/serialization/xlsx_producer.cpp index e8df15a9..c55b24e2 100644 --- a/source/detail/serialization/xlsx_producer.cpp +++ b/source/detail/serialization/xlsx_producer.cpp @@ -110,11 +110,15 @@ void xlsx_producer::open(std::ostream &destination) cell xlsx_producer::add_cell(const cell_reference &ref) { + current_cell_->column_ = ref.column(); + current_cell_->row_ = ref.row(); + return cell(current_cell_); } worksheet xlsx_producer::add_worksheet(const std::string &title) { + current_worksheet_->title_ = title; return worksheet(current_worksheet_); } @@ -2256,7 +2260,10 @@ void xlsx_producer::write_worksheet(const relationship &rel) switch (cell.data_type()) { - case cell::type::boolean: + case cell::type::empty: + break; + + case cell::type::boolean: write_attribute("t", "b"); break; @@ -2298,6 +2305,9 @@ void xlsx_producer::write_worksheet(const relationship &rel) switch (cell.data_type()) { + case cell::type::empty: + break; + case cell::type::boolean: write_element(xmlns, "v", write_bool(cell.value())); break;