From 913551920f1b6bedbe97ed350d505974662b804d Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Fri, 9 May 2014 15:54:06 -0400 Subject: [PATCH] restructure --- include/xlnt/cell.h | 89 -- include/xlnt/chart.h | 30 - include/xlnt/date_time.h | 0 include/xlnt/drawing.h | 30 - include/xlnt/exceptions.h | 0 include/xlnt/namedrange.h | 30 - include/xlnt/ooxml.h | 65 - include/xlnt/strings.h | 30 - include/xlnt/style.h | 30 - include/xlnt/theme.h | 0 include/xlnt/workbook.h | 54 - include/xlnt/worksheet.h | 112 -- source/excel/cell.cpp | 156 --- source/excel/workbook.cpp | 129 -- source/excel/worksheet.cpp | 380 ------ source/misc/color.cpp | 502 -------- source/misc/color.h | 1511 ----------------------- source/misc/enum_iterator.h | 49 - source/misc/nullable.h | 148 --- source/packaging/compression_option.h | 32 - source/packaging/file.h | 24 - source/packaging/file_access.h | 28 - source/packaging/file_mode.h | 36 - source/packaging/file_share.h | 43 - source/packaging/opc_callback_handler.h | 23 - source/packaging/opc_streambuf.h | 30 - source/packaging/package.cpp | 393 ------ source/packaging/package.h | 138 --- source/packaging/package_properties.h | 198 --- source/packaging/part.cpp | 173 --- source/packaging/part.h | 105 -- source/packaging/reader.h | 36 - source/packaging/relationship.h | 73 -- source/packaging/target_mode.h | 20 - source/packaging/uri.cpp | 397 ------ source/packaging/uri.h | 485 -------- source/packaging/windows/file.cpp | 49 - source/packaging/writer.h | 36 - source/tests/CellTestSuite.h | 9 +- source/tests/ChartTestSuite.h | 3 +- source/tests/DumpTestSuite.h | 3 +- source/tests/IntegrationTestSuite.h | 4 +- source/tests/IterTestSuite.h | 3 +- source/tests/MetaTestSuite.h | 3 +- source/tests/NamedRangeTestSuite.h | 3 +- source/tests/NullableTestSuite.h | 2 +- source/tests/NumberFormatTestSuite.h | 3 +- source/tests/PackageTestSuite.h | 3 +- source/tests/PasswordHashTestSuite.h | 3 +- source/tests/PropsTestSuite.h | 3 +- source/tests/ReadTestSuite.h | 3 +- source/tests/StringsTestSuite.h | 3 +- source/tests/StyleTestSuite.h | 3 +- source/tests/ThemeTestSuite.h | 3 +- source/tests/UnicodeTestSuite.h | 3 +- source/tests/UriTestSuite.h | 3 +- source/tests/WorkbookTestSuite.h | 3 +- source/tests/WorksheetTestSuite.h | 3 +- source/tests/WriteTestSuite.h | 3 +- source/tests/runner-autogen.cpp | 540 ++++---- source/xlnt.cpp | 1100 +++++++++++++++++ source/xlnt.h | 944 ++++++++++++++ 62 files changed, 2338 insertions(+), 5979 deletions(-) delete mode 100644 include/xlnt/cell.h delete mode 100644 include/xlnt/chart.h delete mode 100644 include/xlnt/date_time.h delete mode 100644 include/xlnt/drawing.h delete mode 100644 include/xlnt/exceptions.h delete mode 100644 include/xlnt/namedrange.h delete mode 100644 include/xlnt/ooxml.h delete mode 100644 include/xlnt/strings.h delete mode 100644 include/xlnt/style.h delete mode 100644 include/xlnt/theme.h delete mode 100644 include/xlnt/workbook.h delete mode 100644 include/xlnt/worksheet.h delete mode 100644 source/excel/cell.cpp delete mode 100644 source/excel/workbook.cpp delete mode 100644 source/excel/worksheet.cpp delete mode 100644 source/misc/color.cpp delete mode 100644 source/misc/color.h delete mode 100644 source/misc/enum_iterator.h delete mode 100644 source/misc/nullable.h delete mode 100644 source/packaging/compression_option.h delete mode 100644 source/packaging/file.h delete mode 100644 source/packaging/file_access.h delete mode 100644 source/packaging/file_mode.h delete mode 100644 source/packaging/file_share.h delete mode 100644 source/packaging/opc_callback_handler.h delete mode 100644 source/packaging/opc_streambuf.h delete mode 100644 source/packaging/package.cpp delete mode 100644 source/packaging/package.h delete mode 100644 source/packaging/package_properties.h delete mode 100644 source/packaging/part.cpp delete mode 100644 source/packaging/part.h delete mode 100644 source/packaging/reader.h delete mode 100644 source/packaging/relationship.h delete mode 100644 source/packaging/target_mode.h delete mode 100644 source/packaging/uri.cpp delete mode 100644 source/packaging/uri.h delete mode 100644 source/packaging/windows/file.cpp delete mode 100644 source/packaging/writer.h create mode 100644 source/xlnt.cpp create mode 100644 source/xlnt.h diff --git a/include/xlnt/cell.h b/include/xlnt/cell.h deleted file mode 100644 index 48eca539..00000000 --- a/include/xlnt/cell.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -#include -#include - -struct tm; - -namespace xlnt { - -class style; -class worksheet; -struct cell_struct; - -struct coordinate -{ - std::string column; - int row; -}; - -class cell -{ -public: - enum class type - { - null, - numeric, - string, - date, - formula, - boolean, - error - }; - - static coordinate coordinate_from_string(const std::string &address); - static int column_index_from_string(const std::string &column_string); - static std::string get_column_letter(int column_index); - static std::string absolute_coordinate(const std::string &absolute_address); - - cell(const cell ©); - cell(worksheet &ws, const std::string &column, int row); - cell(worksheet &ws, const std::string &column, int row, const std::string &value); - ~cell(); - - cell &operator=(int value); - cell &operator=(double value); - cell &operator=(const std::string &value); - cell &operator=(const char *value); - cell &operator=(const tm &value); - - friend bool operator==(const std::string &comparand, const cell &cell); - friend bool operator==(const char *comparand, const cell &cell); - friend bool operator==(const tm &comparand, const cell &cell); - - std::string to_string() const; - bool is_date() const; - style &get_style(); - type get_data_type(); - -private: - cell_struct *root_; -}; - -inline std::ostream &operator<<(std::ostream &stream, const cell &cell) -{ - return stream << cell.to_string(); -} - -} // namespace xlnt diff --git a/include/xlnt/chart.h b/include/xlnt/chart.h deleted file mode 100644 index 03371f69..00000000 --- a/include/xlnt/chart.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -namespace xlnt { - -class style -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/date_time.h b/include/xlnt/date_time.h deleted file mode 100644 index e69de29b..00000000 diff --git a/include/xlnt/drawing.h b/include/xlnt/drawing.h deleted file mode 100644 index 03371f69..00000000 --- a/include/xlnt/drawing.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -namespace xlnt { - -class style -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/exceptions.h b/include/xlnt/exceptions.h deleted file mode 100644 index e69de29b..00000000 diff --git a/include/xlnt/namedrange.h b/include/xlnt/namedrange.h deleted file mode 100644 index 03371f69..00000000 --- a/include/xlnt/namedrange.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -namespace xlnt { - -class style -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/ooxml.h b/include/xlnt/ooxml.h deleted file mode 100644 index 16dbf075..00000000 --- a/include/xlnt/ooxml.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -# Copyright(c) 2010 - 2011 openpyxl -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files(the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions : -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -*/ -#pragma once - -#include -#include - -namespace xlnt { - -// Constants for fixed paths in a file and xml namespace urls. - -const int MIN_ROW = 0; -const int MIN_COLUMN = 0; -const int MAX_COLUMN = 16384; -const int MAX_ROW = 1048576; - -// constants -const std::string PACKAGE_PROPS = "docProps"; -const std::string PACKAGE_XL = "xl"; -const std::string PACKAGE_RELS = "_rels"; -const std::string PACKAGE_THEME = PACKAGE_XL + "/" + "theme"; -const std::string PACKAGE_WORKSHEETS = PACKAGE_XL + "/" + "worksheets"; -const std::string PACKAGE_DRAWINGS = PACKAGE_XL + "/" + "drawings"; -const std::string PACKAGE_CHARTS = PACKAGE_XL + "/" + "charts"; - -const std::string ARC_CONTENT_TYPES = "[Content_Types].xml"; -const std::string ARC_ROOT_RELS = PACKAGE_RELS + "/.rels"; -const std::string ARC_WORKBOOK_RELS = PACKAGE_XL + "/" + PACKAGE_RELS + "/workbook.xml.rels"; -const std::string ARC_CORE = PACKAGE_PROPS + "/core.xml"; -const std::string ARC_APP = PACKAGE_PROPS + "/app.xml"; -const std::string ARC_WORKBOOK = PACKAGE_XL + "/workbook.xml"; -const std::string ARC_STYLE = PACKAGE_XL + "/styles.xml"; -const std::string ARC_THEME = PACKAGE_THEME + "/theme1.xml"; -const std::string ARC_SHARED_STRINGS = PACKAGE_XL + "/sharedStrings.xml"; - -std::unordered_map NAMESPACES = { - {"cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties"}, - {"dc", "http://purl.org/dc/elements/1.1/"}, - {"dcterms", "http://purl.org/dc/terms/"}, - {"dcmitype", "http://purl.org/dc/dcmitype/"}, - {"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, - {"vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}, - {"xml", "http://www.w3.org/XML/1998/namespace"} -}; - -} // namespace xlnt diff --git a/include/xlnt/strings.h b/include/xlnt/strings.h deleted file mode 100644 index 03371f69..00000000 --- a/include/xlnt/strings.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -namespace xlnt { - -class style -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/style.h b/include/xlnt/style.h deleted file mode 100644 index 03371f69..00000000 --- a/include/xlnt/style.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -namespace xlnt { - -class style -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/theme.h b/include/xlnt/theme.h deleted file mode 100644 index e69de29b..00000000 diff --git a/include/xlnt/workbook.h b/include/xlnt/workbook.h deleted file mode 100644 index 21d14cd8..00000000 --- a/include/xlnt/workbook.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -#include -#include -#include - -namespace xlnt { - -struct workbook_struct; -class worksheet; - -class workbook -{ -public: - workbook(); - workbook(const workbook &) = delete; - const workbook &operator=(const workbook &) = delete; - - worksheet get_sheet_by_name(const std::string &sheet_name); - worksheet get_active(); - worksheet create_sheet(); - worksheet create_sheet(std::size_t index); - std::vector get_sheet_names() const; - std::vector::iterator begin(); - std::vector::iterator end(); - worksheet operator[](const std::string &name); - void save(const std::string &filename); - -private: - workbook_struct *root_; -}; - -} // namespace xlnt diff --git a/include/xlnt/worksheet.h b/include/xlnt/worksheet.h deleted file mode 100644 index b21bc207..00000000 --- a/include/xlnt/worksheet.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -#include -#include -#include -#include - -namespace xlnt { - -class cell; -class relationship; -class workbook; -struct worksheet_struct; - -typedef std::vector> range; - -class worksheet -{ -public: - enum class Break - { - None = 0, - Row = 1, - Column = 2 - }; - - enum class SheetState - { - Visible, - Hidden, - VeryHidden - }; - - enum class PaperSize - { - Letter = 1, - LetterSmall = 2, - Tabloid = 3, - Ledger = 4, - Legal = 5, - Statement = 6, - Executive = 7, - A3 = 8, - A4 = 9, - A4Small = 10, - A5 = 11 - }; - - enum class Orientation - { - Portrait, - Landscape - }; - - worksheet(workbook &parent_workbook, const std::string &title = ""); - void operator=(const worksheet &other); - cell operator[](const std::string &address); - std::string to_string() const; - workbook &get_parent() const; - void garbage_collect(); - std::set get_cell_collection(); - std::string get_title() const; - void set_title(const std::string &title); - cell get_freeze_panes() const; - void set_freeze_panes(cell top_left_cell); - void set_freeze_panes(const std::string &top_left_coordinate); - void unfreeze_panes(); - xlnt::cell cell(const std::string &coordinate); - xlnt::cell cell(int row, int column); - int get_highest_row() const; - int get_highest_column() const; - std::string calculate_dimension() const; - range range(const std::string &range_string, int row_offset, int column_offset); - relationship create_relationship(const std::string &relationship_type); - //void add_chart(chart chart); - void merge_cells(const std::string &range_string); - void merge_cells(int start_row, int start_column, int end_row, int end_column); - void unmerge_cells(const std::string &range_string); - void unmerge_cells(int start_row, int start_column, int end_row, int end_column); - void append(const std::vector &cells); - void append(const std::unordered_map &cells); - void append(const std::unordered_map &cells); - xlnt::range rows() const; - xlnt::range columns() const; - bool operator==(const worksheet &other); - -private: - worksheet_struct *root_; -}; - -} // namespace xlnt diff --git a/source/excel/cell.cpp b/source/excel/cell.cpp deleted file mode 100644 index 4632218d..00000000 --- a/source/excel/cell.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include - -#include "cell.h" -#include "worksheet.h" - -namespace xlnt { - -struct cell_struct -{ - cell_struct() : type(cell::type::null) - { - - } - - cell_struct(worksheet *ws, const std::string &column, int row) - : type(cell::type::null), parent_worksheet(ws), - column(xlnt::cell::column_index_from_string(column) - 1), row(row) - { - - } - - std::string to_string() const - { - switch(type) - { - case cell::type::numeric: return std::to_string(numeric_value); - case cell::type::boolean: return bool_value ? "true" : "false"; - case cell::type::string: return string_value; - default: throw std::runtime_error("bad enum"); - } - } - - cell::type type; - - union - { - long double numeric_value; - bool bool_value; - }; - - tm date_value; - std::string string_value; - worksheet *parent_worksheet; - int column; - int row; -}; - -cell::cell(const cell ©) -{ - root_ = copy.root_; -} - -coordinate cell::coordinate_from_string(const std::string &address) -{ - if(address == "A1") - { - return {"A", 1}; - } - - return {"A", 1}; -} - -int cell::column_index_from_string(const std::string &column_string) -{ - return column_string[0] - 'A'; -} - -std::string cell::get_column_letter(int column_index) -{ - return std::string(1, (char)('A' + column_index - 1)); -} - -bool cell::is_date() const -{ - return root_->type == type::date; -} - -bool operator==(const char *comparand, const cell &cell) -{ - return std::string(comparand) == cell; -} - -bool operator==(const std::string &comparand, const cell &cell) -{ - return cell.root_->type == cell::type::string && cell.root_->string_value == comparand; -} - -bool operator==(const tm &comparand, const cell &cell) -{ - return cell.root_->type == cell::type::date && cell.root_->date_value.tm_hour == comparand.tm_hour; -} - -std::string cell::absolute_coordinate(const std::string &absolute_address) -{ - return absolute_address; -} - -cell::cell(worksheet &ws, const std::string &column, int row) : root_(new cell_struct(&ws, column, row)) -{ - -} - -cell::cell(worksheet &ws, const std::string &column, int row, const std::string &value) : root_(new cell_struct(&ws, column, row)) -{ - *this = value; -} - -cell::type cell::get_data_type() -{ - return root_->type; -} - -cell &cell::operator=(int value) -{ - root_->type = type::numeric; - root_->numeric_value = value; - return *this; -} - -cell &cell::operator=(double value) -{ - root_->type = type::numeric; - root_->numeric_value = value; - return *this; -} - -cell &cell::operator=(const std::string &value) -{ - root_->type = type::string; - root_->string_value = value; - return *this; -} - -cell &cell::operator=(const char *value) -{ - return *this = std::string(value); -} - -cell &cell::operator=(const tm &value) -{ - root_->type = type::date; - root_->date_value = value; - return *this; -} - -cell::~cell() -{ - delete root_; -} - -std::string cell::to_string() const -{ - return root_->to_string(); -} - -} // namespace xlnt diff --git a/source/excel/workbook.cpp b/source/excel/workbook.cpp deleted file mode 100644 index 75cde6e9..00000000 --- a/source/excel/workbook.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include - -#include "workbook.h" -#include "worksheet.h" -#include "packaging/package.h" - -namespace xlnt { - -struct workbook_struct -{ - workbook_struct(workbook *parent) : parent_(parent) - { - worksheets_.emplace_back(*parent, "Sheet1"); - active_name_ = "Sheet1"; - } - - worksheet get_sheet_by_name(const std::string &name) - { - auto match = std::find_if(worksheets_.begin(), worksheets_.end(), [=](const worksheet &w) { return w.get_title() == name; }); - return *match; - } - - worksheet get_active() - { - return get_sheet_by_name(active_name_); - } - - std::vector::iterator begin() - { - return worksheets_.begin(); - } - - std::vector::iterator end() - { - return worksheets_.end(); - } - - std::vector get_sheet_names() const - { - std::vector names; - for(auto sheet : worksheets_) - { - names.push_back(sheet.get_title()); - } - return names; - } - - worksheet create_sheet() - { - worksheets_.emplace_back(*parent_, "Sheet"); - worksheets_.back().set_title("Sheet" + std::to_string(worksheets_.size())); - return worksheets_.back(); - } - - worksheet create_sheet(std::size_t index) - { - worksheets_.emplace(worksheets_.begin() + index, *parent_, "Sheet"); - worksheets_[index].set_title("Sheet" + std::to_string(worksheets_.size())); - return worksheets_[index]; - } - - void save(const std::string &filename) - { - auto package = package::open(filename); - package.close(); - } - - std::vector worksheets_; - std::string active_name_; - workbook *parent_; -}; - -workbook::workbook() : root_(new workbook_struct(this)) -{ -} - -worksheet workbook::get_sheet_by_name(const std::string &name) -{ - if(root_ == nullptr) - { - throw std::runtime_error("workbook not initialized"); - } - - return root_->get_sheet_by_name(name); -} - -worksheet workbook::get_active() -{ - return root_->get_active(); -} - -worksheet workbook::create_sheet() -{ - return root_->create_sheet(); -} - -worksheet workbook::create_sheet(std::size_t index) -{ - return root_->create_sheet(index); -} - -std::vector::iterator workbook::begin() -{ - return root_->begin(); -} - -std::vector::iterator workbook::end() -{ - return root_->end(); -} - -std::vector workbook::get_sheet_names() const -{ - return root_->get_sheet_names(); -} - -worksheet workbook::operator[](const std::string &name) -{ - return get_sheet_by_name(name); -} - -void workbook::save(const std::string &filename) -{ - root_->save(filename); -} - -} // namespace xlnt diff --git a/source/excel/worksheet.cpp b/source/excel/worksheet.cpp deleted file mode 100644 index d95f58d8..00000000 --- a/source/excel/worksheet.cpp +++ /dev/null @@ -1,380 +0,0 @@ -#include - -#include "worksheet.h" -#include "workbook.h" -#include "cell.h" -#include "packaging/relationship.h" - -namespace xlnt { - -namespace { - -class not_implemented : public std::runtime_error -{ -public: - not_implemented() : std::runtime_error("error: not implemented") - { - - } -}; - -// Convert a column number into a column letter (3 -> 'C') -// Right shift the column col_idx by 26 to find column letters in reverse -// order.These numbers are 1 - based, and can be converted to ASCII -// ordinals by adding 64. -std::string get_column_letter(int column_index) -{ - // these indicies corrospond to A->ZZZ and include all allowed - // columns - if(column_index < 1 || column_index > 18278) - { - auto msg = "Column index out of bounds: " + column_index; - throw std::runtime_error(msg); - } - - auto temp = column_index; - std::string column_letter = ""; - - while(temp > 0) - { - int quotient = temp / 26, remainder = temp % 26; - - // check for exact division and borrow if needed - if(remainder == 0) - { - quotient -= 1; - remainder = 26; - } - - column_letter = std::string(1, char(remainder + 64)) + column_letter; - temp = quotient; - } - - return column_letter; -} - -} - -struct worksheet_struct -{ - worksheet_struct(workbook &parent_workbook, worksheet &owner, const std::string &title) - : parent_(parent_workbook), title_(title), freeze_panes_(owner, "A", 1), owner_(owner) - { - - } - - void garbage_collect() - { - throw not_implemented(); - } - - std::set get_cell_collection() - { - throw not_implemented(); - } - - std::string get_title() const - { - throw not_implemented(); - } - - void set_title(const std::string &title) - { - title_ = title; - } - - cell get_freeze_panes() const - { - throw not_implemented(); - } - - void set_freeze_panes(cell top_left_cell) - { - throw not_implemented(); - } - - void set_freeze_panes(const std::string &top_left_coordinate) - { - freeze_panes_ = cell(top_left_coordinate); - } - - void unfreeze_panes() - { - throw not_implemented(); - } - - xlnt::cell cell(const std::string &coordinate) - { - if(cell_map_.find(coordinate) == cell_map_.end()) - { - auto coord = xlnt::cell::coordinate_from_string(coordinate); - cells_.emplace_back(owner_, coord.column, coord.row); - cell_map_[coordinate] = &cells_.back(); - } - - return *cell_map_[coordinate]; - } - - xlnt::cell cell(int row, int column) - { - return cell(get_column_letter(column + 1) + std::to_string(row + 1)); - } - - int get_highest_row() const - { - throw not_implemented(); - } - - int get_highest_column() const - { - throw not_implemented(); - } - - std::string calculate_dimension() const - { - throw not_implemented(); - } - - range range(const std::string &range_string, int /*row_offset*/, int /*column_offset*/) - { - auto colon_index = range_string.find(':'); - if(colon_index != std::string::npos) - { - auto min_range = range_string.substr(0, colon_index); - auto max_range = range_string.substr(colon_index + 1); - xlnt::range r; - r.push_back(std::vector()); - r[0].push_back(cell(min_range)); - r[0].push_back(cell(max_range)); - return r; - } - throw not_implemented(); - } - - relationship create_relationship(const std::string &relationship_type) - { - relationships_.push_back(relationship(relationship_type)); - return relationships_.back(); - } - - //void add_chart(chart chart); - - void merge_cells(const std::string &/*range_string*/) - { - throw not_implemented(); - } - - void merge_cells(int /*start_row*/, int /*start_column*/, int /*end_row*/, int /*end_column*/) - { - throw not_implemented(); - } - - void unmerge_cells(const std::string &/*range_string*/) - { - throw not_implemented(); - } - - void unmerge_cells(int /*start_row*/, int /*start_column*/, int /*end_row*/, int /*end_column*/) - { - throw not_implemented(); - } - - void append(const std::vector &cells) - { - for(auto cell : cells) - { - *cell_map_["a"] = cell; - } - } - - void append(const std::unordered_map &cells) - { - for(auto cell : cells) - { - *cell_map_[cell.first] = cell.second; - } - } - - void append(const std::unordered_map &cells) - { - for(auto cell : cells) - { - *cell_map_[get_column_letter(cell.first + 1)] = cell.second; - } - } - - xlnt::range rows() const - { - throw not_implemented(); - } - - xlnt::range columns() const - { - throw not_implemented(); - } - - void operator=(const worksheet_struct &other) = delete; - - workbook &parent_; - std::string title_; - xlnt::cell freeze_panes_; - std::vector cells_; - std::unordered_map cell_map_; - std::vector relationships_; - worksheet &owner_; -}; - -worksheet::worksheet(workbook &parent_workbook, const std::string &title) - : root_(nullptr) -{ - root_ = new worksheet_struct(parent_workbook, *this, title); -} - -std::string worksheet::to_string() const -{ - return "title_ + "\">"; -} - -workbook &worksheet::get_parent() const -{ - return root_->parent_; -} - -void worksheet::garbage_collect() -{ - root_->garbage_collect(); -} - -std::set worksheet::get_cell_collection() -{ - return root_->get_cell_collection(); -} - -std::string worksheet::get_title() const -{ - return root_->title_; -} - -void worksheet::set_title(const std::string &title) -{ - root_->title_ = title; -} - -cell worksheet::get_freeze_panes() const -{ - return root_->freeze_panes_; -} - -void worksheet::set_freeze_panes(xlnt::cell top_left_cell) -{ - root_->set_freeze_panes(top_left_cell); -} - -void worksheet::set_freeze_panes(const std::string &top_left_coordinate) -{ - root_->set_freeze_panes(top_left_coordinate); -} - -void worksheet::unfreeze_panes() -{ - root_->unfreeze_panes(); -} - -xlnt::cell worksheet::cell(const std::string &coordinate) -{ - return root_->cell(coordinate); -} - -xlnt::cell worksheet::cell(int row, int column) -{ - return root_->cell(row, column); -} - -int worksheet::get_highest_row() const -{ - return root_->get_highest_row(); -} - -int worksheet::get_highest_column() const -{ - return root_->get_highest_column(); -} - -std::string worksheet::calculate_dimension() const -{ - return root_->calculate_dimension(); -} - -range worksheet::range(const std::string &range_string, int row_offset, int column_offset) -{ - return root_->range(range_string, row_offset, column_offset); -} - -relationship worksheet::create_relationship(const std::string &relationship_type) -{ - return root_->create_relationship(relationship_type); -} - -//void worksheet::add_chart(chart chart); - -void worksheet::merge_cells(const std::string &range_string) -{ - root_->merge_cells(range_string); -} - -void worksheet::merge_cells(int start_row, int start_column, int end_row, int end_column) -{ - root_->merge_cells(start_row, start_column, end_row, end_column); -} - -void worksheet::unmerge_cells(const std::string &range_string) -{ - root_->unmerge_cells(range_string); -} - -void worksheet::unmerge_cells(int start_row, int start_column, int end_row, int end_column) -{ - root_->unmerge_cells(start_row, start_column, end_row, end_column); -} - -void worksheet::append(const std::vector &cells) -{ - root_->append(cells); -} - -void worksheet::append(const std::unordered_map &cells) -{ - root_->append(cells); -} - -void worksheet::append(const std::unordered_map &cells) -{ - root_->append(cells); -} - -xlnt::range worksheet::rows() const -{ - return root_->rows(); -} - -xlnt::range worksheet::columns() const -{ - return root_->columns(); -} - -bool worksheet::operator==(const worksheet &other) -{ - return root_ == other.root_; -} - -void worksheet::operator=(const worksheet &other) -{ - root_ = other.root_; -} - -cell worksheet::operator[](const std::string &address) -{ - return cell(address); -} - -} // namespace xlnt diff --git a/source/misc/color.cpp b/source/misc/color.cpp deleted file mode 100644 index bb50a63e..00000000 --- a/source/misc/color.cpp +++ /dev/null @@ -1,502 +0,0 @@ -#include -#include -#include -#include - -#include "color.h" -#include "enum_iterator.h" - -namespace xlnt { - -const color color::AliceBlue = color::from_argb(255, 240, 248, 255); -const color color::AntiqueWhite = color::from_argb(255, 250, 235, 215); -const color color::Aqua = color::from_argb(255, 0, 255, 255); -const color color::Aquamarine = color::from_argb(255, 127, 255, 212); -const color color::Azure = color::from_argb(255, 240, 255, 255); -const color color::Beige = color::from_argb(255, 245, 245, 220); -const color color::Bisque = color::from_argb(255, 255, 228, 196); -const color color::Black = color::from_argb(255, 0, 0, 0); -const color color::BlanchedAlmond = color::from_argb(255, 255, 235, 205); -const color color::Blue = color::from_argb(255, 0, 0, 255); -const color color::BlueViolet = color::from_argb(255, 138, 43, 226); -const color color::Brown = color::from_argb(255, 165, 42, 42); -const color color::BurlyWood = color::from_argb(255, 222, 184, 135); -const color color::CadetBlue = color::from_argb(255, 95, 158, 160); -const color color::Chartreuse = color::from_argb(255, 127, 255, 0); -const color color::Chocolate = color::from_argb(255, 210, 105, 30); -const color color::Coral = color::from_argb(255, 255, 127, 80); -const color color::CornflowerBlue = color::from_argb(255, 100, 149, 237); -const color color::Cornsilk = color::from_argb(255, 255, 248, 220); -const color color::Crimson = color::from_argb(255, 220, 20, 60); -const color color::Cyan = color::from_argb(255, 0, 255, 255); -const color color::DarkBlue = color::from_argb(255, 0, 0, 139); -const color color::DarkCyan = color::from_argb(255, 0, 139, 139); -const color color::DarkGoldenrod = color::from_argb(255, 184, 134, 11); -const color color::DarkGray = color::from_argb(255, 169, 169, 169); -const color color::DarkGreen = color::from_argb(255, 0, 100, 0); -const color color::DarkKhaki = color::from_argb(255, 189, 183, 107); -const color color::DarkMagenta = color::from_argb(255, 139, 0, 139); -const color color::DarkOliveGreen = color::from_argb(255, 85, 107, 47); -const color color::DarkOrange = color::from_argb(255, 255, 140, 0); -const color color::DarkOrchid = color::from_argb(255, 153, 50, 204); -const color color::DarkRed = color::from_argb(255, 139, 0, 0); -const color color::DarkSalmon = color::from_argb(255, 233, 150, 122); -const color color::DarkSeaGreen = color::from_argb(255, 143, 188, 143); -const color color::DarkSlateBlue = color::from_argb(255, 72, 61, 139); -const color color::DarkSlateGray = color::from_argb(255, 47, 79, 79); -const color color::DarkTurquoise = color::from_argb(255, 0, 206, 209); -const color color::DarkViolet = color::from_argb(255, 148, 0, 211); -const color color::DeepPink = color::from_argb(255, 255, 20, 147); -const color color::DeepSkyBlue = color::from_argb(255, 0, 191, 255); -const color color::DimGray = color::from_argb(255, 105, 105, 105); -const color color::DodgerBlue = color::from_argb(255, 30, 144, 255); -const color color::Firebrick = color::from_argb(255, 178, 34, 34); -const color color::FloralWhite = color::from_argb(255, 255, 250, 240); -const color color::ForestGreen = color::from_argb(255, 34, 139, 34); -const color color::Fuchsia = color::from_argb(255, 255, 0, 255); -const color color::Gainsboro = color::from_argb(255, 220, 220, 220); -const color color::GhostWhite = color::from_argb(255, 248, 248, 255); -const color color::Gold = color::from_argb(255, 255, 215, 0); -const color color::Goldenrod = color::from_argb(255, 218, 165, 32); -const color color::Gray = color::from_argb(255, 128, 128, 128); -const color color::Green = color::from_argb(255, 0, 128, 0); -const color color::GreenYellow = color::from_argb(255, 173, 255, 47); -const color color::Honeydew = color::from_argb(255, 240, 255, 240); -const color color::HotPink = color::from_argb(255, 255, 105, 180); -const color color::IndianRed = color::from_argb(255, 205, 92, 92); -const color color::Indigo = color::from_argb(255, 75, 0, 130); -const color color::Ivory = color::from_argb(255, 255, 255, 240); -const color color::Khaki = color::from_argb(255, 240, 230, 140); -const color color::Lavender = color::from_argb(255, 230, 230, 250); -const color color::LavenderBlush = color::from_argb(255, 255, 240, 245); -const color color::LawnGreen = color::from_argb(255, 124, 252, 0); -const color color::LemonChiffon = color::from_argb(255, 255, 250, 205); -const color color::LightBlue = color::from_argb(255, 173, 216, 230); -const color color::LightCoral = color::from_argb(255, 240, 128, 128); -const color color::LightCyan = color::from_argb(255, 224, 255, 255); -const color color::LightGoldenrodYellow = color::from_argb(255, 250, 250, 210); -const color color::LightGray = color::from_argb(255, 211, 211, 211); -const color color::LightGreen = color::from_argb(255, 144, 238, 144); -const color color::LightPink = color::from_argb(255, 255, 182, 193); -const color color::LightSalmon = color::from_argb(255, 255, 160, 122); -const color color::LightSeaGreen = color::from_argb(255, 32, 178, 170); -const color color::LightSkyBlue = color::from_argb(255, 135, 206, 250); -const color color::LightSlateGray = color::from_argb(255, 119, 136, 153); -const color color::LightSteelBlue = color::from_argb(255, 176, 196, 222); -const color color::LightYellow = color::from_argb(255, 255, 255, 224); -const color color::Lime = color::from_argb(255, 0, 255, 0); -const color color::LimeGreen = color::from_argb(255, 50, 205, 50); -const color color::Linen = color::from_argb(255, 250, 240, 230); -const color color::Magenta = color::from_argb(255, 255, 0, 255); -const color color::Maroon = color::from_argb(255, 128, 0, 0); -const color color::MediumAquamarine = color::from_argb(255, 102, 205, 170); -const color color::MediumBlue = color::from_argb(255, 0, 0, 205); -const color color::MediumOrchid = color::from_argb(255, 186, 85, 211); -const color color::MediumPurple = color::from_argb(255, 147, 112, 219); -const color color::MediumSeaGreen = color::from_argb(255, 60, 179, 113); -const color color::MediumSlateBlue = color::from_argb(255, 123, 104, 238); -const color color::MediumSpringGreen = color::from_argb(255, 0, 250, 154); -const color color::MediumTurquoise = color::from_argb(255, 72, 209, 204); -const color color::MediumVioletRed = color::from_argb(255, 199, 21, 133); -const color color::MidnightBlue = color::from_argb(255, 25, 25, 112); -const color color::MintCream = color::from_argb(255, 245, 255, 250); -const color color::MistyRose = color::from_argb(255, 255, 228, 225); -const color color::Moccasin = color::from_argb(255, 255, 228, 181); -const color color::NavajoWhite = color::from_argb(255, 255, 222, 173); -const color color::Navy = color::from_argb(255, 0, 0, 128); -const color color::OldLace = color::from_argb(255, 253, 245, 230); -const color color::Olive = color::from_argb(255, 128, 128, 0); -const color color::OliveDrab = color::from_argb(255, 107, 142, 35); -const color color::Orange = color::from_argb(255, 255, 165, 0); -const color color::OrangeRed = color::from_argb(255, 255, 69, 0); -const color color::Orchid = color::from_argb(255, 218, 112, 214); -const color color::PaleGoldenrod = color::from_argb(255, 238, 232, 170); -const color color::PaleGreen = color::from_argb(255, 152, 251, 152); -const color color::PaleTurquoise = color::from_argb(255, 175, 238, 238); -const color color::PaleVioletRed = color::from_argb(255, 219, 112, 147); -const color color::PapayaWhip = color::from_argb(255, 255, 239, 213); -const color color::PeachPuff = color::from_argb(255, 255, 218, 185); -const color color::Peru = color::from_argb(255, 205, 133, 63); -const color color::Pink = color::from_argb(255, 255, 192, 203); -const color color::Plum = color::from_argb(255, 221, 160, 221); -const color color::PowderBlue = color::from_argb(255, 176, 224, 230); -const color color::Purple = color::from_argb(255, 128, 0, 128); -const color color::Red = color::from_argb(255, 255, 0, 0); -const color color::RosyBrown = color::from_argb(255, 188, 143, 143); -const color color::RoyalBlue = color::from_argb(255, 65, 105, 225); -const color color::SaddleBrown = color::from_argb(255, 139, 69, 19); -const color color::Salmon = color::from_argb(255, 250, 128, 114); -const color color::SandyBrown = color::from_argb(255, 244, 164, 96); -const color color::SeaGreen = color::from_argb(255, 46, 139, 87); -const color color::SeaShell = color::from_argb(255, 255, 245, 238); -const color color::Sienna = color::from_argb(255, 160, 82, 45); -const color color::Silver = color::from_argb(255, 192, 192, 192); -const color color::SkyBlue = color::from_argb(255, 135, 206, 235); -const color color::SlateBlue = color::from_argb(255, 106, 90, 205); -const color color::SlateGray = color::from_argb(255, 112, 128, 144); -const color color::Snow = color::from_argb(255, 255, 250, 250); -const color color::SpringGreen = color::from_argb(255, 0, 255, 127); -const color color::SteelBlue = color::from_argb(255, 70, 130, 180); -const color color::Tan = color::from_argb(255, 210, 180, 140); -const color color::Teal = color::from_argb(255, 0, 128, 128); -const color color::Thistle = color::from_argb(255, 216, 191, 216); -const color color::Tomato = color::from_argb(255, 255, 99, 71); -const color color::Transparent = color::from_argb(0, 0, 0, 0); -const color color::Turquoise = color::from_argb(255, 64, 224, 208); -const color color::Violet = color::from_argb(255, 238, 130, 238); -const color color::Wheat = color::from_argb(255, 245, 222, 179); -const color color::White = color::from_argb(255, 255, 255, 255); -const color color::WhiteSmoke = color::from_argb(255, 245, 245, 245); -const color color::Yellow = color::from_argb(255, 255, 255, 0); -const color color::YellowGreen = color::from_argb(255, 154, 205, 50); -const color color::Empty; - -color color::from_argb(uint32_t argb) -{ - return color(uint8_t(argb >> 24), uint8_t(argb >> 16), uint8_t(argb >> 8), uint8_t(argb)); -} - -color color::from_argb(uint8_t alpha, color base) -{ - return color(alpha, base.red_, base.green_, base.blue_); -} - -color color::from_argb(uint8_t r, uint8_t g, uint8_t b) -{ - return color(255, r, g, b); -} - -color color::from_argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) -{ - return color(a, r, g, b); -} - -color color::from_known_color(known_color color) -{ - switch(color) - { - case known_color::AliceBlue: return AliceBlue; - case known_color::AntiqueWhite: return AntiqueWhite; - case known_color::Aqua: return Aqua; - case known_color::Aquamarine: return Aquamarine; - case known_color::Azure: return Azure; - case known_color::Beige: return Beige; - case known_color::Bisque: return Bisque; - case known_color::Black: return Black; - case known_color::BlanchedAlmond: return BlanchedAlmond; - case known_color::Blue: return Blue; - case known_color::BlueViolet: return BlueViolet; - case known_color::Brown: return Brown; - case known_color::BurlyWood: return BurlyWood; - case known_color::CadetBlue: return CadetBlue; - case known_color::Chartreuse: return Chartreuse; - case known_color::Chocolate: return Chocolate; - case known_color::Coral: return Coral; - case known_color::CornflowerBlue: return CornflowerBlue; - case known_color::Cornsilk: return Cornsilk; - case known_color::Crimson: return Crimson; - case known_color::Cyan: return Cyan; - case known_color::DarkBlue: return DarkBlue; - case known_color::DarkCyan: return DarkCyan; - case known_color::DarkGoldenrod: return DarkGoldenrod; - case known_color::DarkGray: return DarkGray; - case known_color::DarkGreen: return DarkGreen; - case known_color::DarkKhaki: return DarkKhaki; - case known_color::DarkMagenta: return DarkMagenta; - case known_color::DarkOliveGreen: return DarkOliveGreen; - case known_color::DarkOrange: return DarkOrange; - case known_color::DarkOrchid: return DarkOrchid; - case known_color::DarkRed: return DarkRed; - case known_color::DarkSalmon: return DarkSalmon; - case known_color::DarkSeaGreen: return DarkSeaGreen; - case known_color::DarkSlateBlue: return DarkSlateBlue; - case known_color::DarkSlateGray: return DarkSlateGray; - case known_color::DarkTurquoise: return DarkTurquoise; - case known_color::DarkViolet: return DarkViolet; - case known_color::DeepPink: return DeepPink; - case known_color::DeepSkyBlue: return DeepSkyBlue; - case known_color::DimGray: return DimGray; - case known_color::DodgerBlue: return DodgerBlue; - case known_color::Firebrick: return Firebrick; - case known_color::FloralWhite: return FloralWhite; - case known_color::ForestGreen: return ForestGreen; - case known_color::Fuchsia: return Fuchsia; - case known_color::Gainsboro: return Gainsboro; - case known_color::GhostWhite: return GhostWhite; - case known_color::Gold: return Gold; - case known_color::Goldenrod: return Goldenrod; - case known_color::Gray: return Gray; - case known_color::Green: return Green; - case known_color::GreenYellow: return GreenYellow; - case known_color::Honeydew: return Honeydew; - case known_color::HotPink: return HotPink; - case known_color::IndianRed: return IndianRed; - case known_color::Indigo: return Indigo; - case known_color::Ivory: return Ivory; - case known_color::Khaki: return Khaki; - case known_color::Lavender: return Lavender; - case known_color::LavenderBlush: return LavenderBlush; - case known_color::LawnGreen: return LawnGreen; - case known_color::LemonChiffon: return LemonChiffon; - case known_color::LightBlue: return LightBlue; - case known_color::LightCoral: return LightCoral; - case known_color::LightCyan: return LightCyan; - case known_color::LightGoldenrodYellow: return LightGoldenrodYellow; - case known_color::LightGray: return LightGray; - case known_color::LightGreen: return LightGreen; - case known_color::LightPink: return LightPink; - case known_color::LightSalmon: return LightSalmon; - case known_color::LightSeaGreen: return LightSeaGreen; - case known_color::LightSkyBlue: return LightSkyBlue; - case known_color::LightSlateGray: return LightSlateGray; - case known_color::LightSteelBlue: return LightSteelBlue; - case known_color::LightYellow: return LightYellow; - case known_color::Lime: return Lime; - case known_color::LimeGreen: return LimeGreen; - case known_color::Linen: return Linen; - case known_color::Magenta: return Magenta; - case known_color::Maroon: return Maroon; - case known_color::MediumAquamarine: return MediumAquamarine; - case known_color::MediumBlue: return MediumBlue; - case known_color::MediumOrchid: return MediumOrchid; - case known_color::MediumPurple: return MediumPurple; - case known_color::MediumSeaGreen: return MediumSeaGreen; - case known_color::MediumSlateBlue: return MediumSlateBlue; - case known_color::MediumSpringGreen: return MediumSpringGreen; - case known_color::MediumTurquoise: return MediumTurquoise; - case known_color::MediumVioletRed: return MediumVioletRed; - case known_color::MidnightBlue: return MidnightBlue; - case known_color::MintCream: return MintCream; - case known_color::MistyRose: return MistyRose; - case known_color::Moccasin: return Moccasin; - case known_color::NavajoWhite: return NavajoWhite; - case known_color::Navy: return Navy; - case known_color::OldLace: return OldLace; - case known_color::Olive: return Olive; - case known_color::OliveDrab: return OliveDrab; - case known_color::Orange: return Orange; - case known_color::OrangeRed: return OrangeRed; - case known_color::Orchid: return Orchid; - case known_color::PaleGoldenrod: return PaleGoldenrod; - case known_color::PaleGreen: return PaleGreen; - case known_color::PaleTurquoise: return PaleTurquoise; - case known_color::PaleVioletRed: return PaleVioletRed; - case known_color::PapayaWhip: return PapayaWhip; - case known_color::PeachPuff: return PeachPuff; - case known_color::Peru: return Peru; - case known_color::Pink: return Pink; - case known_color::Plum: return Plum; - case known_color::PowderBlue: return PowderBlue; - case known_color::Purple: return Purple; - case known_color::Red: return Red; - case known_color::RosyBrown: return RosyBrown; - case known_color::RoyalBlue: return RoyalBlue; - case known_color::SaddleBrown: return SaddleBrown; - case known_color::Salmon: return Salmon; - case known_color::SandyBrown: return SandyBrown; - case known_color::SeaGreen: return SeaGreen; - case known_color::SeaShell: return SeaShell; - case known_color::Sienna: return Sienna; - case known_color::Silver: return Silver; - case known_color::SkyBlue: return SkyBlue; - case known_color::SlateBlue: return SlateBlue; - case known_color::SlateGray: return SlateGray; - case known_color::Snow: return Snow; - case known_color::SpringGreen: return SpringGreen; - case known_color::SteelBlue: return SteelBlue; - case known_color::Tan: return Tan; - case known_color::Teal: return Teal; - case known_color::Thistle: return Thistle; - case known_color::Tomato: return Tomato; - case known_color::Turquoise: return Turquoise; - case known_color::Violet: return Violet; - case known_color::Wheat: return Wheat; - case known_color::White: return White; - case known_color::WhiteSmoke: return WhiteSmoke; - case known_color::Yellow: return Yellow; - case known_color::YellowGreen: return YellowGreen; - } - throw std::runtime_error("unknown known_color"); -} - -color color::from_name(const std::string &name) -{ - for(auto current_color : enum_iterator()) - { - if(to_string(current_color) == name) - { - return from_known_color(current_color); - } - } - return Empty; -} - -bool color::equals(color b) const -{ - if(is_empty_) - { - return b.is_empty_; - } - - return !b.is_empty_ && alpha_ == b.alpha_ && red_ == b.red_ && green_ == b.green_ && blue_ == b.blue_; -} - -struct hsv -{ - float h; - float s; - float v; -}; - -hsv RGBtoHSV(float red, float green, float blue) -{ - hsv r; - float min = std::min({red, green, blue}); - float max = std::max({red, green, blue}); - r.v = max; // v - float delta = max - min; - if(max != 0) - { - r.s = delta / max; // s - } - else - { - // r = g = b = 0 // s = 0, v is undefined - r.s = 0; - r.h = -1; - return r; - } - if(red == max) - { - r.h = (green - blue) / delta; // between yellow & magenta - } - else if(green == max) - { - r.h = 2 + (blue - red) / delta; // between cyan & yellow - } - else - { - r.h = 4 + (red - green) / delta; // between magenta & cyan - } - r.h *= 60; // degrees - if(r.h < 0) - { - r.h += 360; - } - return r; -} - -float color::get_brightness() const -{ - return RGBtoHSV(red_, green_, blue_).v; -} - -float color::get_hue() const -{ - return RGBtoHSV(red_, green_, blue_).h; -} - -float color::getsaturation() const -{ - return RGBtoHSV(red_, green_, blue_).s; -} - -bool color::is_known_color() const -{ - try - { - to_known_color(); - return true; - } - catch(...) - { - return false; - } -} - -bool color::is_system_color() const -{ - static const std::vector system_colors = { - known_color::ActiveBorder, - known_color::ActiveCaption, - known_color::ActiveCaptionText, - known_color::AppWorkspace, - known_color::ButtonFace, - known_color::ButtonHighlight, - known_color::ButtonShadow, - known_color::Control, - known_color::ControlDark, - known_color::ControlDarkDark, - known_color::ControlLight, - known_color::ControlLightLight, - known_color::ControlText, - known_color::Desktop, - known_color::GradientActiveCaption, - known_color::GradientInactiveCaption, - known_color::GrayText, - known_color::Highlight, - known_color::HighlightText, - known_color::HotTrack, - known_color::InactiveBorder, - known_color::InactiveCaption, - known_color::InactiveCaptionText, - known_color::Info, - known_color::InfoText, - known_color::Menu, - known_color::MenuBar, - known_color::MenuHighlight, - known_color::MenuText, - known_color::ScrollBar, - known_color::Window, - known_color::WindowFrame, - known_color::WindowText - }; - - try - { - return std::find(system_colors.begin(), system_colors.end(), to_known_color()) != system_colors.end(); - } - catch(...) - { - return false; - } -} - -uint32_t color::to_argb() const -{ - uint32_t argb = alpha_; - argb = argb << 8 | red_; - argb = argb << 8 | green_; - argb = argb << 8 | blue_; - return argb; -} - -known_color color::to_known_color() const -{ - for(auto current_color : enum_iterator()) - { - if(from_known_color(current_color) == *this) - { - return current_color; - } - } - - return known_color::Unknown; -} - -std::string color::get_name() const -{ - try - { - return to_string(to_known_color()); - } - catch(...) - { - std::stringstream stream; - stream << "#" << std::setfill('0') << std::setw(2) << std::hex; - stream << alpha_ << red_ << green_ << blue_; - return stream.str(); - } -} - -} // namespace xlnt diff --git a/source/misc/color.h b/source/misc/color.h deleted file mode 100644 index 39a788f8..00000000 --- a/source/misc/color.h +++ /dev/null @@ -1,1511 +0,0 @@ -#pragma once - -#include -#include "enum_iterator.h" - -namespace xlnt { - -enum class known_color -{ - /// - /// This is returned when a color isn't known. - /// - Unknown = 0, - /// - /// The system-defined color of the active window's border. - /// - ActiveBorder, - /// - /// The system-defined color of the background of the active window's title bar. - /// - ActiveCaption, - /// - /// The system-defined color of the text in the active window's title bar. - /// - ActiveCaptionText, - /// - /// A system-defined color. - /// - AliceBlue, - /// - /// A system-defined color. - /// - AntiqueWhite, - /// - /// The system-defined color of the application workspace. The application workspace is the area in a multiple-document view that is not being occupied by documents. - /// - AppWorkspace, - /// - /// A system-defined color. - /// - Aqua, - /// - /// A system-defined color. - /// - Aquamarine, - /// - /// A system-defined color. - /// - Azure, - /// - /// A system-defined color. - /// - Beige, - /// - /// A system-defined color. - /// - Bisque, - /// - /// A system-defined color. - /// - Black, - /// - /// A system-defined color. - /// - BlanchedAlmond, - /// - /// A system-defined color. - /// - Blue, - /// - /// A system-defined color. - /// - BlueViolet, - /// - /// A system-defined color. - /// - Brown, - /// - /// A system-defined color. - /// - BurlyWood, - /// - /// The system-defined face color of a 3-D element. - /// - ButtonFace, - /// - /// The system-defined color that is the highlight color of a 3-D element. This color is applied to parts of a 3-D element that face the light source. - /// - ButtonHighlight, - /// - /// The system-defined color that is the shadow color of a 3-D element. This color is applied to parts of a 3-D element that face away from the light source. - /// - ButtonShadow, - /// - /// A system-defined color. - /// - CadetBlue, - /// - /// A system-defined color. - /// - Chartreuse, - /// - /// A system-defined color. - /// - Chocolate, - /// - /// The system-defined face color of a 3-D element. - /// - Control, - /// - /// The system-defined shadow color of a 3-D element. The shadow color is applied to parts of a 3-D element that face away from the light source. - /// - ControlDark, - /// - /// The system-defined color that is the dark shadow color of a 3-D element. The dark shadow color is applied to the parts of a 3-D element that are the darkest color. - /// - ControlDarkDark, - /// - /// The system-defined color that is the light color of a 3-D element. The light color is applied to parts of a 3-D element that face the light source. - /// - ControlLight, - /// - /// The system-defined highlight color of a 3-D element. The highlight color is applied to the parts of a 3-D element that are the lightest color. - /// - ControlLightLight, - /// - /// The system-defined color of text in a 3-D element. - /// - ControlText, - /// - /// A system-defined color. - /// - Coral, - /// - /// A system-defined color. - /// - CornflowerBlue, - /// - /// A system-defined color. - /// - Cornsilk, - /// - /// A system-defined color. - /// - Crimson, - /// - /// A system-defined color. - /// - Cyan, - /// - /// A system-defined color. - /// - DarkBlue, - /// - /// A system-defined color. - /// - DarkCyan, - /// - /// A system-defined color. - /// - DarkGoldenrod, - /// - /// A system-defined color. - /// - DarkGray, - /// - /// A system-defined color. - /// - DarkGreen, - /// - /// A system-defined color. - /// - DarkKhaki, - /// - /// A system-defined color. - /// - DarkMagenta, - /// - /// A system-defined color. - /// - DarkOliveGreen, - /// - /// A system-defined color. - /// - DarkOrange, - /// - /// A system-defined color. - /// - DarkOrchid, - /// - /// A system-defined color. - /// - DarkRed, - /// - /// A system-defined color. - /// - DarkSalmon, - /// - /// A system-defined color. - /// - DarkSeaGreen, - /// - /// A system-defined color. - /// - DarkSlateBlue, - /// - /// A system-defined color. - /// - DarkSlateGray, - /// - /// A system-defined color. - /// - DarkTurquoise, - /// - /// A system-defined color. - /// - DarkViolet, - /// - /// A system-defined color. - /// - DeepPink, - /// - /// A system-defined color. - /// - DeepSkyBlue, - /// - /// The system-defined color of the desktop. - /// - Desktop, - /// - /// A system-defined color. - /// - DimGray, - /// - /// A system-defined color. - /// - DodgerBlue, - /// - /// A system-defined color. - /// - Firebrick, - /// - /// A system-defined color. - /// - FloralWhite, - /// - /// A system-defined color. - /// - ForestGreen, - /// - /// A system-defined color. - /// - Fuchsia, - /// - /// A system-defined color. - /// - Gainsboro, - /// - /// A system-defined color. - /// - GhostWhite, - /// - /// A system-defined color. - /// - Gold, - /// - /// A system-defined color. - /// - Goldenrod, - /// - /// The system-defined color of the lightest color in the color gradient of an active window's title bar. - /// - GradientActiveCaption, - /// - /// The system-defined color of the lightest color in the color gradient of an inactive window's title bar. - /// - GradientInactiveCaption, - /// - /// A system-defined color. - /// - Gray, - /// - /// The system-defined color of dimmed text. Items in a list that are disabled are displayed in dimmed text. - /// - GrayText, - /// - /// A system-defined color. - /// - Green, - /// - /// A system-defined color. - /// - GreenYellow, - /// - /// The system-defined color of the background of selected items. This includes selected menu items as well as selected text. - /// - Highlight, - /// - /// The system-defined color of the text of selected items. - /// - HighlightText, - /// - /// A system-defined color. - /// - Honeydew, - /// - /// A system-defined color. - /// - HotPink, - /// - /// The system-defined color used to designate a hot-tracked item. Single-clicking a hot-tracked item executes the item. - /// - HotTrack, - /// - /// The system-defined color of an inactive window's border. - /// - InactiveBorder, - /// - /// The system-defined color of the background of an inactive window's title bar. - /// - InactiveCaption, - /// - /// The system-defined color of the text in an inactive window's title bar. - /// - InactiveCaptionText, - /// - /// A system-defined color. - /// - IndianRed, - /// - /// A system-defined color. - /// - Indigo, - /// - /// The system-defined color of the background of a ToolTip. - /// - Info, - /// - /// The system-defined color of the text of a ToolTip. - /// - InfoText, - /// - /// A system-defined color. - /// - Ivory, - /// - /// A system-defined color. - /// - Khaki, - /// - /// A system-defined color. - /// - Lavender, - /// - /// A system-defined color. - /// - LavenderBlush, - /// - /// A system-defined color. - /// - LawnGreen, - /// - /// A system-defined color. - /// - LemonChiffon, - /// - /// A system-defined color. - /// - LightBlue, - /// - /// A system-defined color. - /// - LightCoral, - /// - /// A system-defined color. - /// - LightCyan, - /// - /// A system-defined color. - /// - LightGoldenrodYellow, - /// - /// A system-defined color. - /// - LightGray, - /// - /// A system-defined color. - /// - LightGreen, - /// - /// A system-defined color. - /// - LightPink, - /// - /// A system-defined color. - /// - LightSalmon, - /// - /// A system-defined color. - /// - LightSeaGreen, - /// - /// A system-defined color. - /// - LightSkyBlue, - /// - /// A system-defined color. - /// - LightSlateGray, - /// - /// A system-defined color. - /// - LightSteelBlue, - /// - /// A system-defined color. - /// - LightYellow, - /// - /// A system-defined color. - /// - Lime, - /// - /// A system-defined color. - /// - LimeGreen, - /// - /// A system-defined color. - /// - Linen, - /// - /// A system-defined color. - /// - Magenta, - /// - /// A system-defined color. - /// - Maroon, - /// - /// A system-defined color. - /// - MediumAquamarine, - /// - /// A system-defined color. - /// - MediumBlue, - /// - /// A system-defined color. - /// - MediumOrchid, - /// - /// A system-defined color. - /// - MediumPurple, - /// - /// A system-defined color. - /// - MediumSeaGreen, - /// - /// A system-defined color. - /// - MediumSlateBlue, - /// - /// A system-defined color. - /// - MediumSpringGreen, - /// - /// A system-defined color. - /// - MediumTurquoise, - /// - /// A system-defined color. - /// - MediumVioletRed, - /// - /// The system-defined color of a menu's background. - /// - Menu, - /// - /// The system-defined color of the background of a menu bar. - /// - MenuBar, - /// - /// The system-defined color used to highlight menu items when the menu appears as a flat menu. - /// - MenuHighlight, - /// - /// The system-defined color of a menu's text. - /// - MenuText, - /// - /// A system-defined color. - /// - MidnightBlue, - /// - /// A system-defined color. - /// - MintCream, - /// - /// A system-defined color. - /// - MistyRose, - /// - /// A system-defined color. - /// - Moccasin, - /// - /// A system-defined color. - /// - NavajoWhite, - /// - /// A system-defined color. - /// - Navy, - /// - /// A system-defined color. - /// - OldLace, - /// - /// A system-defined color. - /// - Olive, - /// - /// A system-defined color. - /// - OliveDrab, - /// - /// A system-defined color. - /// - Orange, - /// - /// A system-defined color. - /// - OrangeRed, - /// - /// A system-defined color. - /// - Orchid, - /// - /// A system-defined color. - /// - PaleGoldenrod, - /// - /// A system-defined color. - /// - PaleGreen, - /// - /// A system-defined color. - /// - PaleTurquoise, - /// - /// A system-defined color. - /// - PaleVioletRed, - /// - /// A system-defined color. - /// - PapayaWhip, - /// - /// A system-defined color. - /// - PeachPuff, - /// - /// A system-defined color. - /// - Peru, - /// - /// A system-defined color. - /// - Pink, - /// - /// A system-defined color. - /// - Plum, - /// - /// A system-defined color. - /// - PowderBlue, - /// - /// A system-defined color. - /// - Purple, - /// - /// A system-defined color. - /// - Red, - /// - /// A system-defined color. - /// - RosyBrown, - /// - /// A system-defined color. - /// - RoyalBlue, - /// - /// A system-defined color. - /// - SaddleBrown, - /// - /// A system-defined color. - /// - Salmon, - /// - /// A system-defined color. - /// - SandyBrown, - /// - /// The system-defined color of the background of a scroll bar. - /// - ScrollBar, - /// - /// A system-defined color. - /// - SeaGreen, - /// - /// A system-defined color. - /// - SeaShell, - /// - /// A system-defined color. - /// - Sienna, - /// - /// A system-defined color. - /// - Silver, - /// - /// A system-defined color. - /// - SkyBlue, - /// - /// A system-defined color. - /// - SlateBlue, - /// - /// A system-defined color. - /// - SlateGray, - /// - /// A system-defined color. - /// - Snow, - /// - /// A system-defined color. - /// - SpringGreen, - /// - /// A system-defined color. - /// - SteelBlue, - /// - /// A system-defined color. - /// - Tan, - /// - /// A system-defined color. - /// - Teal, - /// - /// A system-defined color. - /// - Thistle, - /// - /// A system-defined color. - /// - Tomato, - /// - /// A system-defined color. - /// - Transparent, - /// - /// A system-defined color. - /// - Turquoise, - /// - /// A system-defined color. - /// - Violet, - /// - /// A system-defined color. - /// - Wheat, - /// - /// A system-defined color. - /// - White, - /// - /// A system-defined color. - /// - WhiteSmoke, - /// - /// The system-defined color of the background in the client area of a window. - /// - Window, - /// - /// The system-defined color of a window frame. - /// - WindowFrame, - /// - /// The system-defined color of the text in the client area of a window. - /// - WindowText, - /// - /// A system-defined color. - /// - Yellow, - /// - /// A system-defined color. - /// - YellowGreen, - Last, - First = ActiveBorder -}; - -inline std::string to_string(known_color color) -{ - switch(color) - { - case known_color::ActiveBorder: return "ActiveBorder"; - case known_color::ActiveCaption: return "ActiveCaption"; - case known_color::ActiveCaptionText: return "ActiveCaptionText"; - case known_color::AliceBlue: return "AliceBlue"; - case known_color::AntiqueWhite: return "AntiqueWhite"; - case known_color::AppWorkspace: return "AppWorkspace"; - case known_color::Aqua: return "Aqua"; - case known_color::Aquamarine: return "Aquamarine"; - case known_color::Azure: return "Azure"; - case known_color::Beige: return "Beige"; - case known_color::Bisque: return "Bisque"; - case known_color::Black: return "Black"; - case known_color::BlanchedAlmond: return "BlanchedAlmond"; - case known_color::Blue: return "Blue"; - case known_color::BlueViolet: return "BlueViolet"; - case known_color::Brown: return "Brown"; - case known_color::BurlyWood: return "BurlyWood"; - case known_color::ButtonFace: return "ButtonFace"; - case known_color::ButtonHighlight: return "ButtonHighlight"; - case known_color::ButtonShadow: return "ButtonShadow"; - case known_color::CadetBlue: return "CadetBlue"; - case known_color::Chartreuse: return "Chartreuse"; - case known_color::Chocolate: return "Chocolate"; - case known_color::Control: return "Control"; - case known_color::ControlDark: return "ControlDark"; - case known_color::ControlDarkDark: return "ControlDarkDark"; - case known_color::ControlLight: return "ControlLight"; - case known_color::ControlLightLight: return "ControlLightLight"; - case known_color::ControlText: return "ControlText"; - case known_color::Coral: return "Coral"; - case known_color::CornflowerBlue: return "CornflowerBlue"; - case known_color::Cornsilk: return "Cornsilk"; - case known_color::Crimson: return "Crimson"; - case known_color::Cyan: return "Cyan"; - case known_color::DarkBlue: return "DarkBlue"; - case known_color::DarkCyan: return "DarkCyan"; - case known_color::DarkGoldenrod: return "DarkGoldenrod"; - case known_color::DarkGray: return "DarkGray"; - case known_color::DarkGreen: return "DarkGreen"; - case known_color::DarkKhaki: return "DarkKhaki"; - case known_color::DarkMagenta: return "DarkMagenta"; - case known_color::DarkOliveGreen: return "DarkOliveGreen"; - case known_color::DarkOrange: return "DarkOrange"; - case known_color::DarkOrchid: return "DarkOrchid"; - case known_color::DarkRed: return "DarkRed"; - case known_color::DarkSalmon: return "DarkSalmon"; - case known_color::DarkSeaGreen: return "DarkSeaGreen"; - case known_color::DarkSlateBlue: return "DarkSlateBlue"; - case known_color::DarkSlateGray: return "DarkSlateGray"; - case known_color::DarkTurquoise: return "DarkTurquoise"; - case known_color::DarkViolet: return "DarkViolet"; - case known_color::DeepPink: return "DeepPink"; - case known_color::DeepSkyBlue: return "DeepSkyBlue"; - case known_color::Desktop: return "Desktop"; - case known_color::DimGray: return "DimGray"; - case known_color::DodgerBlue: return "DodgerBlue"; - case known_color::Firebrick: return "Firebrick"; - case known_color::FloralWhite: return "FloralWhite"; - case known_color::ForestGreen: return "ForestGreen"; - case known_color::Fuchsia: return "Fuchsia"; - case known_color::Gainsboro: return "Gainsboro"; - case known_color::GhostWhite: return "GhostWhite"; - case known_color::Gold: return "Gold"; - case known_color::Goldenrod: return "Goldenrod"; - case known_color::GradientActiveCaption: return "GradientActiveCaption"; - case known_color::GradientInactiveCaption: return "GradientInactiveCaption"; - case known_color::Gray: return "Gray"; - case known_color::GrayText: return "GrayText"; - case known_color::Green: return "Green"; - case known_color::GreenYellow: return "GreenYellow"; - case known_color::Highlight: return "Highlight"; - case known_color::HighlightText: return "HighlightText"; - case known_color::Honeydew: return "Honeydew"; - case known_color::HotPink: return "HotPink"; - case known_color::HotTrack: return "HotTrack"; - case known_color::InactiveBorder: return "InactiveBorder"; - case known_color::InactiveCaption: return "InactiveCaption"; - case known_color::InactiveCaptionText: return "InactiveCaptionText"; - case known_color::IndianRed: return "IndianRed"; - case known_color::Indigo: return "Indigo"; - case known_color::Info: return "Info"; - case known_color::InfoText: return "InfoText"; - case known_color::Ivory: return "Ivory"; - case known_color::Khaki: return "Khaki"; - case known_color::Lavender: return "Lavender"; - case known_color::LavenderBlush: return "LavenderBlush"; - case known_color::LawnGreen: return "LawnGreen"; - case known_color::LemonChiffon: return "LemonChiffon"; - case known_color::LightBlue: return "LightBlue"; - case known_color::LightCoral: return "LightCoral"; - case known_color::LightCyan: return "LightCyan"; - case known_color::LightGoldenrodYellow: return "LightGoldenrodYellow"; - case known_color::LightGray: return "LightGray"; - case known_color::LightGreen: return "LightGreen"; - case known_color::LightPink: return "LightPink"; - case known_color::LightSalmon: return "LightSalmon"; - case known_color::LightSeaGreen: return "LightSeaGreen"; - case known_color::LightSkyBlue: return "LightSkyBlue"; - case known_color::LightSlateGray: return "LightSlateGray"; - case known_color::LightSteelBlue: return "LightSteelBlue"; - case known_color::LightYellow: return "LightYellow"; - case known_color::Lime: return "Lime"; - case known_color::LimeGreen: return "LimeGreen"; - case known_color::Linen: return "Linen"; - case known_color::Magenta: return "Magenta"; - case known_color::Maroon: return "Maroon"; - case known_color::MediumAquamarine: return "MediumAquamarine"; - case known_color::MediumBlue: return "MediumBlue"; - case known_color::MediumOrchid: return "MediumOrchid"; - case known_color::MediumPurple: return "MediumPurple"; - case known_color::MediumSeaGreen: return "MediumSeaGreen"; - case known_color::MediumSlateBlue: return "MediumSlateBlue"; - case known_color::MediumSpringGreen: return "MediumSpringGreen"; - case known_color::MediumTurquoise: return "MediumTurquoise"; - case known_color::MediumVioletRed: return "MediumVioletRed"; - case known_color::Menu: return "Menu"; - case known_color::MenuBar: return "MenuBar"; - case known_color::MenuHighlight: return "MenuHighlight"; - case known_color::MenuText: return "MenuText"; - case known_color::MidnightBlue: return "MidnightBlue"; - case known_color::MintCream: return "MintCream"; - case known_color::MistyRose: return "MistyRose"; - case known_color::Moccasin: return "Moccasin"; - case known_color::NavajoWhite: return "NavajoWhite"; - case known_color::Navy: return "Navy"; - case known_color::OldLace: return "OldLace"; - case known_color::Olive: return "Olive"; - case known_color::OliveDrab: return "OliveDrab"; - case known_color::Orange: return "Orange"; - case known_color::OrangeRed: return "OrangeRed"; - case known_color::Orchid: return "Orchid"; - case known_color::PaleGoldenrod: return "PaleGoldenrod"; - case known_color::PaleGreen: return "PaleGreen"; - case known_color::PaleTurquoise: return "PaleTurquoise"; - case known_color::PaleVioletRed: return "PaleVioletRed"; - case known_color::PapayaWhip: return "PapayaWhip"; - case known_color::PeachPuff: return "PeachPuff"; - case known_color::Peru: return "Peru"; - case known_color::Pink: return "Pink"; - case known_color::Plum: return "Plum"; - case known_color::PowderBlue: return "PowderBlue"; - case known_color::Purple: return "Purple"; - case known_color::Red: return "Red"; - case known_color::RosyBrown: return "RosyBrown"; - case known_color::RoyalBlue: return "RoyalBlue"; - case known_color::SaddleBrown: return "SaddleBrown"; - case known_color::Salmon: return "Salmon"; - case known_color::SandyBrown: return "SandyBrown"; - case known_color::ScrollBar: return "ScrollBar"; - case known_color::SeaGreen: return "SeaGreen"; - case known_color::SeaShell: return "SeaShell"; - case known_color::Sienna: return "Sienna"; - case known_color::Silver: return "Silver"; - case known_color::SkyBlue: return "SkyBlue"; - case known_color::SlateBlue: return "SlateBlue"; - case known_color::SlateGray: return "SlateGray"; - case known_color::Snow: return "Snow"; - case known_color::SpringGreen: return "SpringGreen"; - case known_color::SteelBlue: return "SteelBlue"; - case known_color::Tan: return "Tan"; - case known_color::Teal: return "Teal"; - case known_color::Thistle: return "Thistle"; - case known_color::Tomato: return "Tomato"; - case known_color::Transparent: return "Transparent"; - case known_color::Turquoise: return "Turquoise"; - case known_color::Violet: return "Violet"; - case known_color::Wheat: return "Wheat"; - case known_color::White: return "White"; - case known_color::WhiteSmoke: return "WhiteSmoke"; - case known_color::Window: return "Window"; - case known_color::WindowFrame: return "WindowFrame"; - case known_color::WindowText: return "WindowText"; - case known_color::Yellow: return "Yellow"; - case known_color::YellowGreen: return "YellowGreen"; - } - throw std::runtime_error(""); -} - -class color -{ -public: - /// - /// gets a system-defined color that has an ARGB value of #FFF0F8FF. - /// - static const color AliceBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFFAEBD7. - /// - static const color AntiqueWhite; - /// - /// gets a system-defined color that has an ARGB value of #FF0FFFF. - /// - static const color Aqua; - /// - /// gets a system-defined color that has an ARGB value of #FF7FFFD4. - /// - static const color Aquamarine; - /// - /// gets a system-defined color that has an ARGB value of #FFF0FFFF. - /// - static const color Azure; - /// - /// gets a system-defined color that has an ARGB value of #FFF5F5DC. - /// - static const color Beige; - /// - /// gets a system-defined color that has an ARGB value of #FFFFE4C4. - /// - static const color Bisque; - /// - /// gets a system-defined color that has an ARGB value of #FF000. - /// - static const color Black; - /// - /// gets a system-defined color that has an ARGB value of #FFFFEBCD. - /// - static const color BlanchedAlmond; - /// - /// gets a system-defined color that has an ARGB value of #FF00FF. - /// - static const color Blue; - /// - /// gets a system-defined color that has an ARGB value of #FF8A2BE2. - /// - static const color BlueViolet; - /// - /// gets a system-defined color that has an ARGB value of #FFA52A2A. - /// - static const color Brown; - /// - /// gets a system-defined color that has an ARGB value of #FFDEB887. - /// - static const color BurlyWood; - /// - /// gets a system-defined color that has an ARGB value of #FF5F9EA0. - /// - static const color CadetBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF7FFF0. - /// - static const color Chartreuse; - /// - /// gets a system-defined color that has an ARGB value of #FFD2691E. - /// - static const color Chocolate; - /// - /// gets a system-defined color that has an ARGB value of #FFFF7F50. - /// - static const color Coral; - /// - /// gets a system-defined color that has an ARGB value of #FF6495ED. - /// - static const color CornflowerBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFFFF8DC. - /// - static const color Cornsilk; - /// - /// gets a system-defined color that has an ARGB value of #FFDC143C. - /// - static const color Crimson; - /// - /// gets a system-defined color that has an ARGB value of #FF0FFFF. - /// - static const color Cyan; - /// - /// gets a system-defined color that has an ARGB value of #FF008B. - /// - static const color DarkBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF08B8B. - /// - static const color DarkCyan; - /// - /// gets a system-defined color that has an ARGB value of #FFB8860B. - /// - static const color DarkGoldenrod; - /// - /// gets a system-defined color that has an ARGB value of #FFA9A9A9. - /// - static const color DarkGray; - /// - /// gets a system-defined color that has an ARGB value of #FF0640. - /// - static const color DarkGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFBDB76B. - /// - static const color DarkKhaki; - /// - /// gets a system-defined color that has an ARGB value of #FF8B08B. - /// - static const color DarkMagenta; - /// - /// gets a system-defined color that has an ARGB value of #FF556B2F. - /// - static const color DarkOliveGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFF8C0. - /// - static const color DarkOrange; - /// - /// gets a system-defined color that has an ARGB value of #FF9932CC. - /// - static const color DarkOrchid; - /// - /// gets a system-defined color that has an ARGB value of #FF8B00. - /// - static const color DarkRed; - /// - /// gets a system-defined color that has an ARGB value of #FFE9967A. - /// - static const color DarkSalmon; - /// - /// gets a system-defined color that has an ARGB value of #FF8FBC8F. - /// - static const color DarkSeaGreen; - /// - /// gets a system-defined color that has an ARGB value of #FF483D8B. - /// - static const color DarkSlateBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF2F4F4F. - /// - static const color DarkSlateGray; - /// - /// gets a system-defined color that has an ARGB value of #FF0CED1. - /// - static const color DarkTurquoise; - /// - /// gets a system-defined color that has an ARGB value of #FF940D3. - /// - static const color DarkViolet; - /// - /// gets a system-defined color that has an ARGB value of #FFFF1493. - /// - static const color DeepPink; - /// - /// gets a system-defined color that has an ARGB value of #FF0BFFF. - /// - static const color DeepSkyBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF696969. - /// - static const color DimGray; - /// - /// gets a system-defined color that has an ARGB value of #FF1E90FF. - /// - static const color DodgerBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFB22222. - /// - static const color Firebrick; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFAF0. - /// - static const color FloralWhite; - /// - /// gets a system-defined color that has an ARGB value of #FF228B22. - /// - static const color ForestGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFF0FF. - /// - static const color Fuchsia; - /// - /// gets a system-defined color that has an ARGB value of #FFDCDCDC. - /// - static const color Gainsboro; - /// - /// gets a system-defined color that has an ARGB value of #FFF8F8FF. - /// - static const color GhostWhite; - /// - /// gets a system-defined color that has an ARGB value of #FFFFD70. - /// - static const color Gold; - /// - /// gets a system-defined color that has an ARGB value of #FFDAA520. - /// - static const color Goldenrod; - /// - /// gets a system-defined color that has an ARGB value of #FF808080. - /// - static const color Gray; - /// - /// gets a system-defined color that has an ARGB value of #FF0800. - /// - static const color Green; - /// - /// gets a system-defined color that has an ARGB value of #FFADFF2F. - /// - static const color GreenYellow; - /// - /// gets a system-defined color that has an ARGB value of #FFF0FFF0. - /// - static const color Honeydew; - /// - /// gets a system-defined color that has an ARGB value of #FFFF69B4. - /// - static const color HotPink; - /// - /// gets a system-defined color that has an ARGB value of #FFCD5C5C. - /// - static const color IndianRed; - /// - /// gets a system-defined color that has an ARGB value of #FF4B082. - /// - static const color Indigo; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFFF0. - /// - static const color Ivory; - /// - /// gets a system-defined color that has an ARGB value of #FFF0E68C. - /// - static const color Khaki; - /// - /// gets a system-defined color that has an ARGB value of #FFE6E6FA. - /// - static const color Lavender; - /// - /// gets a system-defined color that has an ARGB value of #FFFFF0F5. - /// - static const color LavenderBlush; - /// - /// gets a system-defined color that has an ARGB value of #FF7CFC0. - /// - static const color LawnGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFACD. - /// - static const color LemonChiffon; - /// - /// gets a system-defined color that has an ARGB value of #FFADD8E6. - /// - static const color LightBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFF08080. - /// - static const color LightCoral; - /// - /// gets a system-defined color that has an ARGB value of #FFE0FFFF. - /// - static const color LightCyan; - /// - /// gets a system-defined color that has an ARGB value of #FFFAFAD2. - /// - static const color LightGoldenrodYellow; - /// - /// gets a system-defined color that has an ARGB value of #FFD3D3D3. - /// - static const color LightGray; - /// - /// gets a system-defined color that has an ARGB value of #FF90EE90. - /// - static const color LightGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFFB6C1. - /// - static const color LightPink; - /// - /// gets a system-defined color that has an ARGB value of #FFFFA07A. - /// - static const color LightSalmon; - /// - /// gets a system-defined color that has an ARGB value of #FF20B2AA. - /// - static const color LightSeaGreen; - /// - /// gets a system-defined color that has an ARGB value of #FF87CEFA. - /// - static const color LightSkyBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF778899. - /// - static const color LightSlateGray; - /// - /// gets a system-defined color that has an ARGB value of #FFB0C4DE. - /// - static const color LightSteelBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFFE0. - /// - static const color LightYellow; - /// - /// gets a system-defined color that has an ARGB value of #FF0FF0. - /// - static const color Lime; - /// - /// gets a system-defined color that has an ARGB value of #FF32CD32. - /// - static const color LimeGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFAF0E6. - /// - static const color Linen; - /// - /// gets a system-defined color that has an ARGB value of #FFFF0FF. - /// - static const color Magenta; - /// - /// gets a system-defined color that has an ARGB value of #FF8000. - /// - static const color Maroon; - /// - /// gets a system-defined color that has an ARGB value of #FF66CDAA. - /// - static const color MediumAquamarine; - /// - /// gets a system-defined color that has an ARGB value of #FF00CD. - /// - static const color MediumBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFBA55D3. - /// - static const color MediumOrchid; - /// - /// gets a system-defined color that has an ARGB value of #FF9370DB. - /// - static const color MediumPurple; - /// - /// gets a system-defined color that has an ARGB value of #FF3CB371. - /// - static const color MediumSeaGreen; - /// - /// gets a system-defined color that has an ARGB value of #FF7B68EE. - /// - static const color MediumSlateBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF0FA9A. - /// - static const color MediumSpringGreen; - /// - /// gets a system-defined color that has an ARGB value of #FF48D1CC. - /// - static const color MediumTurquoise; - /// - /// gets a system-defined color that has an ARGB value of #FFC71585. - /// - static const color MediumVioletRed; - /// - /// gets a system-defined color that has an ARGB value of #FF191970. - /// - static const color MidnightBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFF5FFFA. - /// - static const color MintCream; - /// - /// gets a system-defined color that has an ARGB value of #FFFFE4E1. - /// - static const color MistyRose; - /// - /// gets a system-defined color that has an ARGB value of #FFFFE4B5. - /// - static const color Moccasin; - /// - /// gets a system-defined color that has an ARGB value of #FFFFDEAD. - /// - static const color NavajoWhite; - /// - /// gets a system-defined color that has an ARGB value of #FF0080. - /// - static const color Navy; - /// - /// gets a system-defined color that has an ARGB value of #FFFDF5E6. - /// - static const color OldLace; - /// - /// gets a system-defined color that has an ARGB value of #FF80800. - /// - static const color Olive; - /// - /// gets a system-defined color that has an ARGB value of #FF6B8E23. - /// - static const color OliveDrab; - /// - /// gets a system-defined color that has an ARGB value of #FFFFA50. - /// - static const color Orange; - /// - /// gets a system-defined color that has an ARGB value of #FFFF450. - /// - static const color OrangeRed; - /// - /// gets a system-defined color that has an ARGB value of #FFDA70D6. - /// - static const color Orchid; - /// - /// gets a system-defined color that has an ARGB value of #FFEEE8AA. - /// - static const color PaleGoldenrod; - /// - /// gets a system-defined color that has an ARGB value of #FF98FB98. - /// - static const color PaleGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFAFEEEE. - /// - static const color PaleTurquoise; - /// - /// gets a system-defined color that has an ARGB value of #FFDB7093. - /// - static const color PaleVioletRed; - /// - /// gets a system-defined color that has an ARGB value of #FFFFEFD5. - /// - static const color PapayaWhip; - /// - /// gets a system-defined color that has an ARGB value of #FFFFDAB9. - /// - static const color PeachPuff; - /// - /// gets a system-defined color that has an ARGB value of #FFCD853F. - /// - static const color Peru; - /// - /// gets a system-defined color that has an ARGB value of #FFFFC0CB. - /// - static const color Pink; - /// - /// gets a system-defined color that has an ARGB value of #FFDDA0DD. - /// - static const color Plum; - /// - /// gets a system-defined color that has an ARGB value of #FFB0E0E6. - /// - static const color PowderBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF80080. - /// - static const color Purple; - /// - /// gets a system-defined color that has an ARGB value of #FFFF00. - /// - static const color Red; - /// - /// gets a system-defined color that has an ARGB value of #FFBC8F8F. - /// - static const color RosyBrown; - /// - /// gets a system-defined color that has an ARGB value of #FF4169E1. - /// - static const color RoyalBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF8B4513. - /// - static const color SaddleBrown; - /// - /// gets a system-defined color that has an ARGB value of #FFFA8072. - /// - static const color Salmon; - /// - /// gets a system-defined color that has an ARGB value of #FFF4A460. - /// - static const color SandyBrown; - /// - /// gets a system-defined color that has an ARGB value of #FF2E8B57. - /// - static const color SeaGreen; - /// - /// gets a system-defined color that has an ARGB value of #FFFFF5EE. - /// - static const color SeaShell; - /// - /// gets a system-defined color that has an ARGB value of #FFA0522D. - /// - static const color Sienna; - /// - /// gets a system-defined color that has an ARGB value of #FFC0C0C0. - /// - static const color Silver; - /// - /// gets a system-defined color that has an ARGB value of #FF87CEEB. - /// - static const color SkyBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF6A5ACD. - /// - static const color SlateBlue; - /// - /// gets a system-defined color that has an ARGB value of #FF708090. - /// - static const color SlateGray; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFAFA. - /// - static const color Snow; - /// - /// gets a system-defined color that has an ARGB value of #FF0FF7F. - /// - static const color SpringGreen; - /// - /// gets a system-defined color that has an ARGB value of #FF4682B4. - /// - static const color SteelBlue; - /// - /// gets a system-defined color that has an ARGB value of #FFD2B48C. - /// - static const color Tan; - /// - /// gets a system-defined color that has an ARGB value of #FF08080. - /// - static const color Teal; - /// - /// gets a system-defined color that has an ARGB value of #FFD8BFD8. - /// - static const color Thistle; - /// - /// gets a system-defined color that has an ARGB value of #FFFF6347. - /// - static const color Tomato; - /// - /// gets a system-defined color that has an ARGB value of #FF40E0D0. - /// - static const color Turquoise; - /// - /// gets a system-defined color that has an ARGB value of #FFEE82EE. - /// - static const color Violet; - /// - /// gets a system-defined color that has an ARGB value of #FFF5DEB3. - /// - static const color Wheat; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFFFF. - /// - static const color White; - /// - /// gets a system-defined color that has an ARGB value of #FFF5F5F5. - /// - static const color WhiteSmoke; - /// - /// gets a system-defined color that has an ARGB value of #FFFFFF0. - /// - static const color Yellow; - /// - /// gets a system-defined color that has an ARGB value of #FF9ACD32. - /// - static const color YellowGreen; - /// - /// gets a system-defined color that has an ARGB value of #00000000. - /// - static const color Transparent; - /// - /// gets a system-defined color that has an ARGB value of #FF9ACD32. - /// - static const color Empty; - - static color from_argb(uint32_t argb); - static color from_argb(uint8_t alpha, color base); - static color from_argb(uint8_t r, uint8_t g, uint8_t b); - static color from_argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b); - static color from_known_color(known_color color); - static color from_name(const std::string &name); - bool equals(color b) const; - float get_brightness() const; - float get_hue() const; - float getsaturation() const; - bool is_empty() const { return is_empty_; } - bool is_known_color() const; - bool is_named_color() const; - bool is_system_color() const; - uint32_t to_argb() const; - known_color to_known_color() const; - uint8_t get_alpha() const { return alpha_; } - uint8_t get_red() const { return red_; } - uint8_t get_green() const { return green_; } - uint8_t get_blue() const { return blue_; } - std::string get_name() const; - -private: - color(); - color(uint8_t a, uint8_t r, uint8_t g, uint8_t b); - - bool is_empty_; - uint8_t alpha_; - uint8_t red_; - uint8_t green_; - uint8_t blue_; -}; - -inline bool operator==(color a, color b) -{ - return a.equals(b); -} - -inline bool operator!=(color a, color b) -{ - return a != b; -} - -} // namespace xlnt diff --git a/source/misc/enum_iterator.h b/source/misc/enum_iterator.h deleted file mode 100644 index 838226d8..00000000 --- a/source/misc/enum_iterator.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include - -namespace xlnt { - -template -class enum_iterator { -private: - enum_type value; - typedef typename std::underlying_type::type under; -public: - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef enum_type value_type; - typedef enum_type reference; - typedef enum_type* pointer; - typedef std::random_access_iterator_tag iterator_category; - - enum_iterator() :value() {} - enum_iterator(const enum_iterator& rhs) : value(rhs.value) {} - explicit enum_iterator(enum_type value_) : value(value_) {} - ~enum_iterator() {} - enum_iterator& operator=(const enum_iterator& rhs) { value = rhs.valud; return *this; } - enum_iterator& operator++() { value = (enum_type)(under(value) + 1); return *this; } - enum_iterator operator++(int){ enum_iterator r(*this); ++*this; return r; } - enum_iterator& operator+=(size_type o) { value = (enum_type)(under(value) + o); return *this; } - friend enum_iterator operator+(const enum_iterator& it, size_type o) { return enum_iterator((enum_type)(under(it) + o)); } - friend enum_iterator operator+(size_type o, const enum_iterator& it) { return enum_iterator((enum_type)(under(it) + o)); } - enum_iterator& operator--() { value = (enum_type)(under(value) - 1); return *this; } - enum_iterator operator--(int) { enum_iterator r(*this); --*this; return r; } - enum_iterator& operator-=(size_type o) { value = (enum_type)(under(value) + o); return *this; } - friend enum_iterator operator-(const enum_iterator& it, size_type o) { return enum_iterator((enum_type)(under(it) - o)); } - friend difference_type operator-(enum_iterator lhs, enum_iterator rhs) { return under(lhs.value) - under(rhs.value); } - reference operator*() const { return value; } - reference operator[](size_type o) const { return (enum_type)(under(value) + o); } - const enum_type* operator->() const { return &value; } - friend bool operator==(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value == rhs.value; } - friend bool operator!=(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value != rhs.value; } - friend bool operator<(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value>rhs.value; } - friend bool operator<=(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value <= rhs.value; } - friend bool operator>=(const enum_iterator& lhs, const enum_iterator& rhs) { return lhs.value >= rhs.value; } - friend void swap(const enum_iterator& lhs, const enum_iterator& rhs) { std::swap(lhs.value, rhs.value); } - enum_iterator begin() { return enum_iterator(enum_type::First); } - enum_iterator end() { return enum_iterator(enum_type::Last); } -}; - -} // namespace xlnt diff --git a/source/misc/nullable.h b/source/misc/nullable.h deleted file mode 100644 index f90547b2..00000000 --- a/source/misc/nullable.h +++ /dev/null @@ -1,148 +0,0 @@ -#pragma once - -#include - - -namespace xlnt { - -/// -/// Represents a value type that may or may not have an assigned value. -/// -template -struct nullable -{ -public: - /// - /// Initializes a new instance of the nullable<T> structure with a "null" value. - /// - nullable() : has_value_(false) {} - - /// - /// Initializes a new instance of the nullable<T> structure to the specified value. - /// - nullable(const T &value) : has_value_(true), value_(value) {} - - /// - /// gets a value indicating whether the current nullable<T> object has a valid value of its underlying type. - /// - bool has_value() const { return has_value_; } - - /// - /// gets the value of the current nullable<T> object if it has been assigned a valid underlying value. - /// - T get_value() const - { - if(!has_value()) - { - throw std::runtime_error("invalid operation"); - } - - return value_; - } - - /// - /// Indicates whether the current nullable<T> object is equal to a specified object. - /// - bool equals(const nullable &other) const - { - if(!has_value()) - { - return !other.has_value(); - } - - if(other.has_value()) - { - return get_value() == other.get_value(); - } - - return false; - } - - /// - /// Retrieves the value of the current nullable<T> object, or the object's default value. - /// - T get_value_or_default() - { - if(has_value()) - { - return get_value(); - } - - return T(); - } - - /// - /// Retrieves the value of the current nullable<T> object or the specified default value. - /// - T get_value_or_default(const T &default_) - { - if(has_value()) - { - return get_value(); - } - - return default_; - } - - /// - /// Returns the value of a specified nullable<T> value. - /// - operator T() const - { - return get_value(); - } - - /// - /// Indicates whether the current nullable<T> object is equal to a specified object. - /// - bool operator==(nullptr_t) const - { - return !has_value_; - } - - /// - /// Indicates whether the current nullable<T> object is not equal to a specified object. - /// - bool operator!=(nullptr_t) const - { - return has_value_; - } - - /// - /// Indicates whether the current nullable<T> object is equal to a specified object. - /// - bool operator==(T other) const - { - return has_value_ && other == value_; - } - - /// - /// Indicates whether the current nullable<T> object is not equal to a specified object. - /// - bool operator!=(T other) const - { - return has_value_ && other != value_; - } - - /// - /// Indicates whether the current nullable<T> object is equal to a specified object. - /// - bool operator==(const nullable &other) const - { - return equals(other); - } - - /// - /// Indicates whether the current nullable<T> object is not equal to a specified object. - /// - bool operator!=(const nullable &other) const - { - return !(*this == other); - } - -private: - bool has_value_; - T value_; -}; - -} // namespace xlnt diff --git a/source/packaging/compression_option.h b/source/packaging/compression_option.h deleted file mode 100644 index 38f7cd8e..00000000 --- a/source/packaging/compression_option.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -namespace xlnt { - -/// -/// Specifies the compression level for content that is stored in a part. -/// -enum class compression_option -{ - /// - /// Compression is optimized for performance. - /// - Fast, - /// - /// Compression is optimized for size. - /// - Maximum, - /// - /// Compression is optimized for a balance between size and performance. - /// - Normal, - /// - /// Compression is turned off. - /// - NotCompressed, - /// - /// Compression is optimized for high performance. - /// - SuperFast -}; - -} // namespace xlnt diff --git a/source/packaging/file.h b/source/packaging/file.h deleted file mode 100644 index 3d03446a..00000000 --- a/source/packaging/file.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -namespace xlnt { - -/// -/// Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of FileStream objects. -/// -class file -{ -public: - /// - /// Copies an existing file to a new file. Overwriting a file of the same name is allowed. - /// - static void copy(const std::string &source, const std::string &destination, bool overwrite = false); - - /// - /// Determines whether the specified file exists. - /// - static bool exists(const std::string &path); -}; - -} // namespace xlnt diff --git a/source/packaging/file_access.h b/source/packaging/file_access.h deleted file mode 100644 index 6834603b..00000000 --- a/source/packaging/file_access.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -namespace xlnt { - -/// -/// Defines constants for read, write, or read / write access to a file. -/// -enum class file_access -{ - /// - /// Read access to the file. Data can be read from the file. Combine with Write for read/write access. - /// - Read = 0x01, - /// - /// Read and write access to the file. Data can be written to and read from the file. - /// - ReadWrite = 0x02, - /// - /// Write access to the file. Data can be written to the file. Combine with Read for read/write access. - /// - Write = 0x04, - /// - /// Inherit access for part from enclosing package. - /// - FromPackage = 0x08 -}; - -} // namespace xlnt diff --git a/source/packaging/file_mode.h b/source/packaging/file_mode.h deleted file mode 100644 index 1b92c00e..00000000 --- a/source/packaging/file_mode.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -namespace xlnt { - -/// -/// Specifies how the operating system should open a file. -/// -enum class file_mode -{ - /// - /// Opens the file if it exists and seeks to the end of the file, or creates a new file.This requires FileIOPermissionAccess.Append permission.file_mode.Append can be used only in conjunction with file_access.Write.Trying to seek to a position before the end of the file throws an IOException exception, and any attempt to read fails and throws a NotSupportedException exception. - /// - Append, - /// - /// Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. This requires FileIOPermissionAccess.Write permission. file_mode.Create is equivalent to requesting that if the file does not exist, use CreateNew; otherwise, use Truncate. If the file already exists but is a hidden file, an UnauthorizedAccessException exception is thrown. - /// - Create, - /// - /// Specifies that the operating system should create a new file. This requires FileIOPermissionAccess.Write permission. If the file already exists, an IOException exception is thrown. - /// - CreateNew, - /// - /// Specifies that the operating system should open an existing file. The ability to open the file is dependent on the value specified by the file_access enumeration. A System.IO.FileNotFoundException exception is thrown if the file does not exist. - /// - Open, - /// - /// Specifies that the operating system should open a file if it exists; otherwise, a new file should be created. If the file is opened with file_access.Read, FileIOPermissionAccess.Read permission is required. If the file access is file_access.Write, FileIOPermissionAccess.Write permission is required. If the file is opened with file_access.ReadWrite, both FileIOPermissionAccess.Read and FileIOPermissionAccess.Write permissions are required. - /// - OpenOrCreate, - /// - /// Specifies that the operating system should open an existing file. When the file is opened, it should be truncated so that its size is zero bytes. This requires FileIOPermissionAccess.Write permission. Attempts to read from a file opened with file_mode.Truncate cause an ArgumentException exception. - /// - Truncate -}; - -} // namespace xlnt diff --git a/source/packaging/file_share.h b/source/packaging/file_share.h deleted file mode 100644 index 9b89a59a..00000000 --- a/source/packaging/file_share.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -namespace xlnt { - -/// -/// Contains constants for controlling the kind of access other FileStream objects can have to the same file. -/// -enum class file_share -{ - /// - /// Allows subsequent deleting of a file. - /// - Delete, - /// - /// Makes the file handle inheritable by child processes. This is not directly supported by Win32. - /// - Inheritable, - /// - /// Declines sharing of the current file. Any request to open the file (by this process or another process) will - /// fail until the file is closed. - /// - None, - /// - /// Allows subsequent opening of the file for reading. If this flag is not specified, any request to open the file - /// for reading (by this process or another process) will fail until the file is closed. However, even if this flag - /// is specified, additional permissions might still be needed to access the file. - /// - Read, - /// - /// Allows subsequent opening of the file for reading or writing. If this flag is not specified, any request to - /// open the file for reading or writing (by this process or another process) will fail until the file is closed. - /// However, even if this flag is specified, additional permissions might still be needed to access the file. - /// - ReadWrite, - /// - /// Allows subsequent opening of the file for writing. If this flag is not specified, any request to open the file - /// for writing (by this process or another process) will fail until the file is closed. However, even if this flag - /// is specified, additional permissions might still be needed to access the file. - /// - Write -}; - -} // namespace xlnt diff --git a/source/packaging/opc_callback_handler.h b/source/packaging/opc_callback_handler.h deleted file mode 100644 index d55af63e..00000000 --- a/source/packaging/opc_callback_handler.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include - -namespace xlnt { - -class opc_callback_handler -{ -public: - static int read(void *context, char *buffer, int length); - - static int write(void *context, const char *buffer, int length); - - static int close(void *context); - - static opc_ofs_t seek(void *context, opc_ofs_t ofs); - - static int trim(void *context, opc_ofs_t new_size); - - static int flush(void *context); -}; - -} // namespace xlnt diff --git a/source/packaging/opc_streambuf.h b/source/packaging/opc_streambuf.h deleted file mode 100644 index fd10469a..00000000 --- a/source/packaging/opc_streambuf.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace xlnt { - -class opc_streambuf : public std::streambuf -{ -public: - opc_streambuf(opcContainer *container, const std::string &part_name); - opc_streambuf(const opc_streambuf &) = delete; - opc_streambuf &operator=(const opc_streambuf &) = delete; - -private: - int_type underflow(); - int_type uflow(); - int_type pbackfail(int_type ch); - std::streamsize showmanyc(); - - int_type overflow(int_type ch); - int sync(); - - opcContainer *container_; - std::string part_name_; - std::array buffer_; -}; - -} // namespace xlnt diff --git a/source/packaging/package.cpp b/source/packaging/package.cpp deleted file mode 100644 index 5eeff136..00000000 --- a/source/packaging/package.cpp +++ /dev/null @@ -1,393 +0,0 @@ -#include -#include -#include - -#include "package.h" -#include "file.h" -#include "part.h" - -namespace xlnt { - -struct package_struct -{ - package *parent_; - opcContainer *opc_container_; - std::iostream &stream_; - std::fstream file_stream_; - file_mode package_mode_; - file_access package_access_; - std::vector container_buffer_; - bool open_; - package_properties package_properties_; - bool streaming_; - - file_access get_file_open_access() const - { - if(!open_) - { - throw std::runtime_error("The package is not open"); - } - - return package_access_; - } - - package_properties get_package_properties() const - { - if(!open_) - { - throw std::runtime_error("The package is not open"); - } - - return package_properties_; - } - - package_struct(package *parent, std::iostream &stream, file_mode package_mode, file_access package_access) - : parent_(parent), stream_(stream), container_buffer_(4096), package_mode_(package_mode), package_access_(package_access) - { - open_container(); - } - - package_struct(package *parent, const std::string &path, file_mode package_mode, file_access package_access) - : parent_(parent), stream_(file_stream_), container_buffer_(4096), package_mode_(package_mode), package_access_(package_access) - { - switch(package_mode) - { - case file_mode::Append: - switch(package_access) - { - case file_access::Read: throw std::runtime_error("Append can only be used with file_access.Write"); - case file_access::ReadWrite: throw std::runtime_error("Append can only be used with file_access.Write"); - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::app | std::ios::out); - break; - } - break; - case file_mode::Create: - switch(package_access) - { - case file_access::Read: - file_stream_.open(path, std::ios::binary | std::ios::in); - break; - case file_access::ReadWrite: - file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); - break; - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::out); - break; - } - break; - case file_mode::CreateNew: - if(!file::exists(path)) - { - throw std::runtime_error("File already exists"); - } - switch(package_access) - { - case file_access::Read: - file_stream_.open(path, std::ios::binary | std::ios::in); - break; - case file_access::ReadWrite: - file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); - break; - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::out); - break; - } - break; - case file_mode::Open: - if(!file::exists(path)) - { - throw std::runtime_error("Can't open non-existent file"); - } - switch(package_access) - { - case file_access::Read: - file_stream_.open(path, std::ios::binary | std::ios::in); - break; - case file_access::ReadWrite: - file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); - break; - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::out); - break; - } - break; - case file_mode::OpenOrCreate: - switch(package_access) - { - case file_access::Read: - file_stream_.open(path, std::ios::binary | std::ios::in); - break; - case file_access::ReadWrite: - file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); - break; - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::out); - break; - } - break; - case file_mode::Truncate: - if(!file::exists(path)) - { - throw std::runtime_error("Can't truncate non-existent file"); - } - switch(package_access) - { - case file_access::Read: - file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::in); - break; - case file_access::ReadWrite: - file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::in | std::ios::out); - break; - case file_access::Write: - file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::out); - break; - } - break; - } - - open_container(); - } - - void open_container() - { - opcContainerOpenMode m; - - switch(package_access_) - { - case file_access::Read: - m = opcContainerOpenMode::OPC_OPEN_READ_ONLY; - break; - case file_access::ReadWrite: - m = opcContainerOpenMode::OPC_OPEN_READ_WRITE; - break; - case file_access::Write: - m = opcContainerOpenMode::OPC_OPEN_WRITE_ONLY; - break; - default: - throw std::runtime_error("unknown file access"); - } - - opc_container_ = opcContainerOpenIO(&read_callback, &write_callback, - &close_callback, &seek_callback, - &trim_callback, &flush_callback, this, 4096, m, this); - open_ = true; - } - - ~package_struct() - { - close(); - } - - void close() - { - if(open_) - { - open_ = false; - opcContainerClose(opc_container_, opcContainerCloseMode::OPC_CLOSE_NOW); - opc_container_ = nullptr; - } - } - - part create_part(const uri &/*part_uri*/, const std::string &/*content_type*/, compression_option /*compression*/) - { - return part(); - } - - void delete_part(const uri &/*part_uri*/) - { - - } - - void flush() - { - stream_.flush(); - } - - part get_part(const uri &part_uri) - { - return part(*parent_, part_uri, opc_container_); - } - - part_collection get_parts() - { - return part_collection(); - } - - int write(char *buffer, int length) - { - stream_.read(buffer, length); - auto bytes_read = stream_.gcount(); - return static_cast(bytes_read); - } - - int read(const char *buffer, int length) - { - auto before = stream_.tellp(); - stream_.write(buffer, length); - auto bytes_written = stream_.tellp() - before; - return static_cast(bytes_written); - } - - std::ios::pos_type seek(std::ios::pos_type offset) - { - stream_.clear(); - stream_.seekg(offset); - auto current_position = stream_.tellg(); - if(stream_.eof()) - { - std::cout << "eof" << std::endl; - } - if(stream_.fail()) - { - std::cout << "fail" << std::endl; - } - if(stream_.bad()) - { - std::cout << "bad" << std::endl; - } - return current_position; - } - - int trim(std::ios::pos_type /*new_size*/) - { - return 0; - } - - static int read_callback(void *context, char *buffer, int length) - { - auto object = static_cast(context); - return object->write(buffer, length); - } - - static int write_callback(void *context, const char *buffer, int length) - { - auto object = static_cast(context); - return object->read(buffer, length); - } - - static int close_callback(void *context) - { - auto object = static_cast(context); - object->close(); - return 0; - } - - static opc_ofs_t seek_callback(void *context, opc_ofs_t ofs) - { - auto object = static_cast(context); - return static_cast(object->seek(ofs)); - } - - static int trim_callback(void *context, opc_ofs_t new_size) - { - auto object = static_cast(context); - return object->trim(new_size); - } - - static int flush_callback(void *context) - { - auto object = static_cast(context); - object->flush(); - return 0; - } -}; - -file_access package::get_file_open_access() const -{ - return root_->get_file_open_access(); -} - -package_properties package::get_package_properties() const -{ - return root_->get_package_properties(); -} - -package package::open(std::iostream &stream, file_mode package_mode, file_access package_access) -{ - return package(stream, package_mode, package_access); -} - -package package::open(const std::string &path, file_mode package_mode, file_access package_access, file_share /*package_share*/) -{ - return package(path, package_mode, package_access); -} - -package::package(std::iostream &stream, file_mode package_mode, file_access package_access) -: root_(new package_struct(this, stream, package_mode, package_access)) -{ - open_container(); -} - -package::package(const std::string &path, file_mode package_mode, file_access package_access) -: root_(new package_struct(this, path, package_mode, package_access)) -{ - -} - -void package::open_container() -{ - root_->open_container(); -} - -void package::close() -{ - root_->close(); -} - -part package::create_part(const uri &part_uri, const std::string &content_type, compression_option compression) -{ - return root_->create_part(part_uri, content_type, compression); -} - -void package::delete_part(const uri &part_uri) -{ - root_->delete_part(part_uri); -} - -void package::flush() -{ - root_->flush(); -} - -part package::get_part(const uri &part_uri) -{ - return root_->get_part(part_uri); -} - -part_collection package::get_parts() -{ - return root_->get_parts(); -} - -int package::write(char *buffer, int length) -{ - return root_->write(buffer, length); -} - -int package::read(const char *buffer, int length) -{ - return root_->read(buffer, length); -} - -std::ios::pos_type package::seek(std::ios::pos_type offset) -{ - return root_->seek(offset); -} - -int package::trim(std::ios::pos_type new_size) -{ - return root_->trim(new_size); -} - -bool package::operator==(const package &comparand) const -{ - return root_ == comparand.root_; -} - -bool package::operator==(const nullptr_t &) const -{ - return root_ == nullptr; -} - -} // namespace xlnt diff --git a/source/packaging/package.h b/source/packaging/package.h deleted file mode 100644 index b3310f6b..00000000 --- a/source/packaging/package.h +++ /dev/null @@ -1,138 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "compression_option.h" -#include "file_access.h" -#include "file_mode.h" -#include "file_share.h" -#include "opc_callback_handler.h" -#include "package_properties.h" -#include "part.h" -#include "relationship.h" -#include "target_mode.h" -#include "uri.h" - -namespace xlnt { - -struct package_struct; - -/// -/// Implements a derived subclass of the abstract Package base class—the ZipPackage class uses a -/// ZIP archive as the container store. This class should not be inherited. -/// -class package -{ -public: - /// - /// Opens a package with a given IO stream, file mode, and file access setting. - /// - static package open(std::iostream &stream, file_mode package_mode, file_access package_access); - - /// - /// Opens a package at a given path using a given file mode, file access, and file share setting. - /// - static package open(const std::string &path, file_mode package_mode = file_mode::OpenOrCreate, - file_access package_access = file_access::ReadWrite, file_share package_share = file_share::None); - - /// - /// Saves and closes the package plus all underlying part streams. - /// - void close(); - - /// - /// Creates a new part with a given URI, content type, and compression option. - /// - part create_part(const uri &part_uri, const std::string &content_type, compression_option compression = compression_option::Normal); - - /// - /// Creates a package-level relationship to a part with a given URI, target mode, relationship type, and identifier (ID). - /// - relationship create_relationship(const uri &part_uri, target_mode target_mode, const std::string &relationship_type, const std::string &id); - - /// - /// Deletes a part with a given URI from the package. - /// - void delete_part(const uri &part_uri); - - /// - /// Deletes a package-level relationship. - /// - void delete_relationship(const std::string &id); - - /// - /// Saves the contents of all parts and relationships that are contained in the package. - /// - void flush(); - - /// - /// Returns the part with a given URI. - /// - part get_part(const uri &part_uri); - - /// - /// Returns a collection of all the parts in the package. - /// - part_collection get_parts(); - - /// - /// - /// - relationship get_relationship(const std::string &id); - - /// - /// Returns the package-level relationship with a given identifier. - /// - relationship_collection get_relationships(); - - /// - /// Returns a collection of all the package-level relationships that match a given RelationshipType. - /// - relationship_collection get_relationships(const std::string &relationship_type); - - /// - /// Indicates whether a part with a given URI is in the package. - /// - bool part_exists(const uri &part_uri); - - /// - /// Indicates whether a package-level relationship with a given ID is contained in the package. - /// - bool relationship_exists(const std::string &id); - - /// - /// gets the file access setting for the package. - /// - file_access get_file_open_access() const; - - /// - /// gets the core properties of the package. - /// - package_properties get_package_properties() const; - - bool operator==(const package &comparand) const; - bool operator==(const nullptr_t &) const; - -private: - friend opc_callback_handler; - - package(std::iostream &stream, file_mode package_mode, file_access package_access); - package(const std::string &path, file_mode package_mode, file_access package_access); - - void open_container(); - - int write(char *buffer, int length); - - int read(const char *buffer, int length); - - std::ios::pos_type seek(std::ios::pos_type ofs); - - int trim(std::ios::pos_type new_size); - - std::shared_ptr root_; -}; - -} // namespace xlnt diff --git a/source/packaging/package_properties.h b/source/packaging/package_properties.h deleted file mode 100644 index a0307295..00000000 --- a/source/packaging/package_properties.h +++ /dev/null @@ -1,198 +0,0 @@ -#pragma once - -#include -#include - -#include "../misc/nullable.h" - -namespace xlnt { - -/// -/// Represents the core properties of a Package. -/// -class package_properties -{ -public: - /// - /// gets the category of the Package. - /// - std::string get_category() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_category(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_content_status() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_content_status(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_content_type() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_content_type(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - nullable get_created() const { return created_; } - - /// - /// sets the category of the Package. - /// - void set_created(const nullable &created) { created_ = created; } - - /// - /// gets the category of the Package. - /// - std::string get_creator() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_creator(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_description() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_description(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_identifier() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_identifier(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_keywords() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_keywords(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_language() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_language(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_last_modified_by() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_last_modified_by (const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - nullable get_last_printed() const { return created_; } - - /// - /// sets the category of the Package. - /// - void set_last_printed(const nullable &created) { created_ = created; } - - /// - /// gets the category of the Package. - /// - nullable get_modified() const { return created_; } - - /// - /// sets the category of the Package. - /// - void set_modified(const nullable &created) { created_ = created; } - - /// - /// gets the category of the Package. - /// - std::string get_revision() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_revision(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string getsubject() const { return category_; } - - /// - /// sets the category of the Package. - /// - void setsubject(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_title() const { return category_; } - - /// Ssummary> - /// gets the category of the Package. - /// - void set_title(const std::string &category) { category_ = category; } - - /// - /// gets the category of the Package. - /// - std::string get_version() const { return category_; } - - /// - /// sets the category of the Package. - /// - void set_version(const std::string &category) { category_ = category; } - -protected: - friend class package; - -private: - std::string category_; - std::string content_status_; - std::string content_type_; - nullable created_; - std::string creator_; - std::string description_; - std::string identifier_; - std::string keywords_; - std::string language_; - std::string last_modified_by_; - nullable last_printed_; - nullable modified_; - std::string revision_; - std::string subject_; - std::string title_; - std::string version_; -}; - -} // namespace xlnt diff --git a/source/packaging/part.cpp b/source/packaging/part.cpp deleted file mode 100644 index 046f9b25..00000000 --- a/source/packaging/part.cpp +++ /dev/null @@ -1,173 +0,0 @@ -#include "part.h" - -namespace xlnt { - -struct part_struct -{ - /// - /// Initializes a new instance of the part class with a specified parent Package, part URI, MIME content type, and compression_option. - /// - part_struct(package &package, const uri &uri_part, const std::string &mime_type = "", compression_option compression = compression_option::NotCompressed) - : package_(package), - uri_(uri_part), - content_type_(mime_type), - compression_option_(compression) - {} - - part_struct(package &package, const uri &uri, opcContainer *container) - : package_(package), - uri_(uri), - container_(container) - {} - - /// - /// gets the compression option of the part content stream. - /// - compression_option get_compression_option() const { return compression_option_; } - - /// - /// gets the MIME type of the content stream. - /// - std::string get_content_type() const; - - /// - /// gets the parent Package of the part. - /// - package &get_package() const { return package_; } - - /// - /// gets the URI of the part. - /// - uri get_uri() const { return uri_; } - - /// - /// Creates a part-level relationship between this part to a specified target part or external resource. - /// - std::shared_ptr create_relationship(const uri &target_uri, target_mode target_mode, const std::string &relationship_type); - - /// - /// Deletes a specified part-level relationship. - /// - void delete_relationship(const std::string &id); - - /// - /// Returns the relationship that has a specified Id. - /// - relationship get_relationship(const std::string &id); - - /// - /// Returns a collection of all the relationships that are owned by this part. - /// - relationship_collection get_relationships(); - - /// - /// Returns a collection of the relationships that match a specified RelationshipType. - /// - relationship_collection get_relationship_by_type(const std::string &relationship_type); - - std::string read() - { - std::string ss; - auto part_stream = opcContainerOpenInputStream(container_, (xmlChar*)get_uri().get_OriginalString().c_str()); - std::array buffer; - auto bytes_read = opcContainerReadInputStream(part_stream, buffer.data(), static_cast(buffer.size())); - if(bytes_read > 0) - { - ss.append(std::string(buffer.begin(), buffer.begin() + bytes_read)); - while(bytes_read == buffer.size()) - { - auto bytes_read = opcContainerReadInputStream(part_stream, buffer.data(), static_cast(buffer.size())); - ss.append(std::string(buffer.begin(), buffer.begin() + bytes_read)); - } - } - opcContainerCloseInputStream(part_stream); - return ss; - } - - void write(const std::string &data) - { - auto name = get_uri().get_OriginalString(); - auto name_pointer = name.c_str(); - - auto part_stream = opcContainerCreateOutputStream(container_, (xmlChar*)name_pointer, opcCompressionOption_t::OPC_COMPRESSIONOPTION_NORMAL); - - std::stringstream ss(data); - std::array buffer; - - while(ss) - { - ss.get((char*)buffer.data(), 1024); - auto count = ss.gcount(); - if(count > 0) - { - opcContainerWriteOutputStream(part_stream, buffer.data(), static_cast(count)); - } - } - opcContainerCloseOutputStream(part_stream); - } - - /// - /// Returns a value that indicates whether this part owns a relationship with a specified Id. - /// - bool relationship_exists(const std::string &id) const; - - /// - /// Returns true if the given Id string is a valid relationship identifier. - /// - bool is_valid_xml_id(const std::string &id); - - void operator=(const part_struct &other); - - compression_option compression_option_; - std::string content_type_; - package &package_; - uri uri_; - opcContainer *container_; -}; - -part::part() : root_(nullptr) -{ - -} - -part::part(package &package, const uri &uri, opcContainer *container) : root_(new part_struct(package, uri, container)) -{ - -} - -std::string part::get_content_type() const -{ - return ""; -} - -std::string part::read() -{ - if(root_ == nullptr) - { - return ""; - } - - return root_->read(); -} - -void part::write(const std::string &data) -{ - if(root_ == nullptr) - { - return; - } - - return root_->write(data); -} - -bool part::operator==(const part &comparand) const -{ - return root_ == comparand.root_; -} - -bool part::operator==(const nullptr_t &) const -{ - return root_ == nullptr; -} - -} // namespace xlnt diff --git a/source/packaging/part.h b/source/packaging/part.h deleted file mode 100644 index 01a0a8bf..00000000 --- a/source/packaging/part.h +++ /dev/null @@ -1,105 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "uri.h" -#include "compression_option.h" -#include "relationship.h" -#include "target_mode.h" -#include "file_mode.h" -#include "file_access.h" - -namespace xlnt { - -struct part_struct; - -/// -/// Represents a part that is stored in a ZipPackage. -/// -class part -{ -public: - /// - /// Initializes a new instance of the part class with a specified parent Package, part URI, MIME content type, and compression_option. - /// - part(package &package, const uri &uri_part, const std::string &mime_type = "", compression_option compression = compression_option::NotCompressed); - - part &operator=(const part &) = delete; - - /// - /// gets the compression option of the part content stream. - /// - compression_option get_compression_option() const; - - /// - /// gets the MIME type of the content stream. - /// - std::string get_content_type() const; - - /// - /// gets the parent Package of the part. - /// - package &get_package() const; - - /// - /// gets the URI of the part. - /// - uri get_uri() const; - - /// - /// Creates a part-level relationship between this part to a specified target part or external resource. - /// - std::shared_ptr create_relationship(const uri &target_uri, target_mode target_mode, const std::string &relationship_type); - - /// - /// Deletes a specified part-level relationship. - /// - void delete_relationship(const std::string &id); - - /// - /// Returns the relationship that has a specified Id. - /// - relationship get_relationship(const std::string &id); - - /// - /// Returns a collection of all the relationships that are owned by this part. - /// - relationship_collection get_relationships(); - - /// - /// Returns a collection of the relationships that match a specified RelationshipType. - /// - relationship_collection get_relationship_by_type(const std::string &relationship_type); - - /// - /// Returns all the content of this part. - /// - std::string read(); - - /// - /// Writes the given data to the part stream. - /// - void write(const std::string &data); - - /// - /// Returns a value that indicates whether this part owns a relationship with a specified Id. - /// - bool relationship_exists(const std::string &id) const; - - bool operator==(const part &comparand) const; - bool operator==(const nullptr_t &) const; - -private: - friend struct package_struct; - - part(); - part(package &package, const uri &uri, opcContainer *container); - - part_struct *root_; -}; - -typedef std::vector part_collection; - -} // namespace xlnt diff --git a/source/packaging/reader.h b/source/packaging/reader.h deleted file mode 100644 index 0b49d3eb..00000000 --- a/source/packaging/reader.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -#include - -#include "workbook.h" - -namespace xlnt { - -class reader -{ -public: - static workbook load_workbook(const std::string &filename); -}; - -} // namespace xlnt diff --git a/source/packaging/relationship.h b/source/packaging/relationship.h deleted file mode 100644 index 36712396..00000000 --- a/source/packaging/relationship.h +++ /dev/null @@ -1,73 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "target_mode.h" -#include "uri.h" - -namespace xlnt { - -class package; - -/// -/// Represents an association between a source Package or part, and a target object which can be a part or external resource. -/// -class relationship -{ -public: - enum class type - { - hyperlink, - drawing, - worksheet, - sharedStrings, - styles, - theme - }; - - relationship(const std::string &type) : source_uri_(""), target_uri_("") - { - if(type == "hyperlink") - { - type_ = type::hyperlink; - } - } - - /// - /// gets a string that identifies the relationship. - /// - std::string get_id() const { return id_; } - - /// - /// gets the URI of the package or part that owns the relationship. - /// - uri getsource_uri() const { return source_uri_; } - - /// - /// gets a value that indicates whether the target of the relationship is or External to the Package. - /// - target_mode get_target_mode() const { return target_mode_; } - - /// - /// gets the URI of the target resource of the relationship. - /// - uri get_target_uri() const { return target_uri_; } - -private: - friend class package; - - relationship(const std::string &id, package &package, const std::string &relationship_type_, uri source_uri, target_mode target_mode, uri target_uri); - relationship &operator=(const relationship &rhs) = delete; - - std::string id_; - type type_; - uri source_uri_; - target_mode target_mode_; - uri target_uri_; -}; - -typedef std::vector> relationship_collection; - -} // namespace xlnt diff --git a/source/packaging/target_mode.h b/source/packaging/target_mode.h deleted file mode 100644 index f9000c29..00000000 --- a/source/packaging/target_mode.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -namespace xlnt { - -/// -/// Specifies whether the target of a relationship is inside or outside the Package. -/// -enum class target_mode -{ - /// - /// The relationship references a part that is inside the package. - /// - External, - /// - /// The relationship references a resource that is external to the package. - /// - Internal -}; - -} // namespace xlnt diff --git a/source/packaging/uri.cpp b/source/packaging/uri.cpp deleted file mode 100644 index 9a031404..00000000 --- a/source/packaging/uri.cpp +++ /dev/null @@ -1,397 +0,0 @@ -#include - -#include "uri.h" - -namespace xlnt { - -namespace { -#ifdef _WIN32 -const char platform_path_separator = '\\'; -#else -const char platform_path_separator = '/'; -#endif - -int get_DefaultPort(const std::string &scheme) -{ - if(scheme == "ftp") return 21; - if(scheme == "sftp") return 22; - if(scheme == "ssh") return 22; - if(scheme == "telnet") return 23; - if(scheme == "smtp") return 25; - if(scheme == "dns") return 53; - if(scheme == "gopher") return 70; - if(scheme == "http") return 80; - if(scheme == "pop3") return 110; - if(scheme == "nntp") return 119; - if(scheme == "snmp") return 161; - if(scheme == "imap") return 143; - if(scheme == "irc") return 194; - if(scheme == "https") return 443; - if(scheme == "smtps") return 465; - return -1; -} -} - -uri::uri(const std::string &uri_string, uri_kind uri_kind) - : original_string_(uri_string), - kind_(uri_kind) -{ - Parse(); -} - -uri &uri::operator=(const uri &rhs) -{ - original_string_ = rhs.original_string_; - kind_ = rhs.kind_; - Parse(); - return *this; -} - -bool uri::IsAbsoluteuri() const -{ - if(kind_ == uri_kind::Absolute) - { - return true; - } - - if(kind_ == uri_kind::Relative) - { - return false; - } - - if(original_string_.size() == 0) - { - return false; - } - - auto scheme_separator = std::find(original_string_.begin(), original_string_.end(), ':'); - if(scheme_separator == original_string_.end()) - { - return false; - } - - if(original_string_[0] == '.') - { - return false; - } - - return true; -} - -void uri::Parse() -{ - if(IsAbsoluteuri()) - { - ParseAbsolute(); - } - else - { - ParseRelative(); - } -} - -void uri::ParseAbsolute() -{ - auto scheme_separator = std::find(original_string_.begin(), original_string_.end(), ':'); - - if(scheme_separator == original_string_.end()) - { - throw std::runtime_error("absolute uri must contain a scheme followed by a colon"); - } - - scheme_ = std::string(original_string_.begin(), scheme_separator); - - port_ = get_DefaultPort(scheme_); - - std::string hier_part(scheme_separator + 1, original_string_.end()); - - auto query_separator = std::find(hier_part.begin(), hier_part.end(), '?'); - if(query_separator != hier_part.end()) - { - query_ = std::string(query_separator + 1, hier_part.end()); - hier_part = std::string(hier_part.begin(), query_separator); - } - - auto fragment_separator = std::find(hier_part.begin(), hier_part.end(), '#'); - if(fragment_separator != hier_part.end()) - { - fragment_ = std::string(fragment_separator + 1, hier_part.end()); - hier_part = std::string(hier_part.begin(), fragment_separator); - } - else - { - fragment_separator = std::find(query_.begin(), query_.end(), '#'); - if(fragment_separator != query_.end()) - { - fragment_ = std::string(fragment_separator + 1, query_.end()); - query_ = std::string(query_.begin(), fragment_separator); - } - } - - if(hier_part.size() > 2 && hier_part[0] == '/' && hier_part[1] == '/') - { - auto path_separator = std::find(hier_part.begin() + 2, hier_part.end(), '/'); - if(path_separator != hier_part.end()) - { - authority_ = std::string(hier_part.begin() + 2, path_separator); - absolute_path_ = std::string(path_separator, hier_part.end()); - if(absolute_path_[0] == '/') - { - if(absolute_path_[1] == '/') - { - throw std::runtime_error("path can't start with //"); - } - } - } - else - { - authority_ = hier_part.substr(2); - absolute_path_ = ""; - } - - ParseAuthority(); - - is_file_ = scheme_ == "file"; - - char abs_path_separator = absolute_path_.find('/') != std::string::npos ? '/' : '\\'; - - if(is_file_) - { - local_path_ = std::string(2, platform_path_separator) + authority_; - } - - if(absolute_path_.size() > 0) - { - std::stringstream ss(absolute_path_); - std::string part; - while(std::getline(ss, part, abs_path_separator)) - { - if(segments_.size() > 0) - { - if(is_file_) - { - segments_.back().append(1, platform_path_separator); - local_path_.append(1, platform_path_separator); - } - else - { - segments_.back().append(1, abs_path_separator); - local_path_.append(1, abs_path_separator); - } - } - segments_.push_back(part); - local_path_.append(part); - } - } - - user_escaped_ = false; - is_unc_ = is_file_ && host_.size() > 0; - is_default_port_ = get_DefaultPort(scheme_) == port_; - is_loopback_ = host_ == "127.0.0.1" || host_ == "localhost" || host_ == "loopback" || host_.size() == 0; - path_and_query_ = absolute_path_ + "?" + query_; - absolute_uri_ = scheme_ + "://"; - if(user_info_.size() > 0) - { - absolute_uri_ += user_info_ + "@"; - } - absolute_uri_ += host_; - if(!is_default_port_) - { - absolute_uri_ += ":" + std::to_string(port_); - } - absolute_uri_ += absolute_path_; - if(query_.size() > 0) - { - absolute_uri_ += "?" + query_; - } - if(fragment_.size() > 0) - { - absolute_uri_ += "#" + fragment_; - } - } -} - -void uri::ParseRelative() -{ - absolute_path_ = ""; - absolute_uri_ = ""; - authority_ = ""; - dns_safe_host_ = ""; - fragment_ = ""; - host_ = ""; - host_name_type_ = uri_host_name_type::Unknown; - is_default_port_ = false; - is_file_ = false; - is_loopback_ = false; - is_unc_ = false; - local_path_ = ""; - path_and_query_ = ""; - port_ = -1; - query_ = ""; - scheme_ = ""; - user_escaped_ = false; - user_info_ = ""; -} - -void uri::ParseAuthority() -{ - if(authority_.size() == 0) - { - return; - } - - host_ = authority_; - - auto user_info_separator = std::find(host_.begin(), host_.end(), '@'); - if(user_info_separator != host_.end()) - { - user_info_ = std::string(host_.begin(), user_info_separator); - host_ = std::string(user_info_separator + 1, host_.end()); - } - - auto port_separator_index = host_.find_last_of(':'); - if(port_separator_index != std::string::npos) - { - port_ = std::stoi(host_.substr(port_separator_index + 1)); - host_ = host_.substr(0, port_separator_index); - } - - dns_safe_host_ = host_; - - if(host_.find(':') == std::string::npos) - { - host_name_type_ = uri_host_name_type::Dns; - } - else - { - host_name_type_ = uri_host_name_type::IPv4; - } -} - -std::string uri::get_AbsolutePath() const -{ - ThrowIfNotAbsolute(); - return absolute_path_; -} - -std::string uri::get_Absoluteuri() const -{ - ThrowIfNotAbsolute(); - return absolute_uri_; -} - -std::string uri::get_Authority() const -{ - ThrowIfNotAbsolute(); - return authority_; -} - -std::string uri::get_DnsSafeHost() const -{ - ThrowIfNotAbsolute(); - return dns_safe_host_; -} - -std::string uri::get_Fragment() const -{ - ThrowIfNotAbsolute(); - return fragment_; -} - -std::string uri::get_Host() const -{ - ThrowIfNotAbsolute(); - return host_; -} - -uri_host_name_type uri::get_HostNameType() const -{ - ThrowIfNotAbsolute(); - return host_name_type_; -} - -bool uri::IsDefaultPort() const -{ - ThrowIfNotAbsolute(); - return is_default_port_; -} - -bool uri::IsFile() const -{ - ThrowIfNotAbsolute(); - return is_file_; -} - -bool uri::IsLoopback() const -{ - ThrowIfNotAbsolute(); - return is_loopback_; -} - -bool uri::IsUnc() const -{ - ThrowIfNotAbsolute(); - return is_unc_; -} - -std::string uri::get_LocalPath() const -{ - ThrowIfNotAbsolute(); - return local_path_; -} - -std::string uri::get_OriginalString() const -{ - return original_string_; -} - -std::string uri::get_PathAndQuery() const -{ - ThrowIfNotAbsolute(); - return path_and_query_; -} - -int uri::get_Port() const -{ - ThrowIfNotAbsolute(); - return port_; -} - -std::string uri::get_Query() const -{ - ThrowIfNotAbsolute(); - return query_; -} - -std::string uri::get_Scheme() const -{ - ThrowIfNotAbsolute(); - return scheme_; -} - -std::vector uri::get_Segments() const -{ - ThrowIfNotAbsolute(); - return segments_; -} - -bool uri::get_UserEscaped() const -{ - return user_escaped_; -} - -std::string uri::get_UserInfo() const -{ - ThrowIfNotAbsolute(); - return user_info_; -} - -void uri::ThrowIfNotAbsolute() const -{ - if(!IsAbsoluteuri()) - { - throw std::runtime_error("InvalidOperationException: This instance represents a relative URI, and this property is valid only for absolute URIs."); - } -} - -} // namespace xlnt diff --git a/source/packaging/uri.h b/source/packaging/uri.h deleted file mode 100644 index 1287575e..00000000 --- a/source/packaging/uri.h +++ /dev/null @@ -1,485 +0,0 @@ -#pragma once - -#include -#include - -namespace xlnt { - -/// -/// Defines the kinds of uris for the uri::IsWellFormeduriString(std::tring, uri_kind) and several other uri methods. -/// -enum class uri_kind -{ - /// - /// The uri is an absolute uri. - /// - Absolute, - /// - /// The uri is a relative uri. - /// - Relative, - /// - /// The kind of the uri is indeterminate. - /// - RelativeOrAbsolute -}; - -/// -/// Defines host name types for the uri.CheckHostName method. -/// -enum class uri_host_name_type -{ - /// - /// The host is set, but the type cannot be determined. - /// - Basic, - /// - /// The host name is a domain name system (DNS) style host name. - /// - Dns, - /// - /// The host name is an Internet Protocol (IP) version 4 host address. - /// - IPv4, - /// - /// The host name is an Internet Protocol (IP) version 6 host address. - /// - IPv6, - /// - /// The type of the host name is not supplied. - /// - Unknown -}; - -/// -/// Specifies the parts of a uri. -/// -enum class uri_components -{ - /// - /// The Scheme, UserInfo, Host, Port, LocalPath, Query, and Fragment data. - /// - Absoluteuri, - /// - /// The Fragment data. - /// - Fragment, - /// - /// The Host data. - /// - Host, - /// - /// The Host and Port data. If no port data is in the uri and a default port has been assigned to the Scheme, the default port is returned. If there is no default port, -1 is returned. - /// - HostAndPort, - /// - /// The Scheme, Host, Port, LocalPath, and Query data. - /// - HttpRequesturi, - /// - /// Specifies that the delimiter should be included. - /// - KeepDelimiter, - /// - /// The normalized form of the Host. - /// - NormalizedHost, - /// - /// The LocalPath data. - /// - Path, - /// - /// The LocalPath and Query data. Also see PathAndQuery. - /// - PathAndQuery, - /// - /// The Port data. - /// - Port, - /// - /// The Query data. - /// - Query, - /// - /// The Scheme data. - /// - Scheme, - /// - /// The Scheme, Host, and Port data. - /// - SchemeAndServer, - /// - /// The Port data. If no port data is in the uri and a default port has been assigned to the Scheme, the default port is returned. If there is no default port, -1 is returned. - /// - StrongPort, - /// - /// The UserInfo data. - /// - UserInfo -}; - -/// -/// Controls how URI information is escaped. -/// -enum class uri_format -{ - /// - /// Characters that have a reserved meaning in the requested URI components remain escaped. All others are not escaped. See Remarks. - /// - SafeUnescaped, - /// - /// No escaping is performed. - /// - Unescaped, - /// - /// Escaping is performed according to the rules in RFC 2396. - /// - uriEscaped -}; - -/// -/// Specifies the culture, case, and sort rules to be used by certain overloads of the String.Compare and String._equals methods -/// -enum class string_comparison -{ - /// - /// Compare strings using culture-sensitive sort rules and the current culture. - /// - CurrentCulture, - /// - /// Compare strings using culture-sensitive sort rules, the current culture, and ignoring the case of the strings being compared. - /// - CurrentCultureIgnoreCase, - /// - /// Compare strings using culture-sensitive sort rules and the invariant culture. - /// - InvariantCulture, - /// - /// Compare strings using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings being compared. - /// - InvariantCultureIgnoreCase, - /// - /// Compare strings using ordinal sort rules. - /// - Ordinal, - /// - /// Compare strings using ordinal sort rules and ignoring the case of the strings being compared. - /// - OrdinalIgnoreCase -}; - -/// -/// Defines the parts of a URI for the uri::get_LeftPart method. -/// -enum class uri_partial -{ - /// - /// The scheme and authority segments of the URI. - /// - Authority, - /// - /// The scheme, authority, and path segments of the URI. - /// - Path, - /// - /// The scheme, authority, path, and query segments of the URI. - /// - Query, - /// - /// The scheme segment of the URI. - /// - Scheme -}; - -/// -/// Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI. -/// -class uri -{ -public: - /// - /// Determines whether the specified host name is a valid DNS name. - /// - static uri_host_name_type CheckHostName(const std::string &name); - - /// - /// Determines whether the specified scheme name is valid. - /// - static bool CheckSchemeName(const std::string &scheme_name); - - /// - /// Compares the specified parts of two URIs using the specified comparison rules. - /// - static int Compare(const uri &uri1, const uri &uri2, const uri_components &parts_to_compare, - uri_format compare_format, string_comparison comparison_type); - - /// - /// Converts a string to its escaped representation. - /// - static std::string EscapeDataString(const std::string &string_to_escape); - - /// - /// Converts a URI string to its escaped representation. - /// - static std::string EscapeuriString(const std::string &string_to_escape); - - /// - /// gets the decimal value of a hexadecimal digit. - /// - static int FromHex(char digit); - - /// - /// Converts a specified character into its hexadecimal equivalent. - /// - static std::string HexEscape(char character); - - /// - /// Converts a specified hexadecimal representation of a character to the character. - /// - static char HexUnescape(const std::string &pattern, int &index); - - /// - /// Determines whether a specified character is a valid hexadecimal digit. - /// - static bool IsHexDigit(char character); - - /// - /// Determines whether a character in a string is hexadecimal encoded. - /// - static bool IsHexEncoding(const std::string &pattern, int index); - - /// - /// Indicates whether the string is well-formed by attempting to construct a URI with the string and ensures that the string does not require further escaping. - /// - static bool IsWellFormeduriString(const std::string &uri_string, uri_kind uri_kind); - - /// - /// Creates a new uri using the specified String instance and a uri_kind. - /// - static bool TryCreate(const std::string &uri_string, uri_kind uri_kind, uri &result); - - /// - /// Creates a new uri using the specified base and relative String instances. - /// - static bool TryCreate(const uri &base_uri, const std::string &relative_uri, uri &result); - - /// - /// Creates a new uri using the specified base and relative uri instances. - /// - static bool TryCreate(const uri &base_uri, const uri &relative_uri, uri &result); - - /// - /// Converts a string to its unescaped representation. - /// - static std::string UnescapeDataString(const std::string &string_to_unescape); - - /// - /// Initializes a new instance of the uri class with the specified URI. This constructor allows you to specify if the URI string is a relative URI, absolute URI, or is indeterminate. - /// - uri(const std::string &uri_string, uri_kind uri_kind = uri_kind::Absolute); - - /// - /// Initializes a new instance of the uri class based on the specified base URI and relative URI string. - /// - uri(const uri &base_uri, const std::string &relative_uri); - - /// - /// Initializes a new instance of the uri class based on the combination of a specified base uri instance and a relative uri instance. - /// - uri(const uri &base_uri, const uri &relative_uri); - - /// - /// - /// - uri &operator=(const uri &); - - /// - /// gets the absolute path of the URI. - /// - std::string get_AbsolutePath() const; - - /// - /// gets the absolute URI. - /// - std::string get_Absoluteuri() const; - - /// - /// gets the Domain Name System (DNS) host name or IP address and the port number for a server. - /// - std::string get_Authority() const; - - /// - /// gets an unescaped host name that is safe to use for DNS resolution. - /// - std::string get_DnsSafeHost() const; - - /// - /// gets the escaped URI fragment. - /// - std::string get_Fragment() const; - - /// - /// gets the host component of this instance. - /// - std::string get_Host() const; - - /// - /// gets the type of the host name specified in the URI. - /// - uri_host_name_type get_HostNameType() const; - - /// - /// gets whether the uri instance is absolute. - /// - bool IsAbsoluteuri() const; - - /// - /// gets whether the port value of the URI is the default for this scheme. - /// - bool IsDefaultPort() const; - - /// - /// gets a value indicating whether the specified uri is a file URI. - /// - bool IsFile() const; - - /// - /// gets whether the specified uri references the local host. - /// - bool IsLoopback() const; - - /// - /// gets whether the specified uri is a universal naming convention (UNC) path. - /// - bool IsUnc() const; - - /// - /// gets a local operating-system representation of a file name. - /// - std::string get_LocalPath() const; - - /// - /// gets the original URI string that was passed to the uri constructor. - /// - std::string get_OriginalString() const; - - /// - /// gets the AbsolutePath and Query properties separated by a question mark (?). - /// - std::string get_PathAndQuery() const; - - /// - /// gets the port number of this URI. - /// - int get_Port() const; - - /// - /// gets any query information included in the specified URI. - /// - std::string get_Query() const; - - /// - /// gets the scheme name for this URI. - /// - std::string get_Scheme() const; - - /// - /// gets an array containing the path segments that make up the specified URI. - /// - std::vector get_Segments() const; - - /// - /// Indicates that the URI string was completely escaped before the uri instance was created. - /// - bool get_UserEscaped() const; - - /// - /// gets the user name, password, or other user-specific information associated with the specified URI. - /// - std::string get_UserInfo() const; - - /// - /// Compares two uri instances for equality. - /// - bool Equals(const uri &comparand); - - /// - /// gets the specified components of the current instance using the specified escaping for special characters. - /// - std::string get_Components(uri_components components, uri_format format); - - /// - /// gets the specified portion of a uri instance. - /// - std::string get_LeftPart(uri_partial part); - - /// - /// Determines whether the current uri instance is a base of the specified uri instance. - /// - bool IsBaseOf(const uri &uri); - - /// - /// Indicates whether the string used to construct this uri was well-formed and is not required to be further escaped. - /// - bool IsWellFormedOriginalString(); - - /// - /// Determines the difference between two uri instances. - /// - uri MakeRelativeuri(const uri &uri); - -private: - void Parse(); - - void ParseAbsolute(); - - void ParseRelative(); - - void ParseAuthority(); - - void ThrowIfNotAbsolute() const; - - std::string original_string_; - - uri_kind kind_; - - std::string absolute_path_; - - std::string absolute_uri_; - - std::string authority_; - - std::string dns_safe_host_; - - std::string fragment_; - - std::string host_; - - uri_host_name_type host_name_type_; - - bool is_default_port_; - - bool is_file_; - - bool is_unc_; - - bool is_loopback_; - - std::string local_path_; - - std::string path_and_query_; - - int port_; - - std::string query_; - - std::string scheme_; - - std::vector segments_; - - bool user_escaped_; - - std::string user_info_; -}; - -} // namespace xlnt diff --git a/source/packaging/windows/file.cpp b/source/packaging/windows/file.cpp deleted file mode 100644 index 4f0a6446..00000000 --- a/source/packaging/windows/file.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include - -#include "../file.h" - -namespace xlnt { - -void file::copy(const std::string &source, const std::string &destination, bool overwrite) -{ - assert(source.size() + 1 < MAX_PATH); - assert(destination.size() + 1 < MAX_PATH); - - std::wstring source_wide(source.begin(), source.end()); - std::wstring destination_wide(destination.begin(), destination.end()); - - BOOL result = CopyFile(source_wide.c_str(), destination_wide.c_str(), !overwrite); - - if(result == 0) - { - DWORD error = GetLastError(); - if(error == ERROR_ACCESS_DENIED) - { - throw std::runtime_error("Access is denied"); - } - if(error == ERROR_ENCRYPTION_FAILED) - { - throw std::runtime_error("The specified file could not be encrypted"); - } - if(error == ERROR_FILE_NOT_FOUND) - { - throw std::runtime_error("The source file wasn't found"); - } - if(!overwrite) - { - throw std::runtime_error("The destination file already exists"); - } - throw std::runtime_error("Unknown error"); - } -} - -bool file::exists(const std::string &path) -{ - std::wstring path_wide(path.begin(), path.end()); - - return PathFileExists(path_wide.c_str()) && !PathIsDirectory(path_wide.c_str()); -} - -} // namespace xlnt diff --git a/source/packaging/writer.h b/source/packaging/writer.h deleted file mode 100644 index b20952a3..00000000 --- a/source/packaging/writer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012-2014 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#pragma once - -#include - -#include "workbook.h" - -namespace xlnt { - -class writer -{ -public: - static void save_workbook(const workbook &workbook, const std::string &filename); -}; - -} // namespace xlnt diff --git a/source/tests/CellTestSuite.h b/source/tests/CellTestSuite.h index 53f40144..64d11998 100644 --- a/source/tests/CellTestSuite.h +++ b/source/tests/CellTestSuite.h @@ -4,10 +4,7 @@ #include #include -#include -#include -#include -#include +#include "../xlnt.h" class CellTestSuite : public CxxTest::TestSuite { @@ -86,8 +83,8 @@ public: void test_initial_value() { xlnt::workbook wb; - xlnt::worksheet ws(wb); - xlnt::cell cell(ws, "A", 1, "17.5"); + auto ws = wb.get_active(); + xlnt::cell cell(ws); TS_ASSERT_EQUALS(xlnt::cell::type::numeric, cell.get_data_type()); } diff --git a/source/tests/ChartTestSuite.h b/source/tests/ChartTestSuite.h index f7a134dd..7ab4a427 100644 --- a/source/tests/ChartTestSuite.h +++ b/source/tests/ChartTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class ChartTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/DumpTestSuite.h b/source/tests/DumpTestSuite.h index 540c6bb7..9bd0a7ae 100644 --- a/source/tests/DumpTestSuite.h +++ b/source/tests/DumpTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class DumpTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/IntegrationTestSuite.h b/source/tests/IntegrationTestSuite.h index 51aea1eb..1f86222e 100644 --- a/source/tests/IntegrationTestSuite.h +++ b/source/tests/IntegrationTestSuite.h @@ -3,9 +3,7 @@ #include #include -#include -#include -#include +#include "../xlnt.h" class IntegrationTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/IterTestSuite.h b/source/tests/IterTestSuite.h index 15e10d01..9d460840 100644 --- a/source/tests/IterTestSuite.h +++ b/source/tests/IterTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class IterTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/MetaTestSuite.h b/source/tests/MetaTestSuite.h index 1c232450..89cfc790 100644 --- a/source/tests/MetaTestSuite.h +++ b/source/tests/MetaTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class MetaTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/NamedRangeTestSuite.h b/source/tests/NamedRangeTestSuite.h index c3c5f444..23b8d4a9 100644 --- a/source/tests/NamedRangeTestSuite.h +++ b/source/tests/NamedRangeTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class NamedRangeTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/NullableTestSuite.h b/source/tests/NullableTestSuite.h index c3e9b17e..0a7f9d40 100644 --- a/source/tests/NullableTestSuite.h +++ b/source/tests/NullableTestSuite.h @@ -3,7 +3,7 @@ #include #include -#include "../misc/nullable.h" +#include "../xlnt.h" class NullableTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/NumberFormatTestSuite.h b/source/tests/NumberFormatTestSuite.h index 14540d53..4a352387 100644 --- a/source/tests/NumberFormatTestSuite.h +++ b/source/tests/NumberFormatTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class NumberFormatTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/PackageTestSuite.h b/source/tests/PackageTestSuite.h index f0b7c5a0..50ef79ad 100644 --- a/source/tests/PackageTestSuite.h +++ b/source/tests/PackageTestSuite.h @@ -2,8 +2,7 @@ #include -#include "../packaging/file.h" -#include "../packaging/package.h" +#include "../xlnt.h" #include "pugixml.hpp" class PackageTestSuite : public CxxTest::TestSuite diff --git a/source/tests/PasswordHashTestSuite.h b/source/tests/PasswordHashTestSuite.h index 9f74b271..6172f5a7 100644 --- a/source/tests/PasswordHashTestSuite.h +++ b/source/tests/PasswordHashTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class PasswordHashTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/PropsTestSuite.h b/source/tests/PropsTestSuite.h index 9d5c55aa..7556ea04 100644 --- a/source/tests/PropsTestSuite.h +++ b/source/tests/PropsTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class PropsTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/ReadTestSuite.h b/source/tests/ReadTestSuite.h index 21b06cd0..cac172a3 100644 --- a/source/tests/ReadTestSuite.h +++ b/source/tests/ReadTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class ReadTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/StringsTestSuite.h b/source/tests/StringsTestSuite.h index 4dff0b50..84c3c2e6 100644 --- a/source/tests/StringsTestSuite.h +++ b/source/tests/StringsTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class StringsTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/StyleTestSuite.h b/source/tests/StyleTestSuite.h index 2ee33035..88b75bbe 100644 --- a/source/tests/StyleTestSuite.h +++ b/source/tests/StyleTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class StyleTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/ThemeTestSuite.h b/source/tests/ThemeTestSuite.h index 585f8546..34188e89 100644 --- a/source/tests/ThemeTestSuite.h +++ b/source/tests/ThemeTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class ThemeTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/UnicodeTestSuite.h b/source/tests/UnicodeTestSuite.h index 44166b9b..7b49171e 100644 --- a/source/tests/UnicodeTestSuite.h +++ b/source/tests/UnicodeTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class UnicodeTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/UriTestSuite.h b/source/tests/UriTestSuite.h index ad824d62..8d7c717d 100644 --- a/source/tests/UriTestSuite.h +++ b/source/tests/UriTestSuite.h @@ -1,7 +1,8 @@ #pragma once #include -#include "../packaging/uri.h" + +#include "../xlnt.h" class uriTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/WorkbookTestSuite.h b/source/tests/WorkbookTestSuite.h index 4f6b26a8..ed5de307 100644 --- a/source/tests/WorkbookTestSuite.h +++ b/source/tests/WorkbookTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class WorkbookTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/WorksheetTestSuite.h b/source/tests/WorksheetTestSuite.h index 18931486..b7e9c08a 100644 --- a/source/tests/WorksheetTestSuite.h +++ b/source/tests/WorksheetTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class WorksheetTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/WriteTestSuite.h b/source/tests/WriteTestSuite.h index 59280e74..d5cbc9c6 100644 --- a/source/tests/WriteTestSuite.h +++ b/source/tests/WriteTestSuite.h @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "../xlnt.h" class WriteTestSuite : public CxxTest::TestSuite { diff --git a/source/tests/runner-autogen.cpp b/source/tests/runner-autogen.cpp index c4aad867..5c535a0c 100644 --- a/source/tests/runner-autogen.cpp +++ b/source/tests/runner-autogen.cpp @@ -26,155 +26,155 @@ bool suite_CellTestSuite_init = false; static CellTestSuite suite_CellTestSuite; static CxxTest::List Tests_CellTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_CellTestSuite( "../../source/tests/CellTestSuite.h", 12, "CellTestSuite", suite_CellTestSuite, Tests_CellTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_CellTestSuite( "../../source/tests/CellTestSuite.h", 9, "CellTestSuite", suite_CellTestSuite, Tests_CellTestSuite ); static class TestDescription_suite_CellTestSuite_test_coordinates : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_coordinates() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 20, "test_coordinates" ) {} + TestDescription_suite_CellTestSuite_test_coordinates() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 17, "test_coordinates" ) {} void runTest() { suite_CellTestSuite.test_coordinates(); } } testDescription_suite_CellTestSuite_test_coordinates; static class TestDescription_suite_CellTestSuite_test_invalid_coordinate : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_invalid_coordinate() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 27, "test_invalid_coordinate" ) {} + TestDescription_suite_CellTestSuite_test_invalid_coordinate() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 24, "test_invalid_coordinate" ) {} void runTest() { suite_CellTestSuite.test_invalid_coordinate(); } } testDescription_suite_CellTestSuite_test_invalid_coordinate; static class TestDescription_suite_CellTestSuite_test_zero_row : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_zero_row() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 32, "test_zero_row" ) {} + TestDescription_suite_CellTestSuite_test_zero_row() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 29, "test_zero_row" ) {} void runTest() { suite_CellTestSuite.test_zero_row(); } } testDescription_suite_CellTestSuite_test_zero_row; static class TestDescription_suite_CellTestSuite_test_absolute : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_absolute() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 37, "test_absolute" ) {} + TestDescription_suite_CellTestSuite_test_absolute() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 34, "test_absolute" ) {} void runTest() { suite_CellTestSuite.test_absolute(); } } testDescription_suite_CellTestSuite_test_absolute; static class TestDescription_suite_CellTestSuite_test_absolute_multiple : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_absolute_multiple() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 42, "test_absolute_multiple" ) {} + TestDescription_suite_CellTestSuite_test_absolute_multiple() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 39, "test_absolute_multiple" ) {} void runTest() { suite_CellTestSuite.test_absolute_multiple(); } } testDescription_suite_CellTestSuite_test_absolute_multiple; static class TestDescription_suite_CellTestSuite_test_column_index : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_column_index() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 47, "test_column_index" ) {} + TestDescription_suite_CellTestSuite_test_column_index() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 44, "test_column_index" ) {} void runTest() { suite_CellTestSuite.test_column_index(); } } testDescription_suite_CellTestSuite_test_column_index; static class TestDescription_suite_CellTestSuite_test_bad_column_index : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_bad_column_index() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 55, "test_bad_column_index" ) {} + TestDescription_suite_CellTestSuite_test_bad_column_index() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 52, "test_bad_column_index" ) {} void runTest() { suite_CellTestSuite.test_bad_column_index(); } } testDescription_suite_CellTestSuite_test_bad_column_index; static class TestDescription_suite_CellTestSuite_test_column_letter_boundries : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_column_letter_boundries() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 69, "test_column_letter_boundries" ) {} + TestDescription_suite_CellTestSuite_test_column_letter_boundries() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 66, "test_column_letter_boundries" ) {} void runTest() { suite_CellTestSuite.test_column_letter_boundries(); } } testDescription_suite_CellTestSuite_test_column_letter_boundries; static class TestDescription_suite_CellTestSuite_test_column_letter : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_column_letter() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 76, "test_column_letter" ) {} + TestDescription_suite_CellTestSuite_test_column_letter() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 73, "test_column_letter" ) {} void runTest() { suite_CellTestSuite.test_column_letter(); } } testDescription_suite_CellTestSuite_test_column_letter; static class TestDescription_suite_CellTestSuite_test_initial_value : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_initial_value() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 86, "test_initial_value" ) {} + TestDescription_suite_CellTestSuite_test_initial_value() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 83, "test_initial_value" ) {} void runTest() { suite_CellTestSuite.test_initial_value(); } } testDescription_suite_CellTestSuite_test_initial_value; static class TestDescription_suite_CellTestSuite_test_null : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_null() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 95, "test_null" ) {} + TestDescription_suite_CellTestSuite_test_null() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 92, "test_null" ) {} void runTest() { suite_CellTestSuite.test_null(); } } testDescription_suite_CellTestSuite_test_null; static class TestDescription_suite_CellTestSuite_test_numeric : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_numeric() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 104, "test_numeric" ) {} + TestDescription_suite_CellTestSuite_test_numeric() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 101, "test_numeric" ) {} void runTest() { suite_CellTestSuite.test_numeric(); } } testDescription_suite_CellTestSuite_test_numeric; static class TestDescription_suite_CellTestSuite_test_string : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_string() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 136, "test_string" ) {} + TestDescription_suite_CellTestSuite_test_string() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 133, "test_string" ) {} void runTest() { suite_CellTestSuite.test_string(); } } testDescription_suite_CellTestSuite_test_string; static class TestDescription_suite_CellTestSuite_test_single_dot : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_single_dot() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 145, "test_single_dot" ) {} + TestDescription_suite_CellTestSuite_test_single_dot() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 142, "test_single_dot" ) {} void runTest() { suite_CellTestSuite.test_single_dot(); } } testDescription_suite_CellTestSuite_test_single_dot; static class TestDescription_suite_CellTestSuite_test_formula : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_formula() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 154, "test_formula" ) {} + TestDescription_suite_CellTestSuite_test_formula() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 151, "test_formula" ) {} void runTest() { suite_CellTestSuite.test_formula(); } } testDescription_suite_CellTestSuite_test_formula; static class TestDescription_suite_CellTestSuite_test_boolean : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_boolean() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 163, "test_boolean" ) {} + TestDescription_suite_CellTestSuite_test_boolean() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 160, "test_boolean" ) {} void runTest() { suite_CellTestSuite.test_boolean(); } } testDescription_suite_CellTestSuite_test_boolean; static class TestDescription_suite_CellTestSuite_test_leading_zero : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_leading_zero() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 174, "test_leading_zero" ) {} + TestDescription_suite_CellTestSuite_test_leading_zero() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 171, "test_leading_zero" ) {} void runTest() { suite_CellTestSuite.test_leading_zero(); } } testDescription_suite_CellTestSuite_test_leading_zero; static class TestDescription_suite_CellTestSuite_test_data_type_check : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_data_type_check() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 195, "test_data_type_check" ) {} + TestDescription_suite_CellTestSuite_test_data_type_check() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 192, "test_data_type_check" ) {} void runTest() { suite_CellTestSuite.test_data_type_check(); } } testDescription_suite_CellTestSuite_test_data_type_check; static class TestDescription_suite_CellTestSuite_test_set_bad_type : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_set_bad_type() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 214, "test_set_bad_type" ) {} + TestDescription_suite_CellTestSuite_test_set_bad_type() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 211, "test_set_bad_type" ) {} void runTest() { suite_CellTestSuite.test_set_bad_type(); } } testDescription_suite_CellTestSuite_test_set_bad_type; static class TestDescription_suite_CellTestSuite_test_time : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_time() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 224, "test_time" ) {} + TestDescription_suite_CellTestSuite_test_time() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 221, "test_time" ) {} void runTest() { suite_CellTestSuite.test_time(); } } testDescription_suite_CellTestSuite_test_time; static class TestDescription_suite_CellTestSuite_test_date_format_on_non_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_date_format_on_non_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 253, "test_date_format_on_non_date" ) {} + TestDescription_suite_CellTestSuite_test_date_format_on_non_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 250, "test_date_format_on_non_date" ) {} void runTest() { suite_CellTestSuite.test_date_format_on_non_date(); } } testDescription_suite_CellTestSuite_test_date_format_on_non_date; static class TestDescription_suite_CellTestSuite_test_set_get_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_set_get_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 265, "test_set_get_date" ) {} + TestDescription_suite_CellTestSuite_test_set_get_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 262, "test_set_get_date" ) {} void runTest() { suite_CellTestSuite.test_set_get_date(); } } testDescription_suite_CellTestSuite_test_set_get_date; static class TestDescription_suite_CellTestSuite_test_repr : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_repr() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 281, "test_repr" ) {} + TestDescription_suite_CellTestSuite_test_repr() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 278, "test_repr" ) {} void runTest() { suite_CellTestSuite.test_repr(); } } testDescription_suite_CellTestSuite_test_repr; static class TestDescription_suite_CellTestSuite_test_is_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_is_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 289, "test_is_date" ) {} + TestDescription_suite_CellTestSuite_test_is_date() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 286, "test_is_date" ) {} void runTest() { suite_CellTestSuite.test_is_date(); } } testDescription_suite_CellTestSuite_test_is_date; static class TestDescription_suite_CellTestSuite_test_is_not_date_color_format : public CxxTest::RealTestDescription { public: - TestDescription_suite_CellTestSuite_test_is_not_date_color_format() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 306, "test_is_not_date_color_format" ) {} + TestDescription_suite_CellTestSuite_test_is_not_date_color_format() : CxxTest::RealTestDescription( Tests_CellTestSuite, suiteDescription_CellTestSuite, 303, "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; @@ -183,89 +183,89 @@ public: static ChartTestSuite suite_ChartTestSuite; static CxxTest::List Tests_ChartTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_ChartTestSuite( "../../source/tests/ChartTestSuite.h", 9, "ChartTestSuite", suite_ChartTestSuite, Tests_ChartTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_ChartTestSuite( "../../source/tests/ChartTestSuite.h", 8, "ChartTestSuite", suite_ChartTestSuite, Tests_ChartTestSuite ); static class TestDescription_suite_ChartTestSuite_test_write_title : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_title() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 37, "test_write_title" ) {} + TestDescription_suite_ChartTestSuite_test_write_title() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 36, "test_write_title" ) {} void runTest() { suite_ChartTestSuite.test_write_title(); } } testDescription_suite_ChartTestSuite_test_write_title; static class TestDescription_suite_ChartTestSuite_test_write_xaxis : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_xaxis() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 45, "test_write_xaxis" ) {} + TestDescription_suite_ChartTestSuite_test_write_xaxis() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 44, "test_write_xaxis" ) {} void runTest() { suite_ChartTestSuite.test_write_xaxis(); } } testDescription_suite_ChartTestSuite_test_write_xaxis; static class TestDescription_suite_ChartTestSuite_test_write_yaxis : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_yaxis() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 53, "test_write_yaxis" ) {} + TestDescription_suite_ChartTestSuite_test_write_yaxis() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 52, "test_write_yaxis" ) {} void runTest() { suite_ChartTestSuite.test_write_yaxis(); } } testDescription_suite_ChartTestSuite_test_write_yaxis; static class TestDescription_suite_ChartTestSuite_test_write_series : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_series() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 61, "test_write_series" ) {} + TestDescription_suite_ChartTestSuite_test_write_series() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 60, "test_write_series" ) {} void runTest() { suite_ChartTestSuite.test_write_series(); } } testDescription_suite_ChartTestSuite_test_write_series; static class TestDescription_suite_ChartTestSuite_test_write_legend : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_legend() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 67, "test_write_legend" ) {} + TestDescription_suite_ChartTestSuite_test_write_legend() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 66, "test_write_legend" ) {} void runTest() { suite_ChartTestSuite.test_write_legend(); } } testDescription_suite_ChartTestSuite_test_write_legend; static class TestDescription_suite_ChartTestSuite_test_no_write_legend : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_no_write_legend() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 73, "test_no_write_legend" ) {} + TestDescription_suite_ChartTestSuite_test_no_write_legend() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 72, "test_no_write_legend" ) {} void runTest() { suite_ChartTestSuite.test_no_write_legend(); } } testDescription_suite_ChartTestSuite_test_no_write_legend; static class TestDescription_suite_ChartTestSuite_test_write_print_settings : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_print_settings() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 93, "test_write_print_settings" ) {} + TestDescription_suite_ChartTestSuite_test_write_print_settings() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 92, "test_write_print_settings" ) {} void runTest() { suite_ChartTestSuite.test_write_print_settings(); } } testDescription_suite_ChartTestSuite_test_write_print_settings; static class TestDescription_suite_ChartTestSuite_test_write_chart : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_chart() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 99, "test_write_chart" ) {} + TestDescription_suite_ChartTestSuite_test_write_chart() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 98, "test_write_chart" ) {} void runTest() { suite_ChartTestSuite.test_write_chart(); } } testDescription_suite_ChartTestSuite_test_write_chart; static class TestDescription_suite_ChartTestSuite_test_write_xaxis_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_xaxis_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 124, "test_write_xaxis_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_xaxis_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 123, "test_write_xaxis_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_xaxis_scatter(); } } testDescription_suite_ChartTestSuite_test_write_xaxis_scatter; static class TestDescription_suite_ChartTestSuite_test_write_yaxis_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_yaxis_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 131, "test_write_yaxis_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_yaxis_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 130, "test_write_yaxis_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_yaxis_scatter(); } } testDescription_suite_ChartTestSuite_test_write_yaxis_scatter; static class TestDescription_suite_ChartTestSuite_test_write_series_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_series_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 138, "test_write_series_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_series_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 137, "test_write_series_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_series_scatter(); } } testDescription_suite_ChartTestSuite_test_write_series_scatter; static class TestDescription_suite_ChartTestSuite_test_write_legend_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_legend_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 144, "test_write_legend_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_legend_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 143, "test_write_legend_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_legend_scatter(); } } testDescription_suite_ChartTestSuite_test_write_legend_scatter; static class TestDescription_suite_ChartTestSuite_test_write_print_settings_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_print_settings_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 150, "test_write_print_settings_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_print_settings_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 149, "test_write_print_settings_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_print_settings_scatter(); } } testDescription_suite_ChartTestSuite_test_write_print_settings_scatter; static class TestDescription_suite_ChartTestSuite_test_write_chart_scatter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ChartTestSuite_test_write_chart_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 156, "test_write_chart_scatter" ) {} + TestDescription_suite_ChartTestSuite_test_write_chart_scatter() : CxxTest::RealTestDescription( Tests_ChartTestSuite, suiteDescription_ChartTestSuite, 155, "test_write_chart_scatter" ) {} void runTest() { suite_ChartTestSuite.test_write_chart_scatter(); } } testDescription_suite_ChartTestSuite_test_write_chart_scatter; @@ -274,47 +274,47 @@ public: static DumpTestSuite suite_DumpTestSuite; static CxxTest::List Tests_DumpTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_DumpTestSuite( "../../source/tests/DumpTestSuite.h", 9, "DumpTestSuite", suite_DumpTestSuite, Tests_DumpTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_DumpTestSuite( "../../source/tests/DumpTestSuite.h", 8, "DumpTestSuite", suite_DumpTestSuite, Tests_DumpTestSuite ); static class TestDescription_suite_DumpTestSuite_test_dump_sheet_title : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_dump_sheet_title() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 26, "test_dump_sheet_title" ) {} + TestDescription_suite_DumpTestSuite_test_dump_sheet_title() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 25, "test_dump_sheet_title" ) {} void runTest() { suite_DumpTestSuite.test_dump_sheet_title(); } } testDescription_suite_DumpTestSuite_test_dump_sheet_title; static class TestDescription_suite_DumpTestSuite_test_dump_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_dump_sheet() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 37, "test_dump_sheet" ) {} + TestDescription_suite_DumpTestSuite_test_dump_sheet() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 36, "test_dump_sheet" ) {} void runTest() { suite_DumpTestSuite.test_dump_sheet(); } } testDescription_suite_DumpTestSuite_test_dump_sheet; static class TestDescription_suite_DumpTestSuite_test_table_builder : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_table_builder() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 82, "test_table_builder" ) {} + TestDescription_suite_DumpTestSuite_test_table_builder() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 81, "test_table_builder" ) {} void runTest() { suite_DumpTestSuite.test_table_builder(); } } testDescription_suite_DumpTestSuite_test_table_builder; static class TestDescription_suite_DumpTestSuite_test_open_too_many_files : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_open_too_many_files() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 109, "test_open_too_many_files" ) {} + TestDescription_suite_DumpTestSuite_test_open_too_many_files() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 108, "test_open_too_many_files" ) {} void runTest() { suite_DumpTestSuite.test_open_too_many_files(); } } testDescription_suite_DumpTestSuite_test_open_too_many_files; static class TestDescription_suite_DumpTestSuite_test_create_temp_file : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_create_temp_file() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 122, "test_create_temp_file" ) {} + TestDescription_suite_DumpTestSuite_test_create_temp_file() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 121, "test_create_temp_file" ) {} void runTest() { suite_DumpTestSuite.test_create_temp_file(); } } testDescription_suite_DumpTestSuite_test_create_temp_file; static class TestDescription_suite_DumpTestSuite_test_dump_twice : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_dump_twice() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 132, "test_dump_twice" ) {} + TestDescription_suite_DumpTestSuite_test_dump_twice() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 131, "test_dump_twice" ) {} void runTest() { suite_DumpTestSuite.test_dump_twice(); } } testDescription_suite_DumpTestSuite_test_dump_twice; static class TestDescription_suite_DumpTestSuite_test_append_after_save : public CxxTest::RealTestDescription { public: - TestDescription_suite_DumpTestSuite_test_append_after_save() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 146, "test_append_after_save" ) {} + TestDescription_suite_DumpTestSuite_test_append_after_save() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 145, "test_append_after_save" ) {} void runTest() { suite_DumpTestSuite.test_append_after_save(); } } testDescription_suite_DumpTestSuite_test_append_after_save; @@ -323,11 +323,11 @@ public: static IntegrationTestSuite suite_IntegrationTestSuite; static CxxTest::List Tests_IntegrationTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_IntegrationTestSuite( "../../source/tests/IntegrationTestSuite.h", 10, "IntegrationTestSuite", suite_IntegrationTestSuite, Tests_IntegrationTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_IntegrationTestSuite( "../../source/tests/IntegrationTestSuite.h", 8, "IntegrationTestSuite", suite_IntegrationTestSuite, Tests_IntegrationTestSuite ); static class TestDescription_suite_IntegrationTestSuite_test_1 : public CxxTest::RealTestDescription { public: - TestDescription_suite_IntegrationTestSuite_test_1() : CxxTest::RealTestDescription( Tests_IntegrationTestSuite, suiteDescription_IntegrationTestSuite, 18, "test_1" ) {} + TestDescription_suite_IntegrationTestSuite_test_1() : CxxTest::RealTestDescription( Tests_IntegrationTestSuite, suiteDescription_IntegrationTestSuite, 16, "test_1" ) {} void runTest() { suite_IntegrationTestSuite.test_1(); } } testDescription_suite_IntegrationTestSuite_test_1; @@ -336,53 +336,53 @@ public: static IterTestSuite suite_IterTestSuite; static CxxTest::List Tests_IterTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_IterTestSuite( "../../source/tests/IterTestSuite.h", 9, "IterTestSuite", suite_IterTestSuite, Tests_IterTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_IterTestSuite( "../../source/tests/IterTestSuite.h", 8, "IterTestSuite", suite_IterTestSuite, Tests_IterTestSuite ); static class TestDescription_suite_IterTestSuite_test_1 : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_1() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 17, "test_1" ) {} + TestDescription_suite_IterTestSuite_test_1() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 16, "test_1" ) {} void runTest() { suite_IterTestSuite.test_1(); } } testDescription_suite_IterTestSuite_test_1; static class TestDescription_suite_IterTestSuite_test_get_dimensions : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_get_dimensions() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 22, "test_get_dimensions" ) {} + TestDescription_suite_IterTestSuite_test_get_dimensions() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 21, "test_get_dimensions" ) {} void runTest() { suite_IterTestSuite.test_get_dimensions(); } } testDescription_suite_IterTestSuite_test_get_dimensions; static class TestDescription_suite_IterTestSuite_test_read_fast_integrated : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_read_fast_integrated() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 34, "test_read_fast_integrated" ) {} + TestDescription_suite_IterTestSuite_test_read_fast_integrated() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 33, "test_read_fast_integrated" ) {} void runTest() { suite_IterTestSuite.test_read_fast_integrated(); } } testDescription_suite_IterTestSuite_test_read_fast_integrated; static class TestDescription_suite_IterTestSuite_test_get_boundaries_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_get_boundaries_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 54, "test_get_boundaries_range" ) {} + TestDescription_suite_IterTestSuite_test_get_boundaries_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 53, "test_get_boundaries_range" ) {} void runTest() { suite_IterTestSuite.test_get_boundaries_range(); } } testDescription_suite_IterTestSuite_test_get_boundaries_range; static class TestDescription_suite_IterTestSuite_test_get_boundaries_one : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_get_boundaries_one() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 59, "test_get_boundaries_one" ) {} + TestDescription_suite_IterTestSuite_test_get_boundaries_one() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 58, "test_get_boundaries_one" ) {} void runTest() { suite_IterTestSuite.test_get_boundaries_one(); } } testDescription_suite_IterTestSuite_test_get_boundaries_one; static class TestDescription_suite_IterTestSuite_test_read_single_cell_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_read_single_cell_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 64, "test_read_single_cell_range" ) {} + TestDescription_suite_IterTestSuite_test_read_single_cell_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 63, "test_read_single_cell_range" ) {} void runTest() { suite_IterTestSuite.test_read_single_cell_range(); } } testDescription_suite_IterTestSuite_test_read_single_cell_range; static class TestDescription_suite_IterTestSuite_test_read_fast_integrated2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_read_fast_integrated2() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 72, "test_read_fast_integrated2" ) {} + TestDescription_suite_IterTestSuite_test_read_fast_integrated2() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 71, "test_read_fast_integrated2" ) {} void runTest() { suite_IterTestSuite.test_read_fast_integrated2(); } } testDescription_suite_IterTestSuite_test_read_fast_integrated2; static class TestDescription_suite_IterTestSuite_test_read_single_cell_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_IterTestSuite_test_read_single_cell_date() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 90, "test_read_single_cell_date" ) {} + TestDescription_suite_IterTestSuite_test_read_single_cell_date() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 89, "test_read_single_cell_date" ) {} void runTest() { suite_IterTestSuite.test_read_single_cell_date(); } } testDescription_suite_IterTestSuite_test_read_single_cell_date; @@ -391,17 +391,17 @@ public: static MetaTestSuite suite_MetaTestSuite; static CxxTest::List Tests_MetaTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_MetaTestSuite( "../../source/tests/MetaTestSuite.h", 9, "MetaTestSuite", suite_MetaTestSuite, Tests_MetaTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_MetaTestSuite( "../../source/tests/MetaTestSuite.h", 8, "MetaTestSuite", suite_MetaTestSuite, Tests_MetaTestSuite ); static class TestDescription_suite_MetaTestSuite_test_write_content_types : public CxxTest::RealTestDescription { public: - TestDescription_suite_MetaTestSuite_test_write_content_types() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 17, "test_write_content_types" ) {} + TestDescription_suite_MetaTestSuite_test_write_content_types() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 16, "test_write_content_types" ) {} void runTest() { suite_MetaTestSuite.test_write_content_types(); } } testDescription_suite_MetaTestSuite_test_write_content_types; static class TestDescription_suite_MetaTestSuite_test_write_root_rels : public CxxTest::RealTestDescription { public: - TestDescription_suite_MetaTestSuite_test_write_root_rels() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 28, "test_write_root_rels" ) {} + TestDescription_suite_MetaTestSuite_test_write_root_rels() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 27, "test_write_root_rels" ) {} void runTest() { suite_MetaTestSuite.test_write_root_rels(); } } testDescription_suite_MetaTestSuite_test_write_root_rels; @@ -410,89 +410,89 @@ public: static NamedRangeTestSuite suite_NamedRangeTestSuite; static CxxTest::List Tests_NamedRangeTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_NamedRangeTestSuite( "../../source/tests/NamedRangeTestSuite.h", 9, "NamedRangeTestSuite", suite_NamedRangeTestSuite, Tests_NamedRangeTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_NamedRangeTestSuite( "../../source/tests/NamedRangeTestSuite.h", 8, "NamedRangeTestSuite", suite_NamedRangeTestSuite, Tests_NamedRangeTestSuite ); static class TestDescription_suite_NamedRangeTestSuite_test_split : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_split() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 17, "test_split" ) {} + TestDescription_suite_NamedRangeTestSuite_test_split() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 16, "test_split" ) {} void runTest() { suite_NamedRangeTestSuite.test_split(); } } testDescription_suite_NamedRangeTestSuite_test_split; static class TestDescription_suite_NamedRangeTestSuite_test_split_no_quotes : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_split_no_quotes() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 22, "test_split_no_quotes" ) {} + TestDescription_suite_NamedRangeTestSuite_test_split_no_quotes() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 21, "test_split_no_quotes" ) {} void runTest() { suite_NamedRangeTestSuite.test_split_no_quotes(); } } testDescription_suite_NamedRangeTestSuite_test_split_no_quotes; static class TestDescription_suite_NamedRangeTestSuite_test_bad_range_name : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_bad_range_name() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 27, "test_bad_range_name" ) {} + TestDescription_suite_NamedRangeTestSuite_test_bad_range_name() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 26, "test_bad_range_name" ) {} void runTest() { suite_NamedRangeTestSuite.test_bad_range_name(); } } testDescription_suite_NamedRangeTestSuite_test_bad_range_name; static class TestDescription_suite_NamedRangeTestSuite_test_range_name_worksheet_special_chars : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_range_name_worksheet_special_chars() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 32, "test_range_name_worksheet_special_chars" ) {} + TestDescription_suite_NamedRangeTestSuite_test_range_name_worksheet_special_chars() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 31, "test_range_name_worksheet_special_chars" ) {} void runTest() { suite_NamedRangeTestSuite.test_range_name_worksheet_special_chars(); } } testDescription_suite_NamedRangeTestSuite_test_range_name_worksheet_special_chars; static class TestDescription_suite_NamedRangeTestSuite_test_read_named_ranges : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_read_named_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 71, "test_read_named_ranges" ) {} + TestDescription_suite_NamedRangeTestSuite_test_read_named_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 70, "test_read_named_ranges" ) {} void runTest() { suite_NamedRangeTestSuite.test_read_named_ranges(); } } testDescription_suite_NamedRangeTestSuite_test_read_named_ranges; static class TestDescription_suite_NamedRangeTestSuite_test_oddly_shaped_named_ranges : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_oddly_shaped_named_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 100, "test_oddly_shaped_named_ranges" ) {} + TestDescription_suite_NamedRangeTestSuite_test_oddly_shaped_named_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 99, "test_oddly_shaped_named_ranges" ) {} void runTest() { suite_NamedRangeTestSuite.test_oddly_shaped_named_ranges(); } } testDescription_suite_NamedRangeTestSuite_test_oddly_shaped_named_ranges; static class TestDescription_suite_NamedRangeTestSuite_test_merged_cells_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_merged_cells_named_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 123, "test_merged_cells_named_range" ) {} + TestDescription_suite_NamedRangeTestSuite_test_merged_cells_named_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 122, "test_merged_cells_named_range" ) {} void runTest() { suite_NamedRangeTestSuite.test_merged_cells_named_range(); } } testDescription_suite_NamedRangeTestSuite_test_merged_cells_named_range; static class TestDescription_suite_NamedRangeTestSuite_test_has_ranges : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_has_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 149, "test_has_ranges" ) {} + TestDescription_suite_NamedRangeTestSuite_test_has_ranges() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 148, "test_has_ranges" ) {} void runTest() { suite_NamedRangeTestSuite.test_has_ranges(); } } testDescription_suite_NamedRangeTestSuite_test_has_ranges; static class TestDescription_suite_NamedRangeTestSuite_test_workbook_has_normal_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_workbook_has_normal_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 155, "test_workbook_has_normal_range" ) {} + TestDescription_suite_NamedRangeTestSuite_test_workbook_has_normal_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 154, "test_workbook_has_normal_range" ) {} void runTest() { suite_NamedRangeTestSuite.test_workbook_has_normal_range(); } } testDescription_suite_NamedRangeTestSuite_test_workbook_has_normal_range; static class TestDescription_suite_NamedRangeTestSuite_test_workbook_has_value_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_workbook_has_value_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 161, "test_workbook_has_value_range" ) {} + TestDescription_suite_NamedRangeTestSuite_test_workbook_has_value_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 160, "test_workbook_has_value_range" ) {} void runTest() { suite_NamedRangeTestSuite.test_workbook_has_value_range(); } } testDescription_suite_NamedRangeTestSuite_test_workbook_has_value_range; static class TestDescription_suite_NamedRangeTestSuite_test_worksheet_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_worksheet_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 168, "test_worksheet_range" ) {} + TestDescription_suite_NamedRangeTestSuite_test_worksheet_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 167, "test_worksheet_range" ) {} void runTest() { suite_NamedRangeTestSuite.test_worksheet_range(); } } testDescription_suite_NamedRangeTestSuite_test_worksheet_range; static class TestDescription_suite_NamedRangeTestSuite_test_worksheet_range_error_on_value_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_worksheet_range_error_on_value_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 173, "test_worksheet_range_error_on_value_range" ) {} + TestDescription_suite_NamedRangeTestSuite_test_worksheet_range_error_on_value_range() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 172, "test_worksheet_range_error_on_value_range" ) {} void runTest() { suite_NamedRangeTestSuite.test_worksheet_range_error_on_value_range(); } } testDescription_suite_NamedRangeTestSuite_test_worksheet_range_error_on_value_range; static class TestDescription_suite_NamedRangeTestSuite_test_handles_scope : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_handles_scope() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 200, "test_handles_scope" ) {} + TestDescription_suite_NamedRangeTestSuite_test_handles_scope() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 199, "test_handles_scope" ) {} void runTest() { suite_NamedRangeTestSuite.test_handles_scope(); } } testDescription_suite_NamedRangeTestSuite_test_handles_scope; static class TestDescription_suite_NamedRangeTestSuite_test_can_be_saved : public CxxTest::RealTestDescription { public: - TestDescription_suite_NamedRangeTestSuite_test_can_be_saved() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 207, "test_can_be_saved" ) {} + TestDescription_suite_NamedRangeTestSuite_test_can_be_saved() : CxxTest::RealTestDescription( Tests_NamedRangeTestSuite, suiteDescription_NamedRangeTestSuite, 206, "test_can_be_saved" ) {} void runTest() { suite_NamedRangeTestSuite.test_can_be_saved(); } } testDescription_suite_NamedRangeTestSuite_test_can_be_saved; @@ -538,101 +538,101 @@ public: static NumberFormatTestSuite suite_NumberFormatTestSuite; static CxxTest::List Tests_NumberFormatTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_NumberFormatTestSuite( "../../source/tests/NumberFormatTestSuite.h", 9, "NumberFormatTestSuite", suite_NumberFormatTestSuite, Tests_NumberFormatTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_NumberFormatTestSuite( "../../source/tests/NumberFormatTestSuite.h", 8, "NumberFormatTestSuite", suite_NumberFormatTestSuite, Tests_NumberFormatTestSuite ); static class TestDescription_suite_NumberFormatTestSuite_test_convert_date_to_julian : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_convert_date_to_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 24, "test_convert_date_to_julian" ) {} + TestDescription_suite_NumberFormatTestSuite_test_convert_date_to_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 23, "test_convert_date_to_julian" ) {} void runTest() { suite_NumberFormatTestSuite.test_convert_date_to_julian(); } } testDescription_suite_NumberFormatTestSuite_test_convert_date_to_julian; static class TestDescription_suite_NumberFormatTestSuite_test_convert_date_from_julian : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_convert_date_from_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 29, "test_convert_date_from_julian" ) {} + TestDescription_suite_NumberFormatTestSuite_test_convert_date_from_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 28, "test_convert_date_from_julian" ) {} void runTest() { suite_NumberFormatTestSuite.test_convert_date_from_julian(); } } testDescription_suite_NumberFormatTestSuite_test_convert_date_from_julian; static class TestDescription_suite_NumberFormatTestSuite_test_convert_datetime_to_julian : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_convert_datetime_to_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 48, "test_convert_datetime_to_julian" ) {} + TestDescription_suite_NumberFormatTestSuite_test_convert_datetime_to_julian() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 47, "test_convert_datetime_to_julian" ) {} void runTest() { suite_NumberFormatTestSuite.test_convert_datetime_to_julian(); } } testDescription_suite_NumberFormatTestSuite_test_convert_datetime_to_julian; static class TestDescription_suite_NumberFormatTestSuite_test_insert_float : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_insert_float() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 54, "test_insert_float" ) {} + TestDescription_suite_NumberFormatTestSuite_test_insert_float() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 53, "test_insert_float" ) {} void runTest() { suite_NumberFormatTestSuite.test_insert_float(); } } testDescription_suite_NumberFormatTestSuite_test_insert_float; static class TestDescription_suite_NumberFormatTestSuite_test_insert_percentage : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_insert_percentage() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 60, "test_insert_percentage" ) {} + TestDescription_suite_NumberFormatTestSuite_test_insert_percentage() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 59, "test_insert_percentage" ) {} void runTest() { suite_NumberFormatTestSuite.test_insert_percentage(); } } testDescription_suite_NumberFormatTestSuite_test_insert_percentage; static class TestDescription_suite_NumberFormatTestSuite_test_insert_datetime : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_insert_datetime() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 67, "test_insert_datetime" ) {} + TestDescription_suite_NumberFormatTestSuite_test_insert_datetime() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 66, "test_insert_datetime" ) {} void runTest() { suite_NumberFormatTestSuite.test_insert_datetime(); } } testDescription_suite_NumberFormatTestSuite_test_insert_datetime; static class TestDescription_suite_NumberFormatTestSuite_test_insert_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_insert_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 73, "test_insert_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_insert_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 72, "test_insert_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_insert_date(); } } testDescription_suite_NumberFormatTestSuite_test_insert_date; static class TestDescription_suite_NumberFormatTestSuite_test_internal_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_internal_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 79, "test_internal_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_internal_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 78, "test_internal_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_internal_date(); } } testDescription_suite_NumberFormatTestSuite_test_internal_date; static class TestDescription_suite_NumberFormatTestSuite_test_datetime_interpretation : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_datetime_interpretation() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 86, "test_datetime_interpretation" ) {} + TestDescription_suite_NumberFormatTestSuite_test_datetime_interpretation() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 85, "test_datetime_interpretation" ) {} void runTest() { suite_NumberFormatTestSuite.test_datetime_interpretation(); } } testDescription_suite_NumberFormatTestSuite_test_datetime_interpretation; static class TestDescription_suite_NumberFormatTestSuite_test_date_interpretation : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_date_interpretation() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 93, "test_date_interpretation" ) {} + TestDescription_suite_NumberFormatTestSuite_test_date_interpretation() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 92, "test_date_interpretation" ) {} void runTest() { suite_NumberFormatTestSuite.test_date_interpretation(); } } testDescription_suite_NumberFormatTestSuite_test_date_interpretation; static class TestDescription_suite_NumberFormatTestSuite_test_number_format_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_number_format_style() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 100, "test_number_format_style" ) {} + TestDescription_suite_NumberFormatTestSuite_test_number_format_style() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 99, "test_number_format_style" ) {} void runTest() { suite_NumberFormatTestSuite.test_number_format_style(); } } testDescription_suite_NumberFormatTestSuite_test_number_format_style; static class TestDescription_suite_NumberFormatTestSuite_test_date_format_on_non_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_date_format_on_non_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 107, "test_date_format_on_non_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_date_format_on_non_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 106, "test_date_format_on_non_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_date_format_on_non_date(); } } testDescription_suite_NumberFormatTestSuite_test_date_format_on_non_date; static class TestDescription_suite_NumberFormatTestSuite_test_1900_leap_year : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_1900_leap_year() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 129, "test_1900_leap_year" ) {} + TestDescription_suite_NumberFormatTestSuite_test_1900_leap_year() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 128, "test_1900_leap_year" ) {} void runTest() { suite_NumberFormatTestSuite.test_1900_leap_year(); } } testDescription_suite_NumberFormatTestSuite_test_1900_leap_year; static class TestDescription_suite_NumberFormatTestSuite_test_bad_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_bad_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 135, "test_bad_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_bad_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 134, "test_bad_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_bad_date(); } } testDescription_suite_NumberFormatTestSuite_test_bad_date; static class TestDescription_suite_NumberFormatTestSuite_test_bad_julian_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_bad_julian_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 149, "test_bad_julian_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_bad_julian_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 148, "test_bad_julian_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_bad_julian_date(); } } testDescription_suite_NumberFormatTestSuite_test_bad_julian_date; static class TestDescription_suite_NumberFormatTestSuite_test_mac_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_NumberFormatTestSuite_test_mac_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 154, "test_mac_date" ) {} + TestDescription_suite_NumberFormatTestSuite_test_mac_date() : CxxTest::RealTestDescription( Tests_NumberFormatTestSuite, suiteDescription_NumberFormatTestSuite, 153, "test_mac_date" ) {} void runTest() { suite_NumberFormatTestSuite.test_mac_date(); } } testDescription_suite_NumberFormatTestSuite_test_mac_date; @@ -641,23 +641,23 @@ public: static PackageTestSuite suite_PackageTestSuite; static CxxTest::List Tests_PackageTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_PackageTestSuite( "../../source/tests/PackageTestSuite.h", 9, "PackageTestSuite", suite_PackageTestSuite, Tests_PackageTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_PackageTestSuite( "../../source/tests/PackageTestSuite.h", 8, "PackageTestSuite", suite_PackageTestSuite, Tests_PackageTestSuite ); static class TestDescription_suite_PackageTestSuite_test_read_text : public CxxTest::RealTestDescription { public: - TestDescription_suite_PackageTestSuite_test_read_text() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 17, "test_read_text" ) {} + TestDescription_suite_PackageTestSuite_test_read_text() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 16, "test_read_text" ) {} void runTest() { suite_PackageTestSuite.test_read_text(); } } testDescription_suite_PackageTestSuite_test_read_text; static class TestDescription_suite_PackageTestSuite_test_write_text : public CxxTest::RealTestDescription { public: - TestDescription_suite_PackageTestSuite_test_write_text() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 29, "test_write_text" ) {} + TestDescription_suite_PackageTestSuite_test_write_text() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 28, "test_write_text" ) {} void runTest() { suite_PackageTestSuite.test_write_text(); } } testDescription_suite_PackageTestSuite_test_write_text; static class TestDescription_suite_PackageTestSuite_test_read_xml : public CxxTest::RealTestDescription { public: - TestDescription_suite_PackageTestSuite_test_read_xml() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 54, "test_read_xml" ) {} + TestDescription_suite_PackageTestSuite_test_read_xml() : CxxTest::RealTestDescription( Tests_PackageTestSuite, suiteDescription_PackageTestSuite, 53, "test_read_xml" ) {} void runTest() { suite_PackageTestSuite.test_read_xml(); } } testDescription_suite_PackageTestSuite_test_read_xml; @@ -666,17 +666,17 @@ public: static PasswordHashTestSuite suite_PasswordHashTestSuite; static CxxTest::List Tests_PasswordHashTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_PasswordHashTestSuite( "../../source/tests/PasswordHashTestSuite.h", 9, "PasswordHashTestSuite", suite_PasswordHashTestSuite, Tests_PasswordHashTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_PasswordHashTestSuite( "../../source/tests/PasswordHashTestSuite.h", 8, "PasswordHashTestSuite", suite_PasswordHashTestSuite, Tests_PasswordHashTestSuite ); static class TestDescription_suite_PasswordHashTestSuite_test_hasher : public CxxTest::RealTestDescription { public: - TestDescription_suite_PasswordHashTestSuite_test_hasher() : CxxTest::RealTestDescription( Tests_PasswordHashTestSuite, suiteDescription_PasswordHashTestSuite, 17, "test_hasher" ) {} + TestDescription_suite_PasswordHashTestSuite_test_hasher() : CxxTest::RealTestDescription( Tests_PasswordHashTestSuite, suiteDescription_PasswordHashTestSuite, 16, "test_hasher" ) {} void runTest() { suite_PasswordHashTestSuite.test_hasher(); } } testDescription_suite_PasswordHashTestSuite_test_hasher; static class TestDescription_suite_PasswordHashTestSuite_test_sheet_protection : public CxxTest::RealTestDescription { public: - TestDescription_suite_PasswordHashTestSuite_test_sheet_protection() : CxxTest::RealTestDescription( Tests_PasswordHashTestSuite, suiteDescription_PasswordHashTestSuite, 22, "test_sheet_protection" ) {} + TestDescription_suite_PasswordHashTestSuite_test_sheet_protection() : CxxTest::RealTestDescription( Tests_PasswordHashTestSuite, suiteDescription_PasswordHashTestSuite, 21, "test_sheet_protection" ) {} void runTest() { suite_PasswordHashTestSuite.test_sheet_protection(); } } testDescription_suite_PasswordHashTestSuite_test_sheet_protection; @@ -685,47 +685,47 @@ public: static PropsTestSuite suite_PropsTestSuite; static CxxTest::List Tests_PropsTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_PropsTestSuite( "../../source/tests/PropsTestSuite.h", 9, "PropsTestSuite", suite_PropsTestSuite, Tests_PropsTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_PropsTestSuite( "../../source/tests/PropsTestSuite.h", 8, "PropsTestSuite", suite_PropsTestSuite, Tests_PropsTestSuite ); static class TestDescription_suite_PropsTestSuite_test_1 : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_1() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 17, "test_1" ) {} + TestDescription_suite_PropsTestSuite_test_1() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 16, "test_1" ) {} void runTest() { suite_PropsTestSuite.test_1(); } } testDescription_suite_PropsTestSuite_test_1; static class TestDescription_suite_PropsTestSuite_test_read_properties_core : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_read_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 36, "test_read_properties_core" ) {} + TestDescription_suite_PropsTestSuite_test_read_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 35, "test_read_properties_core" ) {} void runTest() { suite_PropsTestSuite.test_read_properties_core(); } } testDescription_suite_PropsTestSuite_test_read_properties_core; static class TestDescription_suite_PropsTestSuite_test_read_sheets_titles : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_read_sheets_titles() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 47, "test_read_sheets_titles" ) {} + TestDescription_suite_PropsTestSuite_test_read_sheets_titles() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 46, "test_read_sheets_titles" ) {} void runTest() { suite_PropsTestSuite.test_read_sheets_titles(); } } testDescription_suite_PropsTestSuite_test_read_sheets_titles; static class TestDescription_suite_PropsTestSuite_test_read_properties_core2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_read_properties_core2() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 68, "test_read_properties_core2" ) {} + TestDescription_suite_PropsTestSuite_test_read_properties_core2() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 67, "test_read_properties_core2" ) {} void runTest() { suite_PropsTestSuite.test_read_properties_core2(); } } testDescription_suite_PropsTestSuite_test_read_properties_core2; static class TestDescription_suite_PropsTestSuite_test_read_sheets_titles2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_read_sheets_titles2() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 75, "test_read_sheets_titles2" ) {} + TestDescription_suite_PropsTestSuite_test_read_sheets_titles2() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 74, "test_read_sheets_titles2" ) {} void runTest() { suite_PropsTestSuite.test_read_sheets_titles2(); } } testDescription_suite_PropsTestSuite_test_read_sheets_titles2; static class TestDescription_suite_PropsTestSuite_test_write_properties_core : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_write_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 95, "test_write_properties_core" ) {} + TestDescription_suite_PropsTestSuite_test_write_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 94, "test_write_properties_core" ) {} void runTest() { suite_PropsTestSuite.test_write_properties_core(); } } testDescription_suite_PropsTestSuite_test_write_properties_core; static class TestDescription_suite_PropsTestSuite_test_write_properties_app : public CxxTest::RealTestDescription { public: - TestDescription_suite_PropsTestSuite_test_write_properties_app() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 107, "test_write_properties_app" ) {} + TestDescription_suite_PropsTestSuite_test_write_properties_app() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 106, "test_write_properties_app" ) {} void runTest() { suite_PropsTestSuite.test_write_properties_app(); } } testDescription_suite_PropsTestSuite_test_write_properties_app; @@ -734,131 +734,131 @@ public: static ReadTestSuite suite_ReadTestSuite; static CxxTest::List Tests_ReadTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_ReadTestSuite( "../../source/tests/ReadTestSuite.h", 9, "ReadTestSuite", suite_ReadTestSuite, Tests_ReadTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_ReadTestSuite( "../../source/tests/ReadTestSuite.h", 8, "ReadTestSuite", suite_ReadTestSuite, Tests_ReadTestSuite ); static class TestDescription_suite_ReadTestSuite_test_read_standalone_worksheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_standalone_worksheet() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 17, "test_read_standalone_worksheet" ) {} + TestDescription_suite_ReadTestSuite_test_read_standalone_worksheet() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 16, "test_read_standalone_worksheet" ) {} void runTest() { suite_ReadTestSuite.test_read_standalone_worksheet(); } } testDescription_suite_ReadTestSuite_test_read_standalone_worksheet; static class TestDescription_suite_ReadTestSuite_test_read_standard_workbook : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_standard_workbook() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 33, "test_read_standard_workbook" ) {} + TestDescription_suite_ReadTestSuite_test_read_standard_workbook() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 32, "test_read_standard_workbook" ) {} void runTest() { suite_ReadTestSuite.test_read_standard_workbook(); } } testDescription_suite_ReadTestSuite_test_read_standard_workbook; static class TestDescription_suite_ReadTestSuite_test_read_standard_workbook_from_fileobj : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_standard_workbook_from_fileobj() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 40, "test_read_standard_workbook_from_fileobj" ) {} + TestDescription_suite_ReadTestSuite_test_read_standard_workbook_from_fileobj() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 39, "test_read_standard_workbook_from_fileobj" ) {} void runTest() { suite_ReadTestSuite.test_read_standard_workbook_from_fileobj(); } } testDescription_suite_ReadTestSuite_test_read_standard_workbook_from_fileobj; static class TestDescription_suite_ReadTestSuite_test_read_worksheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_worksheet() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 48, "test_read_worksheet" ) {} + TestDescription_suite_ReadTestSuite_test_read_worksheet() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 47, "test_read_worksheet" ) {} void runTest() { suite_ReadTestSuite.test_read_worksheet(); } } testDescription_suite_ReadTestSuite_test_read_worksheet; static class TestDescription_suite_ReadTestSuite_test_read_nostring_workbook : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_nostring_workbook() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 58, "test_read_nostring_workbook" ) {} + TestDescription_suite_ReadTestSuite_test_read_nostring_workbook() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 57, "test_read_nostring_workbook" ) {} void runTest() { suite_ReadTestSuite.test_read_nostring_workbook(); } } testDescription_suite_ReadTestSuite_test_read_nostring_workbook; static class TestDescription_suite_ReadTestSuite_test_read_empty_file : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_empty_file() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 66, "test_read_empty_file" ) {} + TestDescription_suite_ReadTestSuite_test_read_empty_file() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 65, "test_read_empty_file" ) {} void runTest() { suite_ReadTestSuite.test_read_empty_file(); } } testDescription_suite_ReadTestSuite_test_read_empty_file; static class TestDescription_suite_ReadTestSuite_test_read_empty_archive : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_empty_archive() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 73, "test_read_empty_archive" ) {} + TestDescription_suite_ReadTestSuite_test_read_empty_archive() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 72, "test_read_empty_archive" ) {} void runTest() { suite_ReadTestSuite.test_read_empty_archive(); } } testDescription_suite_ReadTestSuite_test_read_empty_archive; static class TestDescription_suite_ReadTestSuite_test_read_dimension : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_dimension() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 79, "test_read_dimension" ) {} + TestDescription_suite_ReadTestSuite_test_read_dimension() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 78, "test_read_dimension" ) {} void runTest() { suite_ReadTestSuite.test_read_dimension(); } } testDescription_suite_ReadTestSuite_test_read_dimension; static class TestDescription_suite_ReadTestSuite_test_calculate_dimension_iter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_calculate_dimension_iter() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 93, "test_calculate_dimension_iter" ) {} + TestDescription_suite_ReadTestSuite_test_calculate_dimension_iter() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 92, "test_calculate_dimension_iter" ) {} void runTest() { suite_ReadTestSuite.test_calculate_dimension_iter(); } } testDescription_suite_ReadTestSuite_test_calculate_dimension_iter; static class TestDescription_suite_ReadTestSuite_test_get_highest_row_iter : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_get_highest_row_iter() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 102, "test_get_highest_row_iter" ) {} + TestDescription_suite_ReadTestSuite_test_get_highest_row_iter() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 101, "test_get_highest_row_iter" ) {} void runTest() { suite_ReadTestSuite.test_get_highest_row_iter(); } } testDescription_suite_ReadTestSuite_test_get_highest_row_iter; static class TestDescription_suite_ReadTestSuite_test_read_workbook_with_no_properties : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_workbook_with_no_properties() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 111, "test_read_workbook_with_no_properties" ) {} + TestDescription_suite_ReadTestSuite_test_read_workbook_with_no_properties() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 110, "test_read_workbook_with_no_properties" ) {} void runTest() { suite_ReadTestSuite.test_read_workbook_with_no_properties(); } } testDescription_suite_ReadTestSuite_test_read_workbook_with_no_properties; static class TestDescription_suite_ReadTestSuite_test_read_general_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_general_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 126, "test_read_general_style" ) {} + TestDescription_suite_ReadTestSuite_test_read_general_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 125, "test_read_general_style" ) {} void runTest() { suite_ReadTestSuite.test_read_general_style(); } } testDescription_suite_ReadTestSuite_test_read_general_style; static class TestDescription_suite_ReadTestSuite_test_read_date_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_date_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 132, "test_read_date_style" ) {} + TestDescription_suite_ReadTestSuite_test_read_date_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 131, "test_read_date_style" ) {} void runTest() { suite_ReadTestSuite.test_read_date_style(); } } testDescription_suite_ReadTestSuite_test_read_date_style; static class TestDescription_suite_ReadTestSuite_test_read_number_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_number_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 138, "test_read_number_style" ) {} + TestDescription_suite_ReadTestSuite_test_read_number_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 137, "test_read_number_style" ) {} void runTest() { suite_ReadTestSuite.test_read_number_style(); } } testDescription_suite_ReadTestSuite_test_read_number_style; static class TestDescription_suite_ReadTestSuite_test_read_time_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_time_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 144, "test_read_time_style" ) {} + TestDescription_suite_ReadTestSuite_test_read_time_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 143, "test_read_time_style" ) {} void runTest() { suite_ReadTestSuite.test_read_time_style(); } } testDescription_suite_ReadTestSuite_test_read_time_style; static class TestDescription_suite_ReadTestSuite_test_read_percentage_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_percentage_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 150, "test_read_percentage_style" ) {} + TestDescription_suite_ReadTestSuite_test_read_percentage_style() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 149, "test_read_percentage_style" ) {} void runTest() { suite_ReadTestSuite.test_read_percentage_style(); } } testDescription_suite_ReadTestSuite_test_read_percentage_style; static class TestDescription_suite_ReadTestSuite_test_read_win_base_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_win_base_date() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 167, "test_read_win_base_date" ) {} + TestDescription_suite_ReadTestSuite_test_read_win_base_date() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 166, "test_read_win_base_date" ) {} void runTest() { suite_ReadTestSuite.test_read_win_base_date(); } } testDescription_suite_ReadTestSuite_test_read_win_base_date; static class TestDescription_suite_ReadTestSuite_test_read_mac_base_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_mac_base_date() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 172, "test_read_mac_base_date" ) {} + TestDescription_suite_ReadTestSuite_test_read_mac_base_date() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 171, "test_read_mac_base_date" ) {} void runTest() { suite_ReadTestSuite.test_read_mac_base_date(); } } testDescription_suite_ReadTestSuite_test_read_mac_base_date; static class TestDescription_suite_ReadTestSuite_test_read_date_style_mac : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_date_style_mac() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 177, "test_read_date_style_mac" ) {} + TestDescription_suite_ReadTestSuite_test_read_date_style_mac() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 176, "test_read_date_style_mac" ) {} void runTest() { suite_ReadTestSuite.test_read_date_style_mac(); } } testDescription_suite_ReadTestSuite_test_read_date_style_mac; static class TestDescription_suite_ReadTestSuite_test_read_date_style_win : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_date_style_win() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 183, "test_read_date_style_win" ) {} + TestDescription_suite_ReadTestSuite_test_read_date_style_win() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 182, "test_read_date_style_win" ) {} void runTest() { suite_ReadTestSuite.test_read_date_style_win(); } } testDescription_suite_ReadTestSuite_test_read_date_style_win; static class TestDescription_suite_ReadTestSuite_test_read_date_value : public CxxTest::RealTestDescription { public: - TestDescription_suite_ReadTestSuite_test_read_date_value() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 189, "test_read_date_value" ) {} + TestDescription_suite_ReadTestSuite_test_read_date_value() : CxxTest::RealTestDescription( Tests_ReadTestSuite, suiteDescription_ReadTestSuite, 188, "test_read_date_value" ) {} void runTest() { suite_ReadTestSuite.test_read_date_value(); } } testDescription_suite_ReadTestSuite_test_read_date_value; @@ -867,29 +867,29 @@ public: static StringsTestSuite suite_StringsTestSuite; static CxxTest::List Tests_StringsTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_StringsTestSuite( "../../source/tests/StringsTestSuite.h", 9, "StringsTestSuite", suite_StringsTestSuite, Tests_StringsTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_StringsTestSuite( "../../source/tests/StringsTestSuite.h", 8, "StringsTestSuite", suite_StringsTestSuite, Tests_StringsTestSuite ); static class TestDescription_suite_StringsTestSuite_test_create_string_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_StringsTestSuite_test_create_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 17, "test_create_string_table" ) {} + TestDescription_suite_StringsTestSuite_test_create_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 16, "test_create_string_table" ) {} void runTest() { suite_StringsTestSuite.test_create_string_table(); } } testDescription_suite_StringsTestSuite_test_create_string_table; static class TestDescription_suite_StringsTestSuite_test_read_string_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_StringsTestSuite_test_read_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 28, "test_read_string_table" ) {} + TestDescription_suite_StringsTestSuite_test_read_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 27, "test_read_string_table" ) {} void runTest() { suite_StringsTestSuite.test_read_string_table(); } } testDescription_suite_StringsTestSuite_test_read_string_table; static class TestDescription_suite_StringsTestSuite_test_empty_string : public CxxTest::RealTestDescription { public: - TestDescription_suite_StringsTestSuite_test_empty_string() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 39, "test_empty_string" ) {} + TestDescription_suite_StringsTestSuite_test_empty_string() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 38, "test_empty_string" ) {} void runTest() { suite_StringsTestSuite.test_empty_string(); } } testDescription_suite_StringsTestSuite_test_empty_string; static class TestDescription_suite_StringsTestSuite_test_formatted_string_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_StringsTestSuite_test_formatted_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 50, "test_formatted_string_table" ) {} + TestDescription_suite_StringsTestSuite_test_formatted_string_table() : CxxTest::RealTestDescription( Tests_StringsTestSuite, suiteDescription_StringsTestSuite, 49, "test_formatted_string_table" ) {} void runTest() { suite_StringsTestSuite.test_formatted_string_table(); } } testDescription_suite_StringsTestSuite_test_formatted_string_table; @@ -898,95 +898,95 @@ public: static StyleTestSuite suite_StyleTestSuite; static CxxTest::List Tests_StyleTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_StyleTestSuite( "../../source/tests/StyleTestSuite.h", 9, "StyleTestSuite", suite_StyleTestSuite, Tests_StyleTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_StyleTestSuite( "../../source/tests/StyleTestSuite.h", 8, "StyleTestSuite", suite_StyleTestSuite, Tests_StyleTestSuite ); static class TestDescription_suite_StyleTestSuite_test_create_style_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_create_style_table() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 30, "test_create_style_table" ) {} + TestDescription_suite_StyleTestSuite_test_create_style_table() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 29, "test_create_style_table" ) {} void runTest() { suite_StyleTestSuite.test_create_style_table(); } } testDescription_suite_StyleTestSuite_test_create_style_table; static class TestDescription_suite_StyleTestSuite_test_write_style_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_write_style_table() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 35, "test_write_style_table" ) {} + TestDescription_suite_StyleTestSuite_test_write_style_table() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 34, "test_write_style_table" ) {} void runTest() { suite_StyleTestSuite.test_write_style_table(); } } testDescription_suite_StyleTestSuite_test_write_style_table; static class TestDescription_suite_StyleTestSuite_test_no_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_no_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 47, "test_no_style" ) {} + TestDescription_suite_StyleTestSuite_test_no_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 46, "test_no_style" ) {} void runTest() { suite_StyleTestSuite.test_no_style(); } } testDescription_suite_StyleTestSuite_test_no_style; static class TestDescription_suite_StyleTestSuite_test_nb_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_nb_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 54, "test_nb_style" ) {} + TestDescription_suite_StyleTestSuite_test_nb_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 53, "test_nb_style" ) {} void runTest() { suite_StyleTestSuite.test_nb_style(); } } testDescription_suite_StyleTestSuite_test_nb_style; static class TestDescription_suite_StyleTestSuite_test_style_unicity : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_style_unicity() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 68, "test_style_unicity" ) {} + TestDescription_suite_StyleTestSuite_test_style_unicity() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 67, "test_style_unicity" ) {} void runTest() { suite_StyleTestSuite.test_style_unicity(); } } testDescription_suite_StyleTestSuite_test_style_unicity; static class TestDescription_suite_StyleTestSuite_test_fonts : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_fonts() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 78, "test_fonts" ) {} + TestDescription_suite_StyleTestSuite_test_fonts() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 77, "test_fonts" ) {} void runTest() { suite_StyleTestSuite.test_fonts(); } } testDescription_suite_StyleTestSuite_test_fonts; static class TestDescription_suite_StyleTestSuite_test_fills : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_fills() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 92, "test_fills" ) {} + TestDescription_suite_StyleTestSuite_test_fills() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 91, "test_fills" ) {} void runTest() { suite_StyleTestSuite.test_fills(); } } testDescription_suite_StyleTestSuite_test_fills; static class TestDescription_suite_StyleTestSuite_test_borders : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_borders() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 101, "test_borders" ) {} + TestDescription_suite_StyleTestSuite_test_borders() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 100, "test_borders" ) {} void runTest() { suite_StyleTestSuite.test_borders(); } } testDescription_suite_StyleTestSuite_test_borders; static class TestDescription_suite_StyleTestSuite_test_write_cell_xfs_1 : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_write_cell_xfs_1() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 110, "test_write_cell_xfs_1" ) {} + TestDescription_suite_StyleTestSuite_test_write_cell_xfs_1() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 109, "test_write_cell_xfs_1" ) {} void runTest() { suite_StyleTestSuite.test_write_cell_xfs_1(); } } testDescription_suite_StyleTestSuite_test_write_cell_xfs_1; static class TestDescription_suite_StyleTestSuite_test_alignment : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_alignment() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 124, "test_alignment" ) {} + TestDescription_suite_StyleTestSuite_test_alignment() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 123, "test_alignment" ) {} void runTest() { suite_StyleTestSuite.test_alignment(); } } testDescription_suite_StyleTestSuite_test_alignment; static class TestDescription_suite_StyleTestSuite_test_alignment_rotation : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_alignment_rotation() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 137, "test_alignment_rotation" ) {} + TestDescription_suite_StyleTestSuite_test_alignment_rotation() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 136, "test_alignment_rotation" ) {} void runTest() { suite_StyleTestSuite.test_alignment_rotation(); } } testDescription_suite_StyleTestSuite_test_alignment_rotation; static class TestDescription_suite_StyleTestSuite_test_format_comparisions : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_format_comparisions() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 152, "test_format_comparisions" ) {} + TestDescription_suite_StyleTestSuite_test_format_comparisions() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 151, "test_format_comparisions" ) {} void runTest() { suite_StyleTestSuite.test_format_comparisions(); } } testDescription_suite_StyleTestSuite_test_format_comparisions; static class TestDescription_suite_StyleTestSuite_test_builtin_format : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_builtin_format() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 167, "test_builtin_format" ) {} + TestDescription_suite_StyleTestSuite_test_builtin_format() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 166, "test_builtin_format" ) {} void runTest() { suite_StyleTestSuite.test_builtin_format(); } } testDescription_suite_StyleTestSuite_test_builtin_format; static class TestDescription_suite_StyleTestSuite_test_read_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_read_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 175, "test_read_style" ) {} + TestDescription_suite_StyleTestSuite_test_read_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 174, "test_read_style" ) {} void runTest() { suite_StyleTestSuite.test_read_style(); } } testDescription_suite_StyleTestSuite_test_read_style; static class TestDescription_suite_StyleTestSuite_test_read_cell_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_StyleTestSuite_test_read_cell_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 192, "test_read_cell_style" ) {} + TestDescription_suite_StyleTestSuite_test_read_cell_style() : CxxTest::RealTestDescription( Tests_StyleTestSuite, suiteDescription_StyleTestSuite, 191, "test_read_cell_style" ) {} void runTest() { suite_StyleTestSuite.test_read_cell_style(); } } testDescription_suite_StyleTestSuite_test_read_cell_style; @@ -995,11 +995,11 @@ public: static ThemeTestSuite suite_ThemeTestSuite; static CxxTest::List Tests_ThemeTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_ThemeTestSuite( "../../source/tests/ThemeTestSuite.h", 9, "ThemeTestSuite", suite_ThemeTestSuite, Tests_ThemeTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_ThemeTestSuite( "../../source/tests/ThemeTestSuite.h", 8, "ThemeTestSuite", suite_ThemeTestSuite, Tests_ThemeTestSuite ); static class TestDescription_suite_ThemeTestSuite_test_write_theme : public CxxTest::RealTestDescription { public: - TestDescription_suite_ThemeTestSuite_test_write_theme() : CxxTest::RealTestDescription( Tests_ThemeTestSuite, suiteDescription_ThemeTestSuite, 17, "test_write_theme" ) {} + TestDescription_suite_ThemeTestSuite_test_write_theme() : CxxTest::RealTestDescription( Tests_ThemeTestSuite, suiteDescription_ThemeTestSuite, 16, "test_write_theme" ) {} void runTest() { suite_ThemeTestSuite.test_write_theme(); } } testDescription_suite_ThemeTestSuite_test_write_theme; @@ -1008,11 +1008,11 @@ public: static UnicodeTestSuite suite_UnicodeTestSuite; static CxxTest::List Tests_UnicodeTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_UnicodeTestSuite( "../../source/tests/UnicodeTestSuite.h", 9, "UnicodeTestSuite", suite_UnicodeTestSuite, Tests_UnicodeTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_UnicodeTestSuite( "../../source/tests/UnicodeTestSuite.h", 8, "UnicodeTestSuite", suite_UnicodeTestSuite, Tests_UnicodeTestSuite ); static class TestDescription_suite_UnicodeTestSuite_test_read_workbook_with_unicode_character : public CxxTest::RealTestDescription { public: - TestDescription_suite_UnicodeTestSuite_test_read_workbook_with_unicode_character() : CxxTest::RealTestDescription( Tests_UnicodeTestSuite, suiteDescription_UnicodeTestSuite, 17, "test_read_workbook_with_unicode_character" ) {} + TestDescription_suite_UnicodeTestSuite_test_read_workbook_with_unicode_character() : CxxTest::RealTestDescription( Tests_UnicodeTestSuite, suiteDescription_UnicodeTestSuite, 16, "test_read_workbook_with_unicode_character" ) {} void runTest() { suite_UnicodeTestSuite.test_read_workbook_with_unicode_character(); } } testDescription_suite_UnicodeTestSuite_test_read_workbook_with_unicode_character; @@ -1021,125 +1021,125 @@ public: static uriTestSuite suite_uriTestSuite; static CxxTest::List Tests_uriTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_uriTestSuite( "../../source/tests/UriTestSuite.h", 6, "uriTestSuite", suite_uriTestSuite, Tests_uriTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_uriTestSuite( "../../source/tests/UriTestSuite.h", 7, "uriTestSuite", suite_uriTestSuite, Tests_uriTestSuite ); static class TestDescription_suite_uriTestSuite_test_absolute_path : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_absolute_path() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 14, "test_absolute_path" ) {} + TestDescription_suite_uriTestSuite_test_absolute_path() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 15, "test_absolute_path" ) {} void runTest() { suite_uriTestSuite.test_absolute_path(); } } testDescription_suite_uriTestSuite_test_absolute_path; static class TestDescription_suite_uriTestSuite_test_absolute_uri : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_absolute_uri() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 19, "test_absolute_uri" ) {} + TestDescription_suite_uriTestSuite_test_absolute_uri() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 20, "test_absolute_uri" ) {} void runTest() { suite_uriTestSuite.test_absolute_uri(); } } testDescription_suite_uriTestSuite_test_absolute_uri; static class TestDescription_suite_uriTestSuite_test_authority : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_authority() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 24, "test_authority" ) {} + TestDescription_suite_uriTestSuite_test_authority() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 25, "test_authority" ) {} void runTest() { suite_uriTestSuite.test_authority(); } } testDescription_suite_uriTestSuite_test_authority; static class TestDescription_suite_uriTestSuite_test_dns_safe_host : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_dns_safe_host() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 29, "test_dns_safe_host" ) {} + TestDescription_suite_uriTestSuite_test_dns_safe_host() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 30, "test_dns_safe_host" ) {} void runTest() { suite_uriTestSuite.test_dns_safe_host(); } } testDescription_suite_uriTestSuite_test_dns_safe_host; static class TestDescription_suite_uriTestSuite_test_fragment : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_fragment() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 34, "test_fragment" ) {} + TestDescription_suite_uriTestSuite_test_fragment() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 35, "test_fragment" ) {} void runTest() { suite_uriTestSuite.test_fragment(); } } testDescription_suite_uriTestSuite_test_fragment; static class TestDescription_suite_uriTestSuite_test_get_host : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_get_host() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 39, "test_get_host" ) {} + TestDescription_suite_uriTestSuite_test_get_host() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 40, "test_get_host" ) {} void runTest() { suite_uriTestSuite.test_get_host(); } } testDescription_suite_uriTestSuite_test_get_host; static class TestDescription_suite_uriTestSuite_test_host_name_type : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_host_name_type() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 44, "test_host_name_type" ) {} + TestDescription_suite_uriTestSuite_test_host_name_type() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 45, "test_host_name_type" ) {} void runTest() { suite_uriTestSuite.test_host_name_type(); } } testDescription_suite_uriTestSuite_test_host_name_type; static class TestDescription_suite_uriTestSuite_test_is_absolute_uri : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_is_absolute_uri() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 49, "test_is_absolute_uri" ) {} + TestDescription_suite_uriTestSuite_test_is_absolute_uri() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 50, "test_is_absolute_uri" ) {} void runTest() { suite_uriTestSuite.test_is_absolute_uri(); } } testDescription_suite_uriTestSuite_test_is_absolute_uri; static class TestDescription_suite_uriTestSuite_test_default_port : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_default_port() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 54, "test_default_port" ) {} + TestDescription_suite_uriTestSuite_test_default_port() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 55, "test_default_port" ) {} void runTest() { suite_uriTestSuite.test_default_port(); } } testDescription_suite_uriTestSuite_test_default_port; static class TestDescription_suite_uriTestSuite_test_is_file : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_is_file() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 59, "test_is_file" ) {} + TestDescription_suite_uriTestSuite_test_is_file() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 60, "test_is_file" ) {} void runTest() { suite_uriTestSuite.test_is_file(); } } testDescription_suite_uriTestSuite_test_is_file; static class TestDescription_suite_uriTestSuite_test_is_loopback : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_is_loopback() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 64, "test_is_loopback" ) {} + TestDescription_suite_uriTestSuite_test_is_loopback() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 65, "test_is_loopback" ) {} void runTest() { suite_uriTestSuite.test_is_loopback(); } } testDescription_suite_uriTestSuite_test_is_loopback; static class TestDescription_suite_uriTestSuite_test_is_unc : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_is_unc() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 69, "test_is_unc" ) {} + TestDescription_suite_uriTestSuite_test_is_unc() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 70, "test_is_unc" ) {} void runTest() { suite_uriTestSuite.test_is_unc(); } } testDescription_suite_uriTestSuite_test_is_unc; static class TestDescription_suite_uriTestSuite_test_local_path : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_local_path() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 74, "test_local_path" ) {} + TestDescription_suite_uriTestSuite_test_local_path() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 75, "test_local_path" ) {} void runTest() { suite_uriTestSuite.test_local_path(); } } testDescription_suite_uriTestSuite_test_local_path; static class TestDescription_suite_uriTestSuite_test_original_string : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_original_string() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 79, "test_original_string" ) {} + TestDescription_suite_uriTestSuite_test_original_string() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 80, "test_original_string" ) {} void runTest() { suite_uriTestSuite.test_original_string(); } } testDescription_suite_uriTestSuite_test_original_string; static class TestDescription_suite_uriTestSuite_test_path_and_query : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_path_and_query() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 84, "test_path_and_query" ) {} + TestDescription_suite_uriTestSuite_test_path_and_query() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 85, "test_path_and_query" ) {} void runTest() { suite_uriTestSuite.test_path_and_query(); } } testDescription_suite_uriTestSuite_test_path_and_query; static class TestDescription_suite_uriTestSuite_test_port : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_port() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 89, "test_port" ) {} + TestDescription_suite_uriTestSuite_test_port() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 90, "test_port" ) {} void runTest() { suite_uriTestSuite.test_port(); } } testDescription_suite_uriTestSuite_test_port; static class TestDescription_suite_uriTestSuite_test_query : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_query() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 94, "test_query" ) {} + TestDescription_suite_uriTestSuite_test_query() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 95, "test_query" ) {} void runTest() { suite_uriTestSuite.test_query(); } } testDescription_suite_uriTestSuite_test_query; static class TestDescription_suite_uriTestSuite_test_scheme : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_scheme() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 99, "test_scheme" ) {} + TestDescription_suite_uriTestSuite_test_scheme() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 100, "test_scheme" ) {} void runTest() { suite_uriTestSuite.test_scheme(); } } testDescription_suite_uriTestSuite_test_scheme; static class TestDescription_suite_uriTestSuite_test_user_escaped : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_user_escaped() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 104, "test_user_escaped" ) {} + TestDescription_suite_uriTestSuite_test_user_escaped() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 105, "test_user_escaped" ) {} void runTest() { suite_uriTestSuite.test_user_escaped(); } } testDescription_suite_uriTestSuite_test_user_escaped; static class TestDescription_suite_uriTestSuite_test_user_info : public CxxTest::RealTestDescription { public: - TestDescription_suite_uriTestSuite_test_user_info() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 109, "test_user_info" ) {} + TestDescription_suite_uriTestSuite_test_user_info() : CxxTest::RealTestDescription( Tests_uriTestSuite, suiteDescription_uriTestSuite, 110, "test_user_info" ) {} void runTest() { suite_uriTestSuite.test_user_info(); } } testDescription_suite_uriTestSuite_test_user_info; @@ -1148,233 +1148,233 @@ public: static WorkbookTestSuite suite_WorkbookTestSuite; static CxxTest::List Tests_WorkbookTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_WorkbookTestSuite( "../../source/tests/WorkbookTestSuite.h", 9, "WorkbookTestSuite", suite_WorkbookTestSuite, Tests_WorkbookTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_WorkbookTestSuite( "../../source/tests/WorkbookTestSuite.h", 8, "WorkbookTestSuite", suite_WorkbookTestSuite, Tests_WorkbookTestSuite ); static class TestDescription_suite_WorkbookTestSuite_test_get_active_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_active_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 17, "test_get_active_sheet" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_active_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 16, "test_get_active_sheet" ) {} void runTest() { suite_WorkbookTestSuite.test_get_active_sheet(); } } testDescription_suite_WorkbookTestSuite_test_get_active_sheet; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 24, "test_create_sheet" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 23, "test_create_sheet" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 31, "test_create_sheet_with_name" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 30, "test_create_sheet_with_name" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet_with_name(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet_with_name; static class TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 38, "test_add_correct_sheet" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 37, "test_add_correct_sheet" ) {} void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet(); } } testDescription_suite_WorkbookTestSuite_test_add_correct_sheet; static class TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 46, "test_add_incorrect_sheet" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 45, "test_add_incorrect_sheet" ) {} void runTest() { suite_WorkbookTestSuite.test_add_incorrect_sheet(); } } testDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 52, "test_create_sheet_readonly" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 51, "test_create_sheet_readonly" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly; static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_remove_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 59, "test_remove_sheet" ) {} + TestDescription_suite_WorkbookTestSuite_test_remove_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 58, "test_remove_sheet" ) {} void runTest() { suite_WorkbookTestSuite.test_remove_sheet(); } } testDescription_suite_WorkbookTestSuite_test_remove_sheet; static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 67, "test_get_sheet_by_name" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 66, "test_get_sheet_by_name" ) {} void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name(); } } testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name; static class TestDescription_suite_WorkbookTestSuite_test_get_index2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_index2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 77, "test_get_index2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_index2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 76, "test_get_index2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_index2(); } } testDescription_suite_WorkbookTestSuite_test_get_index2; static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_sheet_names() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 85, "test_get_sheet_names" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_sheet_names() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 84, "test_get_sheet_names" ) {} void runTest() { suite_WorkbookTestSuite.test_get_sheet_names(); } } testDescription_suite_WorkbookTestSuite_test_get_sheet_names; static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 97, "test_get_named_ranges2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 96, "test_get_named_ranges2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_named_ranges2(); } } testDescription_suite_WorkbookTestSuite_test_get_named_ranges2; static class TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 102, "test_get_active_sheet2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 101, "test_get_active_sheet2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_active_sheet2(); } } testDescription_suite_WorkbookTestSuite_test_get_active_sheet2; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 109, "test_create_sheet2" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 108, "test_create_sheet2" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet2(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet2; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 116, "test_create_sheet_with_name2" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 115, "test_create_sheet_with_name2" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet_with_name2(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2; static class TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 123, "test_add_correct_sheet2" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 122, "test_add_correct_sheet2" ) {} void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet2(); } } testDescription_suite_WorkbookTestSuite_test_add_correct_sheet2; static class TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 132, "test_add_incorrect_sheet2" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 131, "test_add_incorrect_sheet2" ) {} void runTest() { suite_WorkbookTestSuite.test_add_incorrect_sheet2(); } } testDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2; static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 139, "test_create_sheet_readonly2" ) {} + TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 138, "test_create_sheet_readonly2" ) {} void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly2(); } } testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2; static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_remove_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 146, "test_remove_sheet2" ) {} + TestDescription_suite_WorkbookTestSuite_test_remove_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 145, "test_remove_sheet2" ) {} void runTest() { suite_WorkbookTestSuite.test_remove_sheet2(); } } testDescription_suite_WorkbookTestSuite_test_remove_sheet2; static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 154, "test_get_sheet_by_name2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 153, "test_get_sheet_by_name2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name2(); } } testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2; static class TestDescription_suite_WorkbookTestSuite_test_get_index : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_index() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 164, "test_get_index" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_index() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 163, "test_get_index" ) {} void runTest() { suite_WorkbookTestSuite.test_get_index(); } } testDescription_suite_WorkbookTestSuite_test_get_index; static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 172, "test_get_sheet_names2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 171, "test_get_sheet_names2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_sheet_names2(); } } testDescription_suite_WorkbookTestSuite_test_get_sheet_names2; static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_named_ranges() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 184, "test_get_named_ranges" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_named_ranges() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 183, "test_get_named_ranges" ) {} void runTest() { suite_WorkbookTestSuite.test_get_named_ranges(); } } testDescription_suite_WorkbookTestSuite_test_get_named_ranges; static class TestDescription_suite_WorkbookTestSuite_test_add_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 190, "test_add_named_range" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 189, "test_add_named_range" ) {} void runTest() { suite_WorkbookTestSuite.test_add_named_range(); } } testDescription_suite_WorkbookTestSuite_test_add_named_range; static class TestDescription_suite_WorkbookTestSuite_test_get_named_range2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 200, "test_get_named_range2" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 199, "test_get_named_range2" ) {} void runTest() { suite_WorkbookTestSuite.test_get_named_range2(); } } testDescription_suite_WorkbookTestSuite_test_get_named_range2; static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_remove_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 210, "test_remove_named_range2" ) {} + TestDescription_suite_WorkbookTestSuite_test_remove_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 209, "test_remove_named_range2" ) {} void runTest() { suite_WorkbookTestSuite.test_remove_named_range2(); } } testDescription_suite_WorkbookTestSuite_test_remove_named_range2; static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 222, "test_add_local_named_range2" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 221, "test_add_local_named_range2" ) {} void runTest() { suite_WorkbookTestSuite.test_add_local_named_range2(); } } testDescription_suite_WorkbookTestSuite_test_add_local_named_range2; static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_write_regular_date() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 234, "test_write_regular_date" ) {} + TestDescription_suite_WorkbookTestSuite_test_write_regular_date() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 233, "test_write_regular_date" ) {} void runTest() { suite_WorkbookTestSuite.test_write_regular_date(); } } testDescription_suite_WorkbookTestSuite_test_write_regular_date; static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_write_regular_float() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 251, "test_write_regular_float" ) {} + TestDescription_suite_WorkbookTestSuite_test_write_regular_float() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 250, "test_write_regular_float" ) {} void runTest() { suite_WorkbookTestSuite.test_write_regular_float(); } } testDescription_suite_WorkbookTestSuite_test_write_regular_float; static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_bad_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 267, "test_bad_encoding2" ) {} + TestDescription_suite_WorkbookTestSuite_test_bad_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 266, "test_bad_encoding2" ) {} void runTest() { suite_WorkbookTestSuite.test_bad_encoding2(); } } testDescription_suite_WorkbookTestSuite_test_bad_encoding2; static class TestDescription_suite_WorkbookTestSuite_test_good_encoding2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_good_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 277, "test_good_encoding2" ) {} + TestDescription_suite_WorkbookTestSuite_test_good_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 276, "test_good_encoding2" ) {} void runTest() { suite_WorkbookTestSuite.test_good_encoding2(); } } testDescription_suite_WorkbookTestSuite_test_good_encoding2; static class TestDescription_suite_WorkbookTestSuite_test_add_named_range2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 287, "test_add_named_range2" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 286, "test_add_named_range2" ) {} void runTest() { suite_WorkbookTestSuite.test_add_named_range2(); } } testDescription_suite_WorkbookTestSuite_test_add_named_range2; static class TestDescription_suite_WorkbookTestSuite_test_get_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_get_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 297, "test_get_named_range" ) {} + TestDescription_suite_WorkbookTestSuite_test_get_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 296, "test_get_named_range" ) {} void runTest() { suite_WorkbookTestSuite.test_get_named_range(); } } testDescription_suite_WorkbookTestSuite_test_get_named_range; static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_remove_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 307, "test_remove_named_range" ) {} + TestDescription_suite_WorkbookTestSuite_test_remove_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 306, "test_remove_named_range" ) {} void runTest() { suite_WorkbookTestSuite.test_remove_named_range(); } } testDescription_suite_WorkbookTestSuite_test_remove_named_range; static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_add_local_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 319, "test_add_local_named_range" ) {} + TestDescription_suite_WorkbookTestSuite_test_add_local_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 318, "test_add_local_named_range" ) {} void runTest() { suite_WorkbookTestSuite.test_add_local_named_range(); } } testDescription_suite_WorkbookTestSuite_test_add_local_named_range; static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_write_regular_date2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 332, "test_write_regular_date2" ) {} + TestDescription_suite_WorkbookTestSuite_test_write_regular_date2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 331, "test_write_regular_date2" ) {} void runTest() { suite_WorkbookTestSuite.test_write_regular_date2(); } } testDescription_suite_WorkbookTestSuite_test_write_regular_date2; static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float2 : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_write_regular_float2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 349, "test_write_regular_float2" ) {} + TestDescription_suite_WorkbookTestSuite_test_write_regular_float2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 348, "test_write_regular_float2" ) {} void runTest() { suite_WorkbookTestSuite.test_write_regular_float2(); } } testDescription_suite_WorkbookTestSuite_test_write_regular_float2; static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_bad_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 365, "test_bad_encoding" ) {} + TestDescription_suite_WorkbookTestSuite_test_bad_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 364, "test_bad_encoding" ) {} void runTest() { suite_WorkbookTestSuite.test_bad_encoding(); } } testDescription_suite_WorkbookTestSuite_test_bad_encoding; static class TestDescription_suite_WorkbookTestSuite_test_good_encoding : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorkbookTestSuite_test_good_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 375, "test_good_encoding" ) {} + TestDescription_suite_WorkbookTestSuite_test_good_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 374, "test_good_encoding" ) {} void runTest() { suite_WorkbookTestSuite.test_good_encoding(); } } testDescription_suite_WorkbookTestSuite_test_good_encoding; @@ -1383,185 +1383,185 @@ public: static WorksheetTestSuite suite_WorksheetTestSuite; static CxxTest::List Tests_WorksheetTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_WorksheetTestSuite( "../../source/tests/WorksheetTestSuite.h", 9, "WorksheetTestSuite", suite_WorksheetTestSuite, Tests_WorksheetTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_WorksheetTestSuite( "../../source/tests/WorksheetTestSuite.h", 8, "WorksheetTestSuite", suite_WorksheetTestSuite, Tests_WorksheetTestSuite ); static class TestDescription_suite_WorksheetTestSuite_test_new_worksheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_new_worksheet() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 19, "test_new_worksheet" ) {} + TestDescription_suite_WorksheetTestSuite_test_new_worksheet() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 18, "test_new_worksheet" ) {} void runTest() { suite_WorksheetTestSuite.test_new_worksheet(); } } testDescription_suite_WorksheetTestSuite_test_new_worksheet; static class TestDescription_suite_WorksheetTestSuite_test_new_sheet_name : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_new_sheet_name() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 25, "test_new_sheet_name" ) {} + TestDescription_suite_WorksheetTestSuite_test_new_sheet_name() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 24, "test_new_sheet_name" ) {} void runTest() { suite_WorksheetTestSuite.test_new_sheet_name(); } } testDescription_suite_WorksheetTestSuite_test_new_sheet_name; static class TestDescription_suite_WorksheetTestSuite_test_get_cell : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_get_cell() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 32, "test_get_cell" ) {} + TestDescription_suite_WorksheetTestSuite_test_get_cell() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 31, "test_get_cell" ) {} void runTest() { suite_WorksheetTestSuite.test_get_cell(); } } testDescription_suite_WorksheetTestSuite_test_get_cell; static class TestDescription_suite_WorksheetTestSuite_test_set_bad_title : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_set_bad_title() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 39, "test_set_bad_title" ) {} + TestDescription_suite_WorksheetTestSuite_test_set_bad_title() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 38, "test_set_bad_title" ) {} void runTest() { suite_WorksheetTestSuite.test_set_bad_title(); } } testDescription_suite_WorksheetTestSuite_test_set_bad_title; static class TestDescription_suite_WorksheetTestSuite_test_set_bad_title_character : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_set_bad_title_character() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 44, "test_set_bad_title_character" ) {} + TestDescription_suite_WorksheetTestSuite_test_set_bad_title_character() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 43, "test_set_bad_title_character" ) {} void runTest() { suite_WorksheetTestSuite.test_set_bad_title_character(); } } testDescription_suite_WorksheetTestSuite_test_set_bad_title_character; static class TestDescription_suite_WorksheetTestSuite_test_worksheet_dimension : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_worksheet_dimension() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 55, "test_worksheet_dimension" ) {} + TestDescription_suite_WorksheetTestSuite_test_worksheet_dimension() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 54, "test_worksheet_dimension" ) {} void runTest() { suite_WorksheetTestSuite.test_worksheet_dimension(); } } testDescription_suite_WorksheetTestSuite_test_worksheet_dimension; static class TestDescription_suite_WorksheetTestSuite_test_worksheet_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_worksheet_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 63, "test_worksheet_range" ) {} + TestDescription_suite_WorksheetTestSuite_test_worksheet_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 62, "test_worksheet_range" ) {} void runTest() { suite_WorksheetTestSuite.test_worksheet_range(); } } testDescription_suite_WorksheetTestSuite_test_worksheet_range; static class TestDescription_suite_WorksheetTestSuite_test_worksheet_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_worksheet_named_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 72, "test_worksheet_named_range" ) {} + TestDescription_suite_WorksheetTestSuite_test_worksheet_named_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 71, "test_worksheet_named_range" ) {} void runTest() { suite_WorksheetTestSuite.test_worksheet_named_range(); } } testDescription_suite_WorksheetTestSuite_test_worksheet_named_range; static class TestDescription_suite_WorksheetTestSuite_test_bad_named_range : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_bad_named_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 81, "test_bad_named_range" ) {} + TestDescription_suite_WorksheetTestSuite_test_bad_named_range() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 80, "test_bad_named_range" ) {} void runTest() { suite_WorksheetTestSuite.test_bad_named_range(); } } testDescription_suite_WorksheetTestSuite_test_bad_named_range; static class TestDescription_suite_WorksheetTestSuite_test_named_range_wrong_sheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_named_range_wrong_sheet() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 87, "test_named_range_wrong_sheet" ) {} + TestDescription_suite_WorksheetTestSuite_test_named_range_wrong_sheet() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 86, "test_named_range_wrong_sheet" ) {} void runTest() { suite_WorksheetTestSuite.test_named_range_wrong_sheet(); } } testDescription_suite_WorksheetTestSuite_test_named_range_wrong_sheet; static class TestDescription_suite_WorksheetTestSuite_test_cell_offset : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_cell_offset() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 95, "test_cell_offset" ) {} + TestDescription_suite_WorksheetTestSuite_test_cell_offset() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 94, "test_cell_offset" ) {} void runTest() { suite_WorksheetTestSuite.test_cell_offset(); } } testDescription_suite_WorksheetTestSuite_test_cell_offset; static class TestDescription_suite_WorksheetTestSuite_test_range_offset : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_range_offset() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 101, "test_range_offset" ) {} + TestDescription_suite_WorksheetTestSuite_test_range_offset() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 100, "test_range_offset" ) {} void runTest() { suite_WorksheetTestSuite.test_range_offset(); } } testDescription_suite_WorksheetTestSuite_test_range_offset; static class TestDescription_suite_WorksheetTestSuite_test_cell_alternate_coordinates : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_cell_alternate_coordinates() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 111, "test_cell_alternate_coordinates" ) {} + TestDescription_suite_WorksheetTestSuite_test_cell_alternate_coordinates() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 110, "test_cell_alternate_coordinates" ) {} void runTest() { suite_WorksheetTestSuite.test_cell_alternate_coordinates(); } } testDescription_suite_WorksheetTestSuite_test_cell_alternate_coordinates; static class TestDescription_suite_WorksheetTestSuite_test_cell_insufficient_coordinates : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_cell_insufficient_coordinates() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 118, "test_cell_insufficient_coordinates" ) {} + TestDescription_suite_WorksheetTestSuite_test_cell_insufficient_coordinates() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 117, "test_cell_insufficient_coordinates" ) {} void runTest() { suite_WorksheetTestSuite.test_cell_insufficient_coordinates(); } } testDescription_suite_WorksheetTestSuite_test_cell_insufficient_coordinates; static class TestDescription_suite_WorksheetTestSuite_test_cell_range_name : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_cell_range_name() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 124, "test_cell_range_name" ) {} + TestDescription_suite_WorksheetTestSuite_test_cell_range_name() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 123, "test_cell_range_name" ) {} void runTest() { suite_WorksheetTestSuite.test_cell_range_name(); } } testDescription_suite_WorksheetTestSuite_test_cell_range_name; static class TestDescription_suite_WorksheetTestSuite_test_garbage_collect : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_garbage_collect() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 136, "test_garbage_collect" ) {} + TestDescription_suite_WorksheetTestSuite_test_garbage_collect() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 135, "test_garbage_collect" ) {} void runTest() { suite_WorksheetTestSuite.test_garbage_collect(); } } testDescription_suite_WorksheetTestSuite_test_garbage_collect; static class TestDescription_suite_WorksheetTestSuite_test_hyperlink_relationships : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_hyperlink_relationships() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 149, "test_hyperlink_relationships" ) {} + TestDescription_suite_WorksheetTestSuite_test_hyperlink_relationships() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 148, "test_hyperlink_relationships" ) {} void runTest() { suite_WorksheetTestSuite.test_hyperlink_relationships(); } } testDescription_suite_WorksheetTestSuite_test_hyperlink_relationships; static class TestDescription_suite_WorksheetTestSuite_test_bad_relationship_type : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_bad_relationship_type() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 169, "test_bad_relationship_type" ) {} + TestDescription_suite_WorksheetTestSuite_test_bad_relationship_type() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 168, "test_bad_relationship_type" ) {} void runTest() { suite_WorksheetTestSuite.test_bad_relationship_type(); } } testDescription_suite_WorksheetTestSuite_test_bad_relationship_type; static class TestDescription_suite_WorksheetTestSuite_test_append_list : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_append_list() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 174, "test_append_list" ) {} + TestDescription_suite_WorksheetTestSuite_test_append_list() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 173, "test_append_list" ) {} void runTest() { suite_WorksheetTestSuite.test_append_list(); } } testDescription_suite_WorksheetTestSuite_test_append_list; static class TestDescription_suite_WorksheetTestSuite_test_append_dict_letter : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_append_dict_letter() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 184, "test_append_dict_letter" ) {} + TestDescription_suite_WorksheetTestSuite_test_append_dict_letter() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 183, "test_append_dict_letter" ) {} void runTest() { suite_WorksheetTestSuite.test_append_dict_letter(); } } testDescription_suite_WorksheetTestSuite_test_append_dict_letter; static class TestDescription_suite_WorksheetTestSuite_test_append_dict_index : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_append_dict_index() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 194, "test_append_dict_index" ) {} + TestDescription_suite_WorksheetTestSuite_test_append_dict_index() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 193, "test_append_dict_index" ) {} void runTest() { suite_WorksheetTestSuite.test_append_dict_index(); } } testDescription_suite_WorksheetTestSuite_test_append_dict_index; static class TestDescription_suite_WorksheetTestSuite_test_bad_append : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_bad_append() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 204, "test_bad_append" ) {} + TestDescription_suite_WorksheetTestSuite_test_bad_append() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 203, "test_bad_append" ) {} void runTest() { suite_WorksheetTestSuite.test_bad_append(); } } testDescription_suite_WorksheetTestSuite_test_bad_append; static class TestDescription_suite_WorksheetTestSuite_test_append_2d_list : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_append_2d_list() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 210, "test_append_2d_list" ) {} + TestDescription_suite_WorksheetTestSuite_test_append_2d_list() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 209, "test_append_2d_list" ) {} void runTest() { suite_WorksheetTestSuite.test_append_2d_list(); } } testDescription_suite_WorksheetTestSuite_test_append_2d_list; static class TestDescription_suite_WorksheetTestSuite_test_rows : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_rows() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 223, "test_rows" ) {} + TestDescription_suite_WorksheetTestSuite_test_rows() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 222, "test_rows" ) {} void runTest() { suite_WorksheetTestSuite.test_rows(); } } testDescription_suite_WorksheetTestSuite_test_rows; static class TestDescription_suite_WorksheetTestSuite_test_cols : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_cols() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 238, "test_cols" ) {} + TestDescription_suite_WorksheetTestSuite_test_cols() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 237, "test_cols" ) {} void runTest() { suite_WorksheetTestSuite.test_cols(); } } testDescription_suite_WorksheetTestSuite_test_cols; static class TestDescription_suite_WorksheetTestSuite_test_auto_filter : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_auto_filter() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 253, "test_auto_filter" ) {} + TestDescription_suite_WorksheetTestSuite_test_auto_filter() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 252, "test_auto_filter" ) {} void runTest() { suite_WorksheetTestSuite.test_auto_filter(); } } testDescription_suite_WorksheetTestSuite_test_auto_filter; static class TestDescription_suite_WorksheetTestSuite_test_page_margins : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_page_margins() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 266, "test_page_margins" ) {} + TestDescription_suite_WorksheetTestSuite_test_page_margins() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 265, "test_page_margins" ) {} void runTest() { suite_WorksheetTestSuite.test_page_margins(); } } testDescription_suite_WorksheetTestSuite_test_page_margins; static class TestDescription_suite_WorksheetTestSuite_test_merge : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_merge() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 283, "test_merge" ) {} + TestDescription_suite_WorksheetTestSuite_test_merge() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 282, "test_merge" ) {} void runTest() { suite_WorksheetTestSuite.test_merge(); } } testDescription_suite_WorksheetTestSuite_test_merge; static class TestDescription_suite_WorksheetTestSuite_test_freeze : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_freeze() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 303, "test_freeze" ) {} + TestDescription_suite_WorksheetTestSuite_test_freeze() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 302, "test_freeze" ) {} void runTest() { suite_WorksheetTestSuite.test_freeze(); } } testDescription_suite_WorksheetTestSuite_test_freeze; static class TestDescription_suite_WorksheetTestSuite_test_printer_settings : public CxxTest::RealTestDescription { public: - TestDescription_suite_WorksheetTestSuite_test_printer_settings() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 319, "test_printer_settings" ) {} + TestDescription_suite_WorksheetTestSuite_test_printer_settings() : CxxTest::RealTestDescription( Tests_WorksheetTestSuite, suiteDescription_WorksheetTestSuite, 318, "test_printer_settings" ) {} void runTest() { suite_WorksheetTestSuite.test_printer_settings(); } } testDescription_suite_WorksheetTestSuite_test_printer_settings; @@ -1570,131 +1570,131 @@ public: static WriteTestSuite suite_WriteTestSuite; static CxxTest::List Tests_WriteTestSuite = { 0, 0 }; -CxxTest::StaticSuiteDescription suiteDescription_WriteTestSuite( "../../source/tests/WriteTestSuite.h", 9, "WriteTestSuite", suite_WriteTestSuite, Tests_WriteTestSuite ); +CxxTest::StaticSuiteDescription suiteDescription_WriteTestSuite( "../../source/tests/WriteTestSuite.h", 8, "WriteTestSuite", suite_WriteTestSuite, Tests_WriteTestSuite ); static class TestDescription_suite_WriteTestSuite_test_write_empty_workbook : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_empty_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 17, "test_write_empty_workbook" ) {} + TestDescription_suite_WriteTestSuite_test_write_empty_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 16, "test_write_empty_workbook" ) {} void runTest() { suite_WriteTestSuite.test_write_empty_workbook(); } } testDescription_suite_WriteTestSuite_test_write_empty_workbook; static class TestDescription_suite_WriteTestSuite_test_write_virtual_workbook : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_virtual_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 27, "test_write_virtual_workbook" ) {} + TestDescription_suite_WriteTestSuite_test_write_virtual_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 26, "test_write_virtual_workbook" ) {} void runTest() { suite_WriteTestSuite.test_write_virtual_workbook(); } } testDescription_suite_WriteTestSuite_test_write_virtual_workbook; static class TestDescription_suite_WriteTestSuite_test_write_workbook_rels : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_workbook_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 35, "test_write_workbook_rels" ) {} + TestDescription_suite_WriteTestSuite_test_write_workbook_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 34, "test_write_workbook_rels" ) {} void runTest() { suite_WriteTestSuite.test_write_workbook_rels(); } } testDescription_suite_WriteTestSuite_test_write_workbook_rels; static class TestDescription_suite_WriteTestSuite_test_write_workbook : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 43, "test_write_workbook" ) {} + TestDescription_suite_WriteTestSuite_test_write_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 42, "test_write_workbook" ) {} void runTest() { suite_WriteTestSuite.test_write_workbook(); } } testDescription_suite_WriteTestSuite_test_write_workbook; static class TestDescription_suite_WriteTestSuite_test_write_string_table : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_string_table() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 52, "test_write_string_table" ) {} + TestDescription_suite_WriteTestSuite_test_write_string_table() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 51, "test_write_string_table" ) {} void runTest() { suite_WriteTestSuite.test_write_string_table(); } } testDescription_suite_WriteTestSuite_test_write_string_table; static class TestDescription_suite_WriteTestSuite_test_write_worksheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 60, "test_write_worksheet" ) {} + TestDescription_suite_WriteTestSuite_test_write_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 59, "test_write_worksheet" ) {} void runTest() { suite_WriteTestSuite.test_write_worksheet(); } } testDescription_suite_WriteTestSuite_test_write_worksheet; static class TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 70, "test_write_hidden_worksheet" ) {} + TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 69, "test_write_hidden_worksheet" ) {} void runTest() { suite_WriteTestSuite.test_write_hidden_worksheet(); } } testDescription_suite_WriteTestSuite_test_write_hidden_worksheet; static class TestDescription_suite_WriteTestSuite_test_write_bool : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_bool() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 81, "test_write_bool" ) {} + TestDescription_suite_WriteTestSuite_test_write_bool() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 80, "test_write_bool" ) {} void runTest() { suite_WriteTestSuite.test_write_bool(); } } testDescription_suite_WriteTestSuite_test_write_bool; static class TestDescription_suite_WriteTestSuite_test_write_formula : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_formula() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 92, "test_write_formula" ) {} + TestDescription_suite_WriteTestSuite_test_write_formula() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 91, "test_write_formula" ) {} void runTest() { suite_WriteTestSuite.test_write_formula(); } } testDescription_suite_WriteTestSuite_test_write_formula; static class TestDescription_suite_WriteTestSuite_test_write_style : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_style() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 104, "test_write_style" ) {} + TestDescription_suite_WriteTestSuite_test_write_style() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 103, "test_write_style" ) {} void runTest() { suite_WriteTestSuite.test_write_style(); } } testDescription_suite_WriteTestSuite_test_write_style; static class TestDescription_suite_WriteTestSuite_test_write_height : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_height() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 115, "test_write_height" ) {} + TestDescription_suite_WriteTestSuite_test_write_height() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 114, "test_write_height" ) {} void runTest() { suite_WriteTestSuite.test_write_height(); } } testDescription_suite_WriteTestSuite_test_write_height; static class TestDescription_suite_WriteTestSuite_test_write_hyperlink : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_hyperlink() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 126, "test_write_hyperlink" ) {} + TestDescription_suite_WriteTestSuite_test_write_hyperlink() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 125, "test_write_hyperlink" ) {} void runTest() { suite_WriteTestSuite.test_write_hyperlink(); } } testDescription_suite_WriteTestSuite_test_write_hyperlink; static class TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 137, "test_write_hyperlink_rels" ) {} + TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 136, "test_write_hyperlink_rels" ) {} void runTest() { suite_WriteTestSuite.test_write_hyperlink_rels(); } } testDescription_suite_WriteTestSuite_test_write_hyperlink_rels; static class TestDescription_suite_WriteTestSuite_test_hyperlink_value : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_hyperlink_value() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 153, "test_hyperlink_value" ) {} + TestDescription_suite_WriteTestSuite_test_hyperlink_value() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 152, "test_hyperlink_value" ) {} void runTest() { suite_WriteTestSuite.test_hyperlink_value(); } } testDescription_suite_WriteTestSuite_test_hyperlink_value; static class TestDescription_suite_WriteTestSuite_test_write_auto_filter : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_write_auto_filter() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 163, "test_write_auto_filter" ) {} + TestDescription_suite_WriteTestSuite_test_write_auto_filter() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 162, "test_write_auto_filter" ) {} void runTest() { suite_WriteTestSuite.test_write_auto_filter(); } } testDescription_suite_WriteTestSuite_test_write_auto_filter; static class TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 178, "test_freeze_panes_horiz" ) {} + TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 177, "test_freeze_panes_horiz" ) {} void runTest() { suite_WriteTestSuite.test_freeze_panes_horiz(); } } testDescription_suite_WriteTestSuite_test_freeze_panes_horiz; static class TestDescription_suite_WriteTestSuite_test_freeze_panes_vert : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_freeze_panes_vert() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 189, "test_freeze_panes_vert" ) {} + TestDescription_suite_WriteTestSuite_test_freeze_panes_vert() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 188, "test_freeze_panes_vert" ) {} void runTest() { suite_WriteTestSuite.test_freeze_panes_vert(); } } testDescription_suite_WriteTestSuite_test_freeze_panes_vert; static class TestDescription_suite_WriteTestSuite_test_freeze_panes_both : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_freeze_panes_both() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 200, "test_freeze_panes_both" ) {} + TestDescription_suite_WriteTestSuite_test_freeze_panes_both() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 199, "test_freeze_panes_both" ) {} void runTest() { suite_WriteTestSuite.test_freeze_panes_both(); } } testDescription_suite_WriteTestSuite_test_freeze_panes_both; static class TestDescription_suite_WriteTestSuite_test_long_number : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_long_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 211, "test_long_number" ) {} + TestDescription_suite_WriteTestSuite_test_long_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 210, "test_long_number" ) {} void runTest() { suite_WriteTestSuite.test_long_number(); } } testDescription_suite_WriteTestSuite_test_long_number; static class TestDescription_suite_WriteTestSuite_test_decimal : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_decimal() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 221, "test_decimal" ) {} + TestDescription_suite_WriteTestSuite_test_decimal() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 220, "test_decimal" ) {} void runTest() { suite_WriteTestSuite.test_decimal(); } } testDescription_suite_WriteTestSuite_test_decimal; static class TestDescription_suite_WriteTestSuite_test_short_number : public CxxTest::RealTestDescription { public: - TestDescription_suite_WriteTestSuite_test_short_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 231, "test_short_number" ) {} + TestDescription_suite_WriteTestSuite_test_short_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 230, "test_short_number" ) {} void runTest() { suite_WriteTestSuite.test_short_number(); } } testDescription_suite_WriteTestSuite_test_short_number; diff --git a/source/xlnt.cpp b/source/xlnt.cpp new file mode 100644 index 00000000..1d4cfea3 --- /dev/null +++ b/source/xlnt.cpp @@ -0,0 +1,1100 @@ +#include +#include +#include +#include +#include + +#include "xlnt.h" + +namespace xlnt { + +struct part_struct +{ + part_struct(package_impl &package, const std::string &uri_part, const std::string &mime_type = "", compression_option compression = compression_option::NotCompressed) + : package_(package), + uri_(uri_part), + content_type_(mime_type), + compression_option_(compression) + {} + + part_struct(package_impl &package, const std::string &uri, opcContainer *container) + : package_(package), + uri_(uri), + container_(container) + {} + + relationship create_relationship(const std::string &target_uri, target_mode target_mode, const std::string &relationship_type); + + void delete_relationship(const std::string &id); + + relationship get_relationship(const std::string &id); + + relationship_collection get_relationships(); + + relationship_collection get_relationship_by_type(const std::string &relationship_type); + + std::string read() + { + std::string ss; + auto part_stream = opcContainerOpenInputStream(container_, (xmlChar*)uri_.c_str()); + std::array buffer; + auto bytes_read = opcContainerReadInputStream(part_stream, buffer.data(), static_cast(buffer.size())); + if(bytes_read > 0) + { + ss.append(std::string(buffer.begin(), buffer.begin() + bytes_read)); + while(bytes_read == buffer.size()) + { + auto bytes_read = opcContainerReadInputStream(part_stream, buffer.data(), static_cast(buffer.size())); + ss.append(std::string(buffer.begin(), buffer.begin() + bytes_read)); + } + } + opcContainerCloseInputStream(part_stream); + return ss; + } + + void write(const std::string &data) + { + auto name = uri_; + auto name_pointer = name.c_str(); + + auto part_stream = opcContainerCreateOutputStream(container_, (xmlChar*)name_pointer, opcCompressionOption_t::OPC_COMPRESSIONOPTION_NORMAL); + + std::stringstream ss(data); + std::array buffer; + + while(ss) + { + ss.get((char*)buffer.data(), 1024); + auto count = ss.gcount(); + if(count > 0) + { + opcContainerWriteOutputStream(part_stream, buffer.data(), static_cast(count)); + } + } + opcContainerCloseOutputStream(part_stream); + } + + /// + /// Returns a value that indicates whether this part owns a relationship with a specified Id. + /// + bool relationship_exists(const std::string &id) const; + + /// + /// Returns true if the given Id string is a valid relationship identifier. + /// + bool is_valid_xml_id(const std::string &id); + + void operator=(const part_struct &other); + + compression_option compression_option_; + std::string content_type_; + package_impl &package_; + std::string uri_; + opcContainer *container_; +}; + +part::part(package_impl &package, const std::string &uri, opcContainer *container) + : root_(new part_struct(package, uri, container)) +{ + +} + +std::string part::get_content_type() const +{ + return ""; +} + +std::string part::read() +{ + if(root_ == nullptr) + { + return ""; + } + + return root_->read(); +} + +void part::write(const std::string &data) +{ + if(root_ == nullptr) + { + return; + } + + return root_->write(data); +} + +bool part::operator==(const part &comparand) const +{ + return root_ == comparand.root_; +} + +bool part::operator==(const nullptr_t &) const +{ + return root_ == nullptr; +} + +struct package_impl +{ + package *parent_; + opcContainer *opc_container_; + std::iostream &stream_; + std::fstream file_stream_; + file_mode package_mode_; + file_access package_access_; + std::vector container_buffer_; + bool open_; + bool streaming_; + + file_access get_file_open_access() const + { + if(!open_) + { + throw std::runtime_error("The package is not open"); + } + + return package_access_; + } + + package_impl(std::iostream &stream, file_mode package_mode, file_access package_access) + : stream_(stream), container_buffer_(4096), package_mode_(package_mode), package_access_(package_access) + { + open_container(); + } + + package_impl(const std::string &path, file_mode package_mode, file_access package_access) + : stream_(file_stream_), container_buffer_(4096), package_mode_(package_mode), package_access_(package_access) + { + switch(package_mode) + { + case file_mode::Append: + switch(package_access) + { + case file_access::Read: throw std::runtime_error("Append can only be used with file_access.Write"); + case file_access::ReadWrite: throw std::runtime_error("Append can only be used with file_access.Write"); + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::app | std::ios::out); + break; + } + break; + case file_mode::Create: + switch(package_access) + { + case file_access::Read: + file_stream_.open(path, std::ios::binary | std::ios::in); + break; + case file_access::ReadWrite: + file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); + break; + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::out); + break; + } + break; + case file_mode::CreateNew: + if(!file::exists(path)) + { + throw std::runtime_error("File already exists"); + } + switch(package_access) + { + case file_access::Read: + file_stream_.open(path, std::ios::binary | std::ios::in); + break; + case file_access::ReadWrite: + file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); + break; + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::out); + break; + } + break; + case file_mode::Open: + if(!file::exists(path)) + { + throw std::runtime_error("Can't open non-existent file"); + } + switch(package_access) + { + case file_access::Read: + file_stream_.open(path, std::ios::binary | std::ios::in); + break; + case file_access::ReadWrite: + file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); + break; + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::out); + break; + } + break; + case file_mode::OpenOrCreate: + switch(package_access) + { + case file_access::Read: + file_stream_.open(path, std::ios::binary | std::ios::in); + break; + case file_access::ReadWrite: + file_stream_.open(path, std::ios::binary | std::ios::in | std::ios::out); + break; + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::out); + break; + } + break; + case file_mode::Truncate: + if(!file::exists(path)) + { + throw std::runtime_error("Can't truncate non-existent file"); + } + switch(package_access) + { + case file_access::Read: + file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::in); + break; + case file_access::ReadWrite: + file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::in | std::ios::out); + break; + case file_access::Write: + file_stream_.open(path, std::ios::binary | std::ios::trunc | std::ios::out); + break; + } + break; + } + + open_container(); + } + + void open_container() + { + opcContainerOpenMode m; + + switch(package_access_) + { + case file_access::Read: + m = opcContainerOpenMode::OPC_OPEN_READ_ONLY; + break; + case file_access::ReadWrite: + m = opcContainerOpenMode::OPC_OPEN_READ_WRITE; + break; + case file_access::Write: + m = opcContainerOpenMode::OPC_OPEN_WRITE_ONLY; + break; + default: + throw std::runtime_error("unknown file access"); + } + + opc_container_ = opcContainerOpenIO(&read_callback, &write_callback, + &close_callback, &seek_callback, + &trim_callback, &flush_callback, this, 4096, m, this); + open_ = true; + } + + ~package_impl() + { + close(); + } + + void close() + { + if(open_) + { + open_ = false; + opcContainerClose(opc_container_, opcContainerCloseMode::OPC_CLOSE_NOW); + opc_container_ = nullptr; + } + } + + part create_part(const std::string &part_uri, const std::string &/*content_type*/, compression_option /*compression*/) + { + return part(new part_struct(*this, part_uri, opc_container_)); + } + + void delete_part(const std::string &/*part_uri*/) + { + + } + + void flush() + { + stream_.flush(); + } + + part get_part(const std::string &part_uri) + { + return part(*this, part_uri, opc_container_); + } + + part_collection get_parts() + { + return part_collection(); + } + + int write(char *buffer, int length) + { + stream_.read(buffer, length); + auto bytes_read = stream_.gcount(); + return static_cast(bytes_read); + } + + int read(const char *buffer, int length) + { + auto before = stream_.tellp(); + stream_.write(buffer, length); + auto bytes_written = stream_.tellp() - before; + return static_cast(bytes_written); + } + + std::ios::pos_type seek(std::ios::pos_type offset) + { + stream_.clear(); + stream_.seekg(offset); + auto current_position = stream_.tellg(); + if(stream_.eof()) + { + std::cout << "eof" << std::endl; + } + if(stream_.fail()) + { + std::cout << "fail" << std::endl; + } + if(stream_.bad()) + { + std::cout << "bad" << std::endl; + } + return current_position; + } + + int trim(std::ios::pos_type /*new_size*/) + { + return 0; + } + + static int read_callback(void *context, char *buffer, int length) + { + auto object = static_cast(context); + return object->write(buffer, length); + } + + static int write_callback(void *context, const char *buffer, int length) + { + auto object = static_cast(context); + return object->read(buffer, length); + } + + static int close_callback(void *context) + { + auto object = static_cast(context); + object->close(); + return 0; + } + + static opc_ofs_t seek_callback(void *context, opc_ofs_t ofs) + { + auto object = static_cast(context); + return static_cast(object->seek(ofs)); + } + + static int trim_callback(void *context, opc_ofs_t new_size) + { + auto object = static_cast(context); + return object->trim(new_size); + } + + static int flush_callback(void *context) + { + auto object = static_cast(context); + object->flush(); + return 0; + } +}; + +file_access package::get_file_open_access() const +{ + return impl_->get_file_open_access(); +} + +package package::open(std::iostream &stream, file_mode package_mode, file_access package_access) +{ + return package(stream, package_mode, package_access); +} + +package package::open(const std::string &path, file_mode package_mode, file_access package_access, file_share /*package_share*/) +{ + return package(path, package_mode, package_access); +} + +package::package(std::iostream &stream, file_mode package_mode, file_access package_access) + : impl_(new package_impl(stream, package_mode, package_access)) +{ + open_container(); +} + +package::package(const std::string &path, file_mode package_mode, file_access package_access) + : impl_(new package_impl(path, package_mode, package_access)) +{ + +} + +void package::open_container() +{ + impl_->open_container(); +} + +void package::close() +{ + impl_->close(); +} + +part package::create_part(const std::string &part_uri, const std::string &content_type, compression_option compression) +{ + return impl_->create_part(part_uri, content_type, compression); +} + +void package::delete_part(const std::string &part_uri) +{ + impl_->delete_part(part_uri); +} + +void package::flush() +{ + impl_->flush(); +} + +part package::get_part(const std::string &part_uri) +{ + return impl_->get_part(part_uri); +} + +part_collection package::get_parts() +{ + return impl_->get_parts(); +} + +int package::write(char *buffer, int length) +{ + return impl_->write(buffer, length); +} + +int package::read(const char *buffer, int length) +{ + return impl_->read(buffer, length); +} + +std::ios::pos_type package::seek(std::ios::pos_type offset) +{ + return impl_->seek(offset); +} + +int package::trim(std::ios::pos_type new_size) +{ + return impl_->trim(new_size); +} + +bool package::operator==(const package &comparand) const +{ + return impl_ == comparand.impl_; +} + +bool package::operator==(const nullptr_t &) const +{ + return impl_ == nullptr; +} + + +struct cell_struct +{ + cell_struct(worksheet_struct *ws, const std::string &column, int row) + : type(cell::type::null), parent_worksheet(ws), + column(xlnt::cell::column_index_from_string(column) - 1), row(row) + { + + } + + std::string to_string() const + { + switch(type) + { + case cell::type::numeric: return std::to_string(numeric_value); + case cell::type::boolean: return bool_value ? "true" : "false"; + case cell::type::string: return string_value; + default: throw std::runtime_error("bad enum"); + } + } + + cell::type type; + + union + { + long double numeric_value; + bool bool_value; + }; + + tm date_value; + std::string string_value; + worksheet_struct *parent_worksheet; + int column; + int row; +}; + +cell::cell() : root_(nullptr) +{ +} + +cell::cell(cell_struct *root) : root_(root) +{ +} + +coordinate cell::coordinate_from_string(const std::string &address) +{ + if(address == "A1") + { + return{"A", 1}; + } + + return{"A", 1}; +} + +int cell::column_index_from_string(const std::string &column_string) +{ + return column_string[0] - 'A'; +} + +std::string cell::get_column_letter(int column_index) +{ + return std::string(1, (char)('A' + column_index - 1)); +} + +bool cell::is_date() const +{ + return root_->type == type::date; +} + +bool operator==(const char *comparand, const cell &cell) +{ + return std::string(comparand) == cell; +} + +bool operator==(const std::string &comparand, const cell &cell) +{ + return cell.root_->type == cell::type::string && cell.root_->string_value == comparand; +} + +bool operator==(const tm &comparand, const cell &cell) +{ + return cell.root_->type == cell::type::date && cell.root_->date_value.tm_hour == comparand.tm_hour; +} + +std::string cell::absolute_coordinate(const std::string &absolute_address) +{ + return absolute_address; +} + +cell::type cell::get_data_type() +{ + return root_->type; +} + +cell &cell::operator=(int value) +{ + root_->type = type::numeric; + root_->numeric_value = value; + return *this; +} + +cell &cell::operator=(double value) +{ + root_->type = type::numeric; + root_->numeric_value = value; + return *this; +} + +cell &cell::operator=(const std::string &value) +{ + root_->type = type::string; + root_->string_value = value; + return *this; +} + +cell &cell::operator=(const char *value) +{ + return *this = std::string(value); +} + +cell &cell::operator=(const tm &value) +{ + root_->type = type::date; + root_->date_value = value; + return *this; +} + +cell::~cell() +{ + delete root_; +} + +std::string cell::to_string() const +{ + return root_->to_string(); +} + + +namespace { + + class not_implemented : public std::runtime_error + { + public: + not_implemented() : std::runtime_error("error: not implemented") + { + + } + }; + + // Convert a column number into a column letter (3 -> 'C') + // Right shift the column col_idx by 26 to find column letters in reverse + // order.These numbers are 1 - based, and can be converted to ASCII + // ordinals by adding 64. + std::string get_column_letter(int column_index) + { + // these indicies corrospond to A->ZZZ and include all allowed + // columns + if(column_index < 1 || column_index > 18278) + { + auto msg = "Column index out of bounds: " + column_index; + throw std::runtime_error(msg); + } + + auto temp = column_index; + std::string column_letter = ""; + + while(temp > 0) + { + int quotient = temp / 26, remainder = temp % 26; + + // check for exact division and borrow if needed + if(remainder == 0) + { + quotient -= 1; + remainder = 26; + } + + column_letter = std::string(1, char(remainder + 64)) + column_letter; + temp = quotient; + } + + return column_letter; + } + +} + +struct worksheet_struct +{ + worksheet_struct(workbook &parent_workbook, const std::string &title) + : parent_(parent_workbook), title_(title), freeze_panes_(nullptr) + { + + } + + void garbage_collect() + { + throw not_implemented(); + } + + std::set get_cell_collection() + { + throw not_implemented(); + } + + std::string get_title() const + { + throw not_implemented(); + } + + void set_title(const std::string &title) + { + title_ = title; + } + + cell get_freeze_panes() const + { + throw not_implemented(); + } + + void set_freeze_panes(cell top_left_cell) + { + throw not_implemented(); + } + + void set_freeze_panes(const std::string &top_left_coordinate) + { + freeze_panes_ = cell(top_left_coordinate); + } + + void unfreeze_panes() + { + throw not_implemented(); + } + + xlnt::cell cell(const std::string &coordinate) + { + if(cell_map_.find(coordinate) == cell_map_.end()) + { + auto coord = xlnt::cell::coordinate_from_string(coordinate); + cell_struct *cell = new xlnt::cell_struct(this, coord.column, coord.row); + cell_map_[coordinate] = xlnt::cell(cell); + } + + return cell_map_[coordinate]; + } + + xlnt::cell cell(int row, int column) + { + return cell(get_column_letter(column + 1) + std::to_string(row + 1)); + } + + int get_highest_row() const + { + throw not_implemented(); + } + + int get_highest_column() const + { + throw not_implemented(); + } + + std::string calculate_dimension() const + { + throw not_implemented(); + } + + range range(const std::string &range_string, int /*row_offset*/, int /*column_offset*/) + { + auto colon_index = range_string.find(':'); + if(colon_index != std::string::npos) + { + auto min_range = range_string.substr(0, colon_index); + auto max_range = range_string.substr(colon_index + 1); + xlnt::range r; + r.push_back(std::vector()); + r[0].push_back(cell(min_range)); + r[0].push_back(cell(max_range)); + return r; + } + throw not_implemented(); + } + + relationship create_relationship(const std::string &relationship_type) + { + relationships_.push_back(relationship(relationship_type)); + return relationships_.back(); + } + + //void add_chart(chart chart); + + void merge_cells(const std::string &/*range_string*/) + { + throw not_implemented(); + } + + void merge_cells(int /*start_row*/, int /*start_column*/, int /*end_row*/, int /*end_column*/) + { + throw not_implemented(); + } + + void unmerge_cells(const std::string &/*range_string*/) + { + throw not_implemented(); + } + + void unmerge_cells(int /*start_row*/, int /*start_column*/, int /*end_row*/, int /*end_column*/) + { + throw not_implemented(); + } + + void append(const std::vector &cells) + { + for(auto cell : cells) + { + cell_map_["a"] = cell; + } + } + + void append(const std::unordered_map &cells) + { + for(auto cell : cells) + { + cell_map_[cell.first] = cell.second; + } + } + + void append(const std::unordered_map &cells) + { + for(auto cell : cells) + { + cell_map_[get_column_letter(cell.first + 1)] = cell.second; + } + } + + xlnt::range rows() const + { + throw not_implemented(); + } + + xlnt::range columns() const + { + throw not_implemented(); + } + + void operator=(const worksheet_struct &other) = delete; + + workbook &parent_; + std::string title_; + xlnt::cell freeze_panes_; + std::unordered_map cell_map_; + std::vector relationships_; +}; + +worksheet::worksheet(worksheet_struct *root) : root_(root) +{ +} + +std::string worksheet::to_string() const +{ + return "title_ + "\">"; +} + +workbook &worksheet::get_parent() const +{ + return root_->parent_; +} + +void worksheet::garbage_collect() +{ + root_->garbage_collect(); +} + +std::set worksheet::get_cell_collection() +{ + return root_->get_cell_collection(); +} + +std::string worksheet::get_title() const +{ + return root_->title_; +} + +void worksheet::set_title(const std::string &title) +{ + root_->title_ = title; +} + +cell worksheet::get_freeze_panes() const +{ + return root_->freeze_panes_; +} + +void worksheet::set_freeze_panes(xlnt::cell top_left_cell) +{ + root_->set_freeze_panes(top_left_cell); +} + +void worksheet::set_freeze_panes(const std::string &top_left_coordinate) +{ + root_->set_freeze_panes(top_left_coordinate); +} + +void worksheet::unfreeze_panes() +{ + root_->unfreeze_panes(); +} + +xlnt::cell worksheet::cell(const std::string &coordinate) +{ + return root_->cell(coordinate); +} + +xlnt::cell worksheet::cell(int row, int column) +{ + return root_->cell(row, column); +} + +int worksheet::get_highest_row() const +{ + return root_->get_highest_row(); +} + +int worksheet::get_highest_column() const +{ + return root_->get_highest_column(); +} + +std::string worksheet::calculate_dimension() const +{ + return root_->calculate_dimension(); +} + +range worksheet::range(const std::string &range_string, int row_offset, int column_offset) +{ + return root_->range(range_string, row_offset, column_offset); +} + +relationship worksheet::create_relationship(const std::string &relationship_type) +{ + return root_->create_relationship(relationship_type); +} + +//void worksheet::add_chart(chart chart); + +void worksheet::merge_cells(const std::string &range_string) +{ + root_->merge_cells(range_string); +} + +void worksheet::merge_cells(int start_row, int start_column, int end_row, int end_column) +{ + root_->merge_cells(start_row, start_column, end_row, end_column); +} + +void worksheet::unmerge_cells(const std::string &range_string) +{ + root_->unmerge_cells(range_string); +} + +void worksheet::unmerge_cells(int start_row, int start_column, int end_row, int end_column) +{ + root_->unmerge_cells(start_row, start_column, end_row, end_column); +} + +void worksheet::append(const std::vector &cells) +{ + root_->append(cells); +} + +void worksheet::append(const std::unordered_map &cells) +{ + root_->append(cells); +} + +void worksheet::append(const std::unordered_map &cells) +{ + root_->append(cells); +} + +xlnt::range worksheet::rows() const +{ + return root_->rows(); +} + +xlnt::range worksheet::columns() const +{ + return root_->columns(); +} + +bool worksheet::operator==(const worksheet &other) const +{ + return root_ == other.root_; +} + +bool worksheet::operator!=(const worksheet &other) const +{ + return root_ != other.root_; +} + +bool worksheet::operator==(nullptr_t) const +{ + return root_ == nullptr; +} + +bool worksheet::operator!=(nullptr_t) const +{ + return root_ != nullptr; +} + + +void worksheet::operator=(const worksheet &other) +{ + root_ = other.root_; +} + +cell worksheet::operator[](const std::string &address) +{ + return cell(address); +} + +workbook::workbook() : active_worksheet_(nullptr) +{ + auto ws = create_sheet(); + ws.set_title("Sheet1"); + active_worksheet_ = ws; +} + +worksheet workbook::get_sheet_by_name(const std::string &name) +{ + auto match = std::find_if(worksheets_.begin(), worksheets_.end(), [&](const worksheet &w) { return w.get_title() == name; }); + if(match != worksheets_.end()) + { + return worksheet(*match); + } + return worksheet(nullptr); +} + +worksheet workbook::get_active() +{ + return active_worksheet_; +} + +worksheet workbook::create_sheet() +{ + std::string title = "Sheet1"; + int index = 1; + worksheet current = get_sheet_by_name(title); + while(get_sheet_by_name(title) != nullptr) + { + title = "Sheet" + std::to_string(++index); + } + auto *worksheet = new worksheet_struct(*this, title); + worksheets_.push_back(worksheet); + return get_sheet_by_name(title); +} + +worksheet workbook::create_sheet(std::size_t index) +{ + auto ws = create_sheet(); + if(index != worksheets_.size()) + { + std::swap(worksheets_[index], worksheets_.back()); + } + return ws; +} + +std::vector::iterator workbook::begin() +{ + return worksheets_.begin(); +} + +std::vector::iterator workbook::end() +{ + return worksheets_.end(); +} + +std::vector workbook::get_sheet_names() const +{ + std::vector names; + for(auto &ws : worksheets_) + { + names.push_back(ws.get_title()); + } + return names; +} + +worksheet workbook::operator[](const std::string &name) +{ + return get_sheet_by_name(name); +} + +void workbook::save(const std::string &filename) +{ + auto package = package::open(filename); + package.close(); +} + +} \ No newline at end of file diff --git a/source/xlnt.h b/source/xlnt.h new file mode 100644 index 00000000..e6fdc1bd --- /dev/null +++ b/source/xlnt.h @@ -0,0 +1,944 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +struct tm; + +namespace xlnt { + +struct cell_struct; +struct worksheet_struct; +struct package_impl; + +class style; +class worksheet; +class worksheet; +class cell; +class relationship; +class workbook; +class package; + +const int MIN_ROW = 0; +const int MIN_COLUMN = 0; +const int MAX_COLUMN = 16384; +const int MAX_ROW = 1048576; + +// constants +const std::string PACKAGE_PROPS = "docProps"; +const std::string PACKAGE_XL = "xl"; +const std::string PACKAGE_RELS = "_rels"; +const std::string PACKAGE_THEME = PACKAGE_XL + "/" + "theme"; +const std::string PACKAGE_WORKSHEETS = PACKAGE_XL + "/" + "worksheets"; +const std::string PACKAGE_DRAWINGS = PACKAGE_XL + "/" + "drawings"; +const std::string PACKAGE_CHARTS = PACKAGE_XL + "/" + "charts"; + +const std::string ARC_CONTENT_TYPES = "[Content_Types].xml"; +const std::string ARC_ROOT_RELS = PACKAGE_RELS + "/.rels"; +const std::string ARC_WORKBOOK_RELS = PACKAGE_XL + "/" + PACKAGE_RELS + "/workbook.xml.rels"; +const std::string ARC_CORE = PACKAGE_PROPS + "/core.xml"; +const std::string ARC_APP = PACKAGE_PROPS + "/app.xml"; +const std::string ARC_WORKBOOK = PACKAGE_XL + "/workbook.xml"; +const std::string ARC_STYLE = PACKAGE_XL + "/styles.xml"; +const std::string ARC_THEME = PACKAGE_THEME + "/theme1.xml"; +const std::string ARC_SHARED_STRINGS = PACKAGE_XL + "/sharedStrings.xml"; + +std::unordered_map NAMESPACES = { + {"cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties"}, + {"dc", "http://purl.org/dc/elements/1.1/"}, + {"dcterms", "http://purl.org/dc/terms/"}, + {"dcmitype", "http://purl.org/dc/dcmitype/"}, + {"xsi", "http://www.w3.org/2001/XMLSchema-instance"}, + {"vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}, + {"xml", "http://www.w3.org/XML/1998/namespace"} +}; + +/// +/// Specifies the compression level for content that is stored in a part. +/// +enum class compression_option +{ + /// + /// Compression is optimized for performance. + /// + Fast, + /// + /// Compression is optimized for size. + /// + Maximum, + /// + /// Compression is optimized for a balance between size and performance. + /// + Normal, + /// + /// Compression is turned off. + /// + NotCompressed, + /// + /// Compression is optimized for high performance. + /// + SuperFast +}; + +/// +/// Defines constants for read, write, or read / write access to a file. +/// +enum class file_access +{ + /// + /// Read access to the file. Data can be read from the file. Combine with Write for read/write access. + /// + Read = 0x01, + /// + /// Read and write access to the file. Data can be written to and read from the file. + /// + ReadWrite = 0x02, + /// + /// Write access to the file. Data can be written to the file. Combine with Read for read/write access. + /// + Write = 0x04, + /// + /// Inherit access for part from enclosing package. + /// + FromPackage = 0x08 +}; + +/// +/// Specifies how the operating system should open a file. +/// +enum class file_mode +{ + /// + /// Opens the file if it exists and seeks to the end of the file, or creates a new file.This requires FileIOPermissionAccess.Append permission.file_mode.Append can be used only in conjunction with file_access.Write.Trying to seek to a position before the end of the file throws an IOException exception, and any attempt to read fails and throws a NotSupportedException exception. + /// + Append, + /// + /// Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. This requires FileIOPermissionAccess.Write permission. file_mode.Create is equivalent to requesting that if the file does not exist, use CreateNew; otherwise, use Truncate. If the file already exists but is a hidden file, an UnauthorizedAccessException exception is thrown. + /// + Create, + /// + /// Specifies that the operating system should create a new file. This requires FileIOPermissionAccess.Write permission. If the file already exists, an IOException exception is thrown. + /// + CreateNew, + /// + /// Specifies that the operating system should open an existing file. The ability to open the file is dependent on the value specified by the file_access enumeration. A System.IO.FileNotFoundException exception is thrown if the file does not exist. + /// + Open, + /// + /// Specifies that the operating system should open a file if it exists; otherwise, a new file should be created. If the file is opened with file_access.Read, FileIOPermissionAccess.Read permission is required. If the file access is file_access.Write, FileIOPermissionAccess.Write permission is required. If the file is opened with file_access.ReadWrite, both FileIOPermissionAccess.Read and FileIOPermissionAccess.Write permissions are required. + /// + OpenOrCreate, + /// + /// Specifies that the operating system should open an existing file. When the file is opened, it should be truncated so that its size is zero bytes. This requires FileIOPermissionAccess.Write permission. Attempts to read from a file opened with file_mode.Truncate cause an ArgumentException exception. + /// + Truncate +}; + +/// +/// Contains constants for controlling the kind of access other FileStream objects can have to the same file. +/// +enum class file_share +{ + /// + /// Allows subsequent deleting of a file. + /// + Delete, + /// + /// Makes the file handle inheritable by child processes. This is not directly supported by Win32. + /// + Inheritable, + /// + /// Declines sharing of the current file. Any request to open the file (by this process or another process) will + /// fail until the file is closed. + /// + None, + /// + /// Allows subsequent opening of the file for reading. If this flag is not specified, any request to open the file + /// for reading (by this process or another process) will fail until the file is closed. However, even if this flag + /// is specified, additional permissions might still be needed to access the file. + /// + Read, + /// + /// Allows subsequent opening of the file for reading or writing. If this flag is not specified, any request to + /// open the file for reading or writing (by this process or another process) will fail until the file is closed. + /// However, even if this flag is specified, additional permissions might still be needed to access the file. + /// + ReadWrite, + /// + /// Allows subsequent opening of the file for writing. If this flag is not specified, any request to open the file + /// for writing (by this process or another process) will fail until the file is closed. However, even if this flag + /// is specified, additional permissions might still be needed to access the file. + /// + Write +}; + +/// +/// Specifies whether the target of a relationship is inside or outside the Package. +/// +enum class target_mode +{ + /// + /// The relationship references a part that is inside the package. + /// + External, + /// + /// The relationship references a resource that is external to the package. + /// + Internal +}; + +/// +/// Represents a value type that may or may not have an assigned value. +/// +template +struct nullable +{ +public: + /// + /// Initializes a new instance of the nullable<T> structure with a "null" value. + /// + nullable() : has_value_(false) {} + + /// + /// Initializes a new instance of the nullable<T> structure to the specified value. + /// + nullable(const T &value) : has_value_(true), value_(value) {} + + /// + /// gets a value indicating whether the current nullable<T> object has a valid value of its underlying type. + /// + bool has_value() const { return has_value_; } + + /// + /// gets the value of the current nullable<T> object if it has been assigned a valid underlying value. + /// + T get_value() const + { + if(!has_value()) + { + throw std::runtime_error("invalid operation"); + } + + return value_; + } + + /// + /// Indicates whether the current nullable<T> object is equal to a specified object. + /// + bool equals(const nullable &other) const + { + if(!has_value()) + { + return !other.has_value(); + } + + if(other.has_value()) + { + return get_value() == other.get_value(); + } + + return false; + } + + /// + /// Retrieves the value of the current nullable<T> object, or the object's default value. + /// + T get_value_or_default() + { + if(has_value()) + { + return get_value(); + } + + return T(); + } + + /// + /// Retrieves the value of the current nullable<T> object or the specified default value. + /// + T get_value_or_default(const T &default_) + { + if(has_value()) + { + return get_value(); + } + + return default_; + } + + /// + /// Returns the value of a specified nullable<T> value. + /// + operator T() const + { + return get_value(); + } + + /// + /// Indicates whether the current nullable<T> object is equal to a specified object. + /// + bool operator==(nullptr_t) const + { + return !has_value_; + } + + /// + /// Indicates whether the current nullable<T> object is not equal to a specified object. + /// + bool operator!=(nullptr_t) const + { + return has_value_; + } + + /// + /// Indicates whether the current nullable<T> object is equal to a specified object. + /// + bool operator==(T other) const + { + return has_value_ && other == value_; + } + + /// + /// Indicates whether the current nullable<T> object is not equal to a specified object. + /// + bool operator!=(T other) const + { + return has_value_ && other != value_; + } + + /// + /// Indicates whether the current nullable<T> object is equal to a specified object. + /// + bool operator==(const nullable &other) const + { + return equals(other); + } + + /// + /// Indicates whether the current nullable<T> object is not equal to a specified object. + /// + bool operator!=(const nullable &other) const + { + return !(*this == other); + } + +private: + bool has_value_; + T value_; +}; + +/// +/// Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of FileStream objects. +/// +class file +{ +public: + /// + /// Copies an existing file to a new file. Overwriting a file of the same name is allowed. + /// + static void copy(const std::string &source, const std::string &destination, bool overwrite = false); + + /// + /// Determines whether the specified file exists. + /// + static bool exists(const std::string &path); +}; + +/// +/// Represents an association between a source Package or part, and a target object which can be a part or external resource. +/// +class relationship +{ +public: + enum class type + { + hyperlink, + drawing, + worksheet, + sharedStrings, + styles, + theme + }; + + relationship(const std::string &type) : source_uri_(""), target_uri_("") + { + if(type == "hyperlink") + { + type_ = type::hyperlink; + } + } + + /// + /// gets a string that identifies the relationship. + /// + std::string get_id() const { return id_; } + + /// + /// gets the URI of the package or part that owns the relationship. + /// + std::string get_source_uri() const { return source_uri_; } + + /// + /// gets a value that indicates whether the target of the relationship is or External to the Package. + /// + target_mode get_target_mode() const { return target_mode_; } + + /// + /// gets the URI of the target resource of the relationship. + /// + std::string get_target_uri() const { return target_uri_; } + +private: + friend class package; + + relationship(const std::string &id, package &package, const std::string &relationship_type_, const std::string &source_uri, target_mode target_mode, const std::string &target_uri); + relationship &operator=(const relationship &rhs) = delete; + + type type_; + std::string id_; + std::string source_uri_; + std::string target_uri_; + target_mode target_mode_; +}; + +typedef std::vector relationship_collection; + +class opc_callback_handler +{ +public: + static int read(void *context, char *buffer, int length); + + static int write(void *context, const char *buffer, int length); + + static int close(void *context); + + static opc_ofs_t seek(void *context, opc_ofs_t ofs); + + static int trim(void *context, opc_ofs_t new_size); + + static int flush(void *context); +}; + +struct part_struct; + +/// +/// Represents a part that is stored in a ZipPackage. +/// +class part +{ +public: + /// + /// Initializes a new instance of the part class with a specified parent Package, part URI, MIME content type, and compression_option. + /// + part(package_impl &package, const std::string &uri_part, const std::string &mime_type = "", compression_option compression = compression_option::NotCompressed); + + part &operator=(const part &) = delete; + + /// + /// gets the compression option of the part content stream. + /// + compression_option get_compression_option() const; + + /// + /// gets the MIME type of the content stream. + /// + std::string get_content_type() const; + + /// + /// gets the parent Package of the part. + /// + package &get_package() const; + + /// + /// gets the URI of the part. + /// + std::string get_uri() const; + + /// + /// Creates a part-level relationship between this part to a specified target part or external resource. + /// + relationship create_relationship(const std::string &target_uri, target_mode target_mode, const std::string &relationship_type); + + /// + /// Deletes a specified part-level relationship. + /// + void delete_relationship(const std::string &id); + + /// + /// Returns the relationship that has a specified Id. + /// + relationship get_relationship(const std::string &id); + + /// + /// Returns a collection of all the relationships that are owned by this part. + /// + relationship_collection get_relationships(); + + /// + /// Returns a collection of the relationships that match a specified RelationshipType. + /// + relationship_collection get_relationship_by_type(const std::string &relationship_type); + + /// + /// Returns all the content of this part. + /// + std::string read(); + + /// + /// Writes the given data to the part stream. + /// + void write(const std::string &data); + + /// + /// Returns a value that indicates whether this part owns a relationship with a specified Id. + /// + bool relationship_exists(const std::string &id) const; + + bool operator==(const part &comparand) const; + bool operator==(const nullptr_t &) const; + +private: + friend struct package_impl; + + part(part_struct *root); + part(package_impl &package, const std::string &uri, opcContainer *container); + + part_struct *root_; +}; + +typedef std::vector part_collection; + +/// +/// Implements a derived subclass of the abstract Package base class—the ZipPackage class uses a +/// ZIP archive as the container store. This class should not be inherited. +/// +class package +{ +public: + /// + /// Opens a package with a given IO stream, file mode, and file access setting. + /// + static package open(std::iostream &stream, file_mode package_mode, file_access package_access); + + /// + /// Opens a package at a given path using a given file mode, file access, and file share setting. + /// + static package open(const std::string &path, file_mode package_mode = file_mode::OpenOrCreate, + file_access package_access = file_access::ReadWrite, file_share package_share = file_share::None); + + /// + /// Saves and closes the package plus all underlying part streams. + /// + void close(); + + /// + /// Creates a new part with a given URI, content type, and compression option. + /// + part create_part(const std::string &part_uri, const std::string &content_type, compression_option compression = compression_option::Normal); + + /// + /// Creates a package-level relationship to a part with a given URI, target mode, relationship type, and identifier (ID). + /// + relationship create_relationship(const std::string &part_uri, target_mode target_mode, const std::string &relationship_type, const std::string &id); + + /// + /// Deletes a part with a given URI from the package. + /// + void delete_part(const std::string &part_uri); + + /// + /// Deletes a package-level relationship. + /// + void delete_relationship(const std::string &id); + + /// + /// Saves the contents of all parts and relationships that are contained in the package. + /// + void flush(); + + /// + /// Returns the part with a given URI. + /// + part get_part(const std::string &part_uri); + + /// + /// Returns a collection of all the parts in the package. + /// + part_collection get_parts(); + + /// + /// + /// + relationship get_relationship(const std::string &id); + + /// + /// Returns the package-level relationship with a given identifier. + /// + relationship_collection get_relationships(); + + /// + /// Returns a collection of all the package-level relationships that match a given RelationshipType. + /// + relationship_collection get_relationships(const std::string &relationship_type); + + /// + /// Indicates whether a part with a given URI is in the package. + /// + bool part_exists(const std::string &part_uri); + + /// + /// Indicates whether a package-level relationship with a given ID is contained in the package. + /// + bool relationship_exists(const std::string &id); + + /// + /// gets the file access setting for the package. + /// + file_access get_file_open_access() const; + + bool operator==(const package &comparand) const; + bool operator==(const nullptr_t &) const; + + /// + /// gets the category of the Package. + /// + std::string get_category() const; + + /// + /// sets the category of the Package. + /// + void set_category(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_content_status() const; + + /// + /// sets the category of the Package. + /// + void set_content_status(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_content_type() const; + + /// + /// sets the category of the Package. + /// + void set_content_type(const std::string &category); + + /// + /// gets the category of the Package. + /// + nullable get_created() const; + + /// + /// sets the category of the Package. + /// + void set_created(const nullable &created); + + /// + /// gets the category of the Package. + /// + std::string get_creator() const; + + /// + /// sets the category of the Package. + /// + void set_creator(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_description() const; + + /// + /// sets the category of the Package. + /// + void set_description(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_identifier() const; + + /// + /// sets the category of the Package. + /// + void set_identifier(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_keywords() const; + + /// + /// sets the category of the Package. + /// + void set_keywords(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_language() const; + + /// + /// sets the category of the Package. + /// + void set_language(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_last_modified_by() const; + + /// + /// sets the category of the Package. + /// + void set_last_modified_by(const std::string &category); + + /// + /// gets the category of the Package. + /// + nullable get_last_printed() const; + + /// + /// sets the category of the Package. + /// + void set_last_printed(const nullable &created); + + /// + /// gets the category of the Package. + /// + nullable get_modified() const; + + /// + /// sets the category of the Package. + /// + void set_modified(const nullable &created); + + /// + /// gets the category of the Package. + /// + std::string get_revision() const; + + /// + /// sets the category of the Package. + /// + void set_revision(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string getsubject() const; + + /// + /// sets the category of the Package. + /// + void setsubject(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_title() const; + + /// Ssummary> + /// gets the category of the Package. + /// + void set_title(const std::string &category); + + /// + /// gets the category of the Package. + /// + std::string get_version() const; + + /// + /// sets the category of the Package. + /// + void set_version(const std::string &category); + +private: + friend opc_callback_handler; + + package(std::iostream &stream, file_mode package_mode, file_access package_access); + package(const std::string &path, file_mode package_mode, file_access package_access); + + void open_container(); + + int write(char *buffer, int length); + + int read(const char *buffer, int length); + + std::ios::pos_type seek(std::ios::pos_type ofs); + + int trim(std::ios::pos_type new_size); + + package_impl *impl_; +}; + +struct coordinate +{ + std::string column; + int row; +}; + +class cell +{ +public: + enum class type + { + null, + numeric, + string, + date, + formula, + boolean, + error + }; + + static coordinate coordinate_from_string(const std::string &address); + static int column_index_from_string(const std::string &column_string); + static std::string get_column_letter(int column_index); + static std::string absolute_coordinate(const std::string &absolute_address); + + cell(); + ~cell(); + + cell &operator=(int value); + cell &operator=(double value); + cell &operator=(const std::string &value); + cell &operator=(const char *value); + cell &operator=(const tm &value); + + friend bool operator==(const std::string &comparand, const cell &cell); + friend bool operator==(const char *comparand, const cell &cell); + friend bool operator==(const tm &comparand, const cell &cell); + + std::string to_string() const; + bool is_date() const; + style &get_style(); + type get_data_type(); + +private: + friend struct worksheet_struct; + + cell(cell_struct *root); + + cell_struct *root_; +}; + +inline std::ostream &operator<<(std::ostream &stream, const cell &cell) +{ + return stream << cell.to_string(); +} + +typedef std::vector> range; + +class worksheet +{ +public: + enum class Break + { + None = 0, + Row = 1, + Column = 2 + }; + + enum class SheetState + { + Visible, + Hidden, + VeryHidden + }; + + enum class PaperSize + { + Letter = 1, + LetterSmall = 2, + Tabloid = 3, + Ledger = 4, + Legal = 5, + Statement = 6, + Executive = 7, + A3 = 8, + A4 = 9, + A4Small = 10, + A5 = 11 + }; + + enum class Orientation + { + Portrait, + Landscape + }; + + void operator=(const worksheet &other); + cell operator[](const std::string &address); + std::string to_string() const; + workbook &get_parent() const; + void garbage_collect(); + std::set get_cell_collection(); + std::string get_title() const; + void set_title(const std::string &title); + cell get_freeze_panes() const; + void set_freeze_panes(cell top_left_cell); + void set_freeze_panes(const std::string &top_left_coordinate); + void unfreeze_panes(); + xlnt::cell cell(const std::string &coordinate); + xlnt::cell cell(int row, int column); + int get_highest_row() const; + int get_highest_column() const; + std::string calculate_dimension() const; + range range(const std::string &range_string, int row_offset, int column_offset); + relationship create_relationship(const std::string &relationship_type); + //void add_chart(chart chart); + void merge_cells(const std::string &range_string); + void merge_cells(int start_row, int start_column, int end_row, int end_column); + void unmerge_cells(const std::string &range_string); + void unmerge_cells(int start_row, int start_column, int end_row, int end_column); + void append(const std::vector &cells); + void append(const std::unordered_map &cells); + void append(const std::unordered_map &cells); + xlnt::range rows() const; + xlnt::range columns() const; + bool operator==(const worksheet &other) const; + bool operator!=(const worksheet &other) const; + bool operator==(nullptr_t) const; + bool operator!=(nullptr_t) const; + +private: + friend class workbook; + worksheet(worksheet_struct *root); + worksheet_struct *root_; +}; + +class workbook +{ +public: + workbook(); + workbook(const workbook &) = delete; + const workbook &operator=(const workbook &) = delete; + + worksheet get_sheet_by_name(const std::string &sheet_name); + worksheet get_active(); + worksheet create_sheet(); + worksheet create_sheet(std::size_t index); + std::vector get_sheet_names() const; + std::vector::iterator begin(); + std::vector::iterator end(); + worksheet operator[](const std::string &name); + void save(const std::string &filename); + +private: + worksheet active_worksheet_; + std::vector worksheets_; +}; + +} // namespace xlnt