mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix build on osx
This commit is contained in:
parent
ec4ad23fe3
commit
ce720d5846
|
@ -23,7 +23,11 @@ project "xlnt.test"
|
||||||
"../tests/*.h",
|
"../tests/*.h",
|
||||||
"../tests/runner-autogen.cpp"
|
"../tests/runner-autogen.cpp"
|
||||||
}
|
}
|
||||||
links { "xlnt" }
|
links {
|
||||||
|
"zlib",
|
||||||
|
"pugixml",
|
||||||
|
"xlnt"
|
||||||
|
}
|
||||||
prebuildcommands { "cxxtestgen --runner=ErrorPrinter -o ../../tests/runner-autogen.cpp ../../tests/*.h" }
|
prebuildcommands { "cxxtestgen --runner=ErrorPrinter -o ../../tests/runner-autogen.cpp ../../tests/*.h" }
|
||||||
flags {
|
flags {
|
||||||
"Unicode",
|
"Unicode",
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
void set_column_index(column_t column_index) { column_index_ = column_index; }
|
void set_column_index(column_t column_index) { column_index_ = column_index; }
|
||||||
|
|
||||||
row_t get_row() const { return row_index_ + 1; }
|
row_t get_row() const { return row_index_ + 1; }
|
||||||
row_t set_row(row_t row) { row_index_ = row - 1; }
|
void set_row(row_t row) { row_index_ = row - 1; }
|
||||||
|
|
||||||
row_t get_row_index() const { return row_index_; }
|
row_t get_row_index() const { return row_index_; }
|
||||||
void set_row_index(row_t row_index) { row_index_ = row_index; }
|
void set_row_index(row_t row_index) { row_index_ = row_index; }
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
|
struct worksheet_struct;
|
||||||
|
|
||||||
struct cell_struct
|
struct cell_struct
|
||||||
{
|
{
|
||||||
cell_struct(worksheet_struct *ws, int column, int row)
|
cell_struct(worksheet_struct *ws, int column, int row)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ cell_reference::cell_reference(const std::string &column, row_t row, bool absolu
|
||||||
row_index_(row - 1),
|
row_index_(row - 1),
|
||||||
absolute_(absolute)
|
absolute_(absolute)
|
||||||
{
|
{
|
||||||
if(row_index_ < 0 || column_index_ < 0 || row_index_ >= 1048576 || column_index_ >= 16384)
|
if(row == 0 || row_index_ >= constants::MaxRow || column_index_ >= constants::MaxColumn)
|
||||||
{
|
{
|
||||||
throw bad_cell_coordinates(column_index_, row_index_);
|
throw bad_cell_coordinates(column_index_, row_index_);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ cell_reference::cell_reference(column_t column_index, row_t row_index, bool abso
|
||||||
row_index_(row_index),
|
row_index_(row_index),
|
||||||
absolute_(absolute)
|
absolute_(absolute)
|
||||||
{
|
{
|
||||||
if(row_index_ < 0 || column_index_ < 0 || row_index_ >= 1048576 || column_index_ >= 16384)
|
if(row_index_ >= constants::MaxRow || column_index_ >= constants::MaxColumn)
|
||||||
{
|
{
|
||||||
throw bad_cell_coordinates(column_index_, row_index_);
|
throw bad_cell_coordinates(column_index_, row_index_);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
bool suite_CellTestSuite_init = false;
|
bool suite_CellTestSuite_init = false;
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\CellTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/CellTestSuite.h"
|
||||||
|
|
||||||
static CellTestSuite suite_CellTestSuite;
|
static CellTestSuite suite_CellTestSuite;
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ public:
|
||||||
void runTest() { suite_CellTestSuite.test_is_not_date_color_format(); }
|
void runTest() { suite_CellTestSuite.test_is_not_date_color_format(); }
|
||||||
} testDescription_suite_CellTestSuite_test_is_not_date_color_format;
|
} testDescription_suite_CellTestSuite_test_is_not_date_color_format;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\ChartTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/ChartTestSuite.h"
|
||||||
|
|
||||||
static ChartTestSuite suite_ChartTestSuite;
|
static ChartTestSuite suite_ChartTestSuite;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ public:
|
||||||
void runTest() { suite_ChartTestSuite.test_write_chart_scatter(); }
|
void runTest() { suite_ChartTestSuite.test_write_chart_scatter(); }
|
||||||
} testDescription_suite_ChartTestSuite_test_write_chart_scatter;
|
} testDescription_suite_ChartTestSuite_test_write_chart_scatter;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\DumpTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/DumpTestSuite.h"
|
||||||
|
|
||||||
static DumpTestSuite suite_DumpTestSuite;
|
static DumpTestSuite suite_DumpTestSuite;
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ public:
|
||||||
void runTest() { suite_DumpTestSuite.test_append_after_save(); }
|
void runTest() { suite_DumpTestSuite.test_append_after_save(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_append_after_save;
|
} testDescription_suite_DumpTestSuite_test_append_after_save;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\NamedRangeTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/NamedRangeTestSuite.h"
|
||||||
|
|
||||||
static NamedRangeTestSuite suite_NamedRangeTestSuite;
|
static NamedRangeTestSuite suite_NamedRangeTestSuite;
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ public:
|
||||||
void runTest() { suite_NamedRangeTestSuite.test_can_be_saved(); }
|
void runTest() { suite_NamedRangeTestSuite.test_can_be_saved(); }
|
||||||
} testDescription_suite_NamedRangeTestSuite_test_can_be_saved;
|
} testDescription_suite_NamedRangeTestSuite_test_can_be_saved;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\NumberFormatTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/NumberFormatTestSuite.h"
|
||||||
|
|
||||||
static NumberFormatTestSuite suite_NumberFormatTestSuite;
|
static NumberFormatTestSuite suite_NumberFormatTestSuite;
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ public:
|
||||||
void runTest() { suite_NumberFormatTestSuite.test_mac_date(); }
|
void runTest() { suite_NumberFormatTestSuite.test_mac_date(); }
|
||||||
} testDescription_suite_NumberFormatTestSuite_test_mac_date;
|
} testDescription_suite_NumberFormatTestSuite_test_mac_date;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\PasswordHashTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/PasswordHashTestSuite.h"
|
||||||
|
|
||||||
static PasswordHashTestSuite suite_PasswordHashTestSuite;
|
static PasswordHashTestSuite suite_PasswordHashTestSuite;
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ public:
|
||||||
void runTest() { suite_PasswordHashTestSuite.test_sheet_protection(); }
|
void runTest() { suite_PasswordHashTestSuite.test_sheet_protection(); }
|
||||||
} testDescription_suite_PasswordHashTestSuite_test_sheet_protection;
|
} testDescription_suite_PasswordHashTestSuite_test_sheet_protection;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\PropsTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/PropsTestSuite.h"
|
||||||
|
|
||||||
static PropsTestSuite suite_PropsTestSuite;
|
static PropsTestSuite suite_PropsTestSuite;
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ public:
|
||||||
void runTest() { suite_PropsTestSuite.test_write_properties_app(); }
|
void runTest() { suite_PropsTestSuite.test_write_properties_app(); }
|
||||||
} testDescription_suite_PropsTestSuite_test_write_properties_app;
|
} testDescription_suite_PropsTestSuite_test_write_properties_app;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\ReadTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/ReadTestSuite.h"
|
||||||
|
|
||||||
static ReadTestSuite suite_ReadTestSuite;
|
static ReadTestSuite suite_ReadTestSuite;
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ public:
|
||||||
void runTest() { suite_ReadTestSuite.test_read_date_value(); }
|
void runTest() { suite_ReadTestSuite.test_read_date_value(); }
|
||||||
} testDescription_suite_ReadTestSuite_test_read_date_value;
|
} testDescription_suite_ReadTestSuite_test_read_date_value;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\StringsTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/StringsTestSuite.h"
|
||||||
|
|
||||||
static StringsTestSuite suite_StringsTestSuite;
|
static StringsTestSuite suite_StringsTestSuite;
|
||||||
|
|
||||||
|
@ -738,7 +738,7 @@ public:
|
||||||
void runTest() { suite_StringsTestSuite.test_formatted_string_table(); }
|
void runTest() { suite_StringsTestSuite.test_formatted_string_table(); }
|
||||||
} testDescription_suite_StringsTestSuite_test_formatted_string_table;
|
} testDescription_suite_StringsTestSuite_test_formatted_string_table;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\StyleTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/StyleTestSuite.h"
|
||||||
|
|
||||||
static StyleTestSuite suite_StyleTestSuite;
|
static StyleTestSuite suite_StyleTestSuite;
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ public:
|
||||||
void runTest() { suite_StyleTestSuite.test_read_cell_style(); }
|
void runTest() { suite_StyleTestSuite.test_read_cell_style(); }
|
||||||
} testDescription_suite_StyleTestSuite_test_read_cell_style;
|
} testDescription_suite_StyleTestSuite_test_read_cell_style;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\ThemeTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/ThemeTestSuite.h"
|
||||||
|
|
||||||
static ThemeTestSuite suite_ThemeTestSuite;
|
static ThemeTestSuite suite_ThemeTestSuite;
|
||||||
|
|
||||||
|
@ -848,7 +848,7 @@ public:
|
||||||
void runTest() { suite_ThemeTestSuite.test_write_theme(); }
|
void runTest() { suite_ThemeTestSuite.test_write_theme(); }
|
||||||
} testDescription_suite_ThemeTestSuite_test_write_theme;
|
} testDescription_suite_ThemeTestSuite_test_write_theme;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\WorkbookTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/WorkbookTestSuite.h"
|
||||||
|
|
||||||
static WorkbookTestSuite suite_WorkbookTestSuite;
|
static WorkbookTestSuite suite_WorkbookTestSuite;
|
||||||
|
|
||||||
|
@ -987,7 +987,7 @@ public:
|
||||||
void runTest() { suite_WorkbookTestSuite.test_write_regular_float(); }
|
void runTest() { suite_WorkbookTestSuite.test_write_regular_float(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_write_regular_float;
|
} testDescription_suite_WorkbookTestSuite_test_write_regular_float;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\WorksheetTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/WorksheetTestSuite.h"
|
||||||
|
|
||||||
static WorksheetTestSuite suite_WorksheetTestSuite;
|
static WorksheetTestSuite suite_WorksheetTestSuite;
|
||||||
|
|
||||||
|
@ -1156,7 +1156,7 @@ public:
|
||||||
void runTest() { suite_WorksheetTestSuite.test_printer_settings(); }
|
void runTest() { suite_WorksheetTestSuite.test_printer_settings(); }
|
||||||
} testDescription_suite_WorksheetTestSuite_test_printer_settings;
|
} testDescription_suite_WorksheetTestSuite_test_printer_settings;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\WriteTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/WriteTestSuite.h"
|
||||||
|
|
||||||
static WriteTestSuite suite_WriteTestSuite;
|
static WriteTestSuite suite_WriteTestSuite;
|
||||||
|
|
||||||
|
@ -1289,7 +1289,7 @@ public:
|
||||||
void runTest() { suite_WriteTestSuite.test_short_number(); }
|
void runTest() { suite_WriteTestSuite.test_short_number(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_short_number;
|
} testDescription_suite_WriteTestSuite_test_short_number;
|
||||||
|
|
||||||
#include "C:\Users\taf656\Development\xlnt\tests\ZipFileTestSuite.h"
|
#include "/Users/thomas/Development/xlnt/tests/ZipFileTestSuite.h"
|
||||||
|
|
||||||
static ZipFileTestSuite suite_ZipFileTestSuite;
|
static ZipFileTestSuite suite_ZipFileTestSuite;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user