From 01b9a265100abcc8533e9a96cac7230251c43d7d Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Mon, 28 Jul 2014 17:55:57 -0400 Subject: [PATCH] actually produce a working spreadsheet now --- include/xlnt/common/zip_file.hpp | 1 + source/style_writer.cpp | 82 +++++++++++++++++++++++++++++++- source/workbook.cpp | 12 ++++- source/zip_file.cpp | 61 +++++++++++++++++++++++- tests/runner-autogen.cpp | 70 +++++++++++++-------------- tests/test_write.hpp | 5 -- 6 files changed, 187 insertions(+), 44 deletions(-) diff --git a/include/xlnt/common/zip_file.hpp b/include/xlnt/common/zip_file.hpp index e622d39d..5ca06816 100644 --- a/include/xlnt/common/zip_file.hpp +++ b/include/xlnt/common/zip_file.hpp @@ -113,6 +113,7 @@ private: void write_all(); std::string read_from_zip(const std::string &filename); void write_to_zip(const std::string &filename, const std::string &content, bool append = true); + void write_directory_to_zip(const std::string &name, bool append = true); void change_state(state new_state, bool append = true); static bool file_exists(const std::string& name); void start_read(); diff --git a/source/style_writer.cpp b/source/style_writer.cpp index 78124320..d42f2ed0 100644 --- a/source/style_writer.cpp +++ b/source/style_writer.cpp @@ -1,3 +1,6 @@ +#include +#include + #include "writer/style_writer.hpp" #include "workbook/workbook.hpp" #include "worksheet/worksheet.hpp" @@ -53,7 +56,84 @@ std::vector