This commit is contained in:
Thomas Fussell 2014-08-01 09:51:28 -04:00
commit 767b0708e2
4 changed files with 29 additions and 15 deletions

View File

@ -8,7 +8,7 @@ class comment
{
public:
comment();
comment(const std::string &text, const std::string &author);
comment(const std::string &text, const std::string &auth);
~comment();
std::string get_text() const;

View File

@ -51,6 +51,4 @@ const std::string download_url = "https://github.com/tfussell/xlnt/archive/maste
#include "cell/value.hpp"
#include "cell/comment.hpp"
#pragma comment(lib, "pugixml.lib")
#pragma comment(lib, "zlib.lib")
#pragma comment(lib, "xlnt.lib")

View File

@ -190,7 +190,16 @@ void zip_file::save(std::ostream &stream)
mz_zip_writer_finalize_archive(archive_.get());
}
<<<<<<< HEAD
if(archive_->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)
=======
change_state(state::read);
auto num_files = zip_file_.m_total_files;
mz_uint i = 0;
for(;i < num_files; i++)
>>>>>>> 71e50ed70af59c234648b8bf5e2ab7b1e432ecf8
{
mz_zip_writer_end(archive_.get());
}
@ -242,7 +251,14 @@ void zip_file::remove_comment()
std::size_t position = buffer_.size() - 1;
<<<<<<< HEAD
for(; position >= 3; position--)
=======
auto num_files = (std::size_t)mz_zip_reader_get_num_files(&zip_file_);
mz_uint i = 0;
for(;i < num_files; i++)
>>>>>>> 71e50ed70af59c234648b8bf5e2ab7b1e432ecf8
{
if(buffer_[position - 3] == 'P'
&& buffer_[position - 2] == 'K'

View File

@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) {
return status;
}
bool suite_test_cell_init = false;
#include "/Users/thomas/Development/xlnt/tests/test_cell.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_cell.hpp"
static test_cell suite_test_cell;
@ -256,7 +256,7 @@ public:
void runTest() { suite_test_cell.test_cell_offset(); }
} testDescription_suite_test_cell_test_cell_offset;
#include "/Users/thomas/Development/xlnt/tests/test_chart.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_chart.hpp"
static test_chart suite_test_chart;
@ -347,7 +347,7 @@ public:
void runTest() { suite_test_chart.test_write_chart_scatter(); }
} testDescription_suite_test_chart_test_write_chart_scatter;
#include "/Users/thomas/Development/xlnt/tests/test_named_range.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_named_range.hpp"
static test_named_range suite_test_named_range;
@ -438,7 +438,7 @@ public:
void runTest() { suite_test_named_range.test_can_be_saved(); }
} testDescription_suite_test_named_range_test_can_be_saved;
#include "/Users/thomas/Development/xlnt/tests/test_number_format.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_number_format.hpp"
static test_number_format suite_test_number_format;
@ -541,7 +541,7 @@ public:
void runTest() { suite_test_number_format.test_mac_date(); }
} testDescription_suite_test_number_format_test_mac_date;
#include "/Users/thomas/Development/xlnt/tests/test_props.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_props.hpp"
static test_props suite_test_props;
@ -584,7 +584,7 @@ public:
void runTest() { suite_test_props.test_write_properties_app(); }
} testDescription_suite_test_props_test_write_properties_app;
#include "/Users/thomas/Development/xlnt/tests/test_read.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_read.hpp"
static test_read suite_test_read;
@ -777,7 +777,7 @@ public:
void runTest() { suite_test_read.test_bad_formats_no(); }
} testDescription_suite_test_read_test_bad_formats_no;
#include "/Users/thomas/Development/xlnt/tests/test_strings.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_strings.hpp"
static test_strings suite_test_strings;
@ -808,7 +808,7 @@ public:
void runTest() { suite_test_strings.test_formatted_string_table(); }
} testDescription_suite_test_strings_test_formatted_string_table;
#include "/Users/thomas/Development/xlnt/tests/test_style.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_style.hpp"
static test_style suite_test_style;
@ -917,7 +917,7 @@ public:
void runTest() { suite_test_style.test_protection(); }
} testDescription_suite_test_style_test_protection;
#include "/Users/thomas/Development/xlnt/tests/test_theme.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_theme.hpp"
static test_theme suite_test_theme;
@ -930,7 +930,7 @@ public:
void runTest() { suite_test_theme.test_write_theme(); }
} testDescription_suite_test_theme_test_write_theme;
#include "/Users/thomas/Development/xlnt/tests/test_workbook.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_workbook.hpp"
static test_workbook suite_test_workbook;
@ -1051,7 +1051,7 @@ public:
void runTest() { suite_test_workbook.test_write_regular_float(); }
} testDescription_suite_test_workbook_test_write_regular_float;
#include "/Users/thomas/Development/xlnt/tests/test_worksheet.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_worksheet.hpp"
static test_worksheet suite_test_worksheet;
@ -1292,7 +1292,7 @@ public:
void runTest() { suite_test_worksheet.test_page_options(); }
} testDescription_suite_test_worksheet_test_page_options;
#include "/Users/thomas/Development/xlnt/tests/test_write.hpp"
#include "C:\Users\Thomas\Development\xlnt\tests\test_write.hpp"
static test_write suite_test_write;