diff --git a/docs/Doxyfile b/docs/Doxyfile index d60f7b2b..17f3c180 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -258,12 +258,12 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES -INCLUDE_PATH = +INCLUDE_PATH = ../include INCLUDE_FILE_PATTERNS = -PREDEFINED = +PREDEFINED = XLNT_API= EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- diff --git a/docs/api/xlnt.cell.rst b/docs/api/xlnt.cell.rst index e716f7aa..ef3e7115 100644 --- a/docs/api/xlnt.cell.rst +++ b/docs/api/xlnt.cell.rst @@ -7,8 +7,7 @@ Cell Module .. doxygenclass:: xlnt::cell_reference :members: -.. doxygenclass:: xlnt::cell_type - :members: +.. doxygenenum:: xlnt::cell_type .. doxygenclass:: xlnt::cell :members: @@ -24,7 +23,7 @@ Cell Module .. doxygenstruct:: xlnt::column_hash :members: -.. doxygenclass:: xlnt::text +.. doxygenclass:: xlnt::formatted_text :members: .. doxygenclass:: xlnt::text_run diff --git a/docs/api/xlnt.charts.rst b/docs/api/xlnt.charts.rst deleted file mode 100644 index 29eae9a6..00000000 --- a/docs/api/xlnt.charts.rst +++ /dev/null @@ -1,2 +0,0 @@ -Charts Module -============= diff --git a/docs/api/xlnt.chartsheet.rst b/docs/api/xlnt.chartsheet.rst deleted file mode 100644 index c5b621dc..00000000 --- a/docs/api/xlnt.chartsheet.rst +++ /dev/null @@ -1,2 +0,0 @@ -Charsheet Module -================ diff --git a/docs/api/xlnt.drawing.rst b/docs/api/xlnt.drawing.rst deleted file mode 100644 index 2886e537..00000000 --- a/docs/api/xlnt.drawing.rst +++ /dev/null @@ -1,5 +0,0 @@ -Drawing Module -============== - -.. doxygenclass:: xlnt::drawing - :members: diff --git a/docs/api/xlnt.formula.rst b/docs/api/xlnt.formula.rst deleted file mode 100644 index 774be7df..00000000 --- a/docs/api/xlnt.formula.rst +++ /dev/null @@ -1,8 +0,0 @@ -Formula Module -============== - -.. doxygenclass:: xlnt::tokenizer - :members: - -.. doxygenclass:: xlnt::translator - :members: diff --git a/docs/api/xlnt.packaging.rst b/docs/api/xlnt.packaging.rst index f4ccc3b1..0cfb3eab 100644 --- a/docs/api/xlnt.packaging.rst +++ b/docs/api/xlnt.packaging.rst @@ -1,26 +1,11 @@ Packaging Module ================ -.. doxygenclass:: xlnt::app_properties - :members: - -.. doxygenclass:: xlnt::default_type - :members: - -.. doxygenclass:: xlnt::document_properties - :members: - .. doxygenclass:: xlnt::manifest :members: -.. doxygenclass:: xlnt::override_type - :members: - .. doxygenclass:: xlnt::relationship :members: -.. doxygenstruct:: xlnt::zip_info - :members: - -.. doxygenclass:: xlnt::zip_file +.. doxygenclass:: xlnt::uri :members: diff --git a/docs/api/xlnt.rst b/docs/api/xlnt.rst index b1c13061..084b7a88 100644 --- a/docs/api/xlnt.rst +++ b/docs/api/xlnt.rst @@ -1,21 +1,10 @@ -xlnt Library -============ - -.. doxygenenum:: xlnt::limit_style -.. doxygenvariable:: xlnt::LimitStyle - Library Modules =============== .. toctree:: xlnt.cell - xlnt.chart - xlnt.chartsheet - xlnt.drawing - xlnt.formula xlnt.packaging - xlnt.serialization xlnt.styles xlnt.utils xlnt.workbook diff --git a/docs/api/xlnt.styles.rst b/docs/api/xlnt.styles.rst index e3bd4066..28dd6f48 100644 --- a/docs/api/xlnt.styles.rst +++ b/docs/api/xlnt.styles.rst @@ -4,11 +4,7 @@ Styles Module .. doxygenclass:: xlnt::alignment :members: -.. doxygenclass:: xlnt::base_format - :members: - .. doxygenenum:: xlnt::border_style - :members: .. doxygenclass:: xlnt::border :members: @@ -17,7 +13,6 @@ Styles Module :members: .. doxygenenum:: xlnt::diagonal_direction - :members: .. doxygenclass:: xlnt::fill :members: @@ -29,7 +24,6 @@ Styles Module :members: .. doxygenenum:: xlnt::horizontal_alignment - :members: .. doxygenclass:: xlnt::number_format :members: @@ -37,11 +31,7 @@ Styles Module .. doxygenclass:: xlnt::protection :members: -.. doxygenclass:: xlnt::side - :members: - .. doxygenclass:: xlnt::style :members: .. doxygenenum:: xlnt::vertical_alignment - :members: diff --git a/docs/api/xlnt.utils.rst b/docs/api/xlnt.utils.rst index 296104e8..4e15ba77 100644 --- a/docs/api/xlnt.utils.rst +++ b/docs/api/xlnt.utils.rst @@ -1,46 +1,54 @@ Utilities Module ================ -.. doxygenclass:: xlnt::attribute_error +.. doxygenclass:: xlnt::exception :members: -.. doxygenenum:: xlnt::calendar +.. doxygenclass:: xlnt::invalid_parameter :members: -.. doxygenclass:: xlnt::cell_coordinates_error - :members: - -.. doxygenclass:: xlnt::column_string_index_error - :members: - -.. doxygenclass:: xlnt::data_type_error - :members: - -.. doxygenstruct:: xlnt::date - :members: - -.. doxygenstruct:: xlnt::datetime - :members: - -.. doxygenclass:: xlnt::illegal_character_error - :members: - -.. doxygenclass:: xlnt::invalid_file_error - :members: - -.. doxygenclass:: xlnt::key_error +.. doxygenclass:: xlnt::invalid_sheet_title :members: .. doxygenclass:: xlnt::missing_number_format :members: -.. doxygenclass:: xlnt::named_range_error +.. doxygenclass:: xlnt::invalid_file :members: -.. doxygenclass:: xlnt::read_only_workbook_error +.. doxygenclass:: xlnt::illegal_character :members: -.. doxygenclass:: xlnt::sheet_title_error +.. doxygenclass:: xlnt::invalid_data_type + :members: + +.. doxygenclass:: xlnt::invalid_column_string_index + :members: + +.. doxygenclass:: xlnt::invalid_cell_reference + :members: + +.. doxygenclass:: xlnt::invalid_attribute + :members: + +.. doxygenclass:: xlnt::key_not_found + :members: + +.. doxygenclass:: xlnt::no_visible_worksheets + :members: + +.. doxygenclass:: xlnt::unhandled_switch_case + :members: + +.. doxygenclass:: xlnt::unsupported + :members: + +.. doxygenenum:: xlnt::calendar + +.. doxygenstruct:: xlnt::date + :members: + +.. doxygenstruct:: xlnt::datetime :members: .. doxygenstruct:: xlnt::time @@ -52,5 +60,9 @@ Utilities Module .. doxygenclass:: xlnt::utf8string :members: -.. doxygenclass:: xlnt::value_error +.. doxygenclass:: xlnt::optional :members: + +.. doxygenclass:: xlnt::path + :members: + diff --git a/docs/api/xlnt.worksheet.rst b/docs/api/xlnt.worksheet.rst index 10951344..315ed916 100644 --- a/docs/api/xlnt.worksheet.rst +++ b/docs/api/xlnt.worksheet.rst @@ -26,13 +26,10 @@ Worksheet Module :members: .. doxygenenum:: xlnt::major_order - :members: .. doxygenenum:: xlnt::orientation - :members: .. doxygenenum:: xlnt::page_break - :members: .. doxygenclass:: xlnt::page_margins :members: @@ -44,7 +41,6 @@ Worksheet Module :members: .. doxygenenum:: xlnt::paper_size - :members: .. doxygenclass:: xlnt::range_iterator :members: @@ -65,7 +61,6 @@ Worksheet Module :members: .. doxygenenum:: xlnt::sheet_state - :members: .. doxygenclass:: xlnt::sheet_view :members: diff --git a/docs/conf.py b/docs/conf.py index 2f9575c0..7eab53c6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,6 +45,7 @@ extensions = [ # Breathe extension variables breathe_projects = { "xlnt" : "doxyxml/" } breathe_default_project = "xlnt" +breathe_doxygen_config_options = {'EXCLUDE_SYMBOLS': 'XLNT_API'} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/index.rst b/docs/index.rst index db081691..24105417 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -124,13 +124,13 @@ Summary of Features Sample code: ++++++++++++ -.. literalinclude:: /samples/sample.cpp +.. literalinclude:: ../samples/sample.cpp How to Contribute Code ---------------------- -See :ref:`development` +See `Information For Developers`_ Installation ------------ diff --git a/include/xlnt/cell/cell.hpp b/include/xlnt/cell/cell.hpp index 9d3d7a0d..dab9f1d7 100644 --- a/include/xlnt/cell/cell.hpp +++ b/include/xlnt/cell/cell.hpp @@ -415,15 +415,15 @@ public: /// const worksheet get_worksheet() const; - /// - /// Return the workbook of the worksheet that owns this cell. - /// - workbook &get_workbook(); + /// + /// Return the workbook of the worksheet that owns this cell. + /// + workbook &get_workbook(); - /// - /// Return the workbook of the worksheet that owns this cell. - /// - const workbook &get_workbook() const; + /// + /// Return the workbook of the worksheet that owns this cell. + /// + const workbook &get_workbook() const; /// /// Shortcut to return the base date of the parent workbook. @@ -481,19 +481,6 @@ public: /// bool operator==(std::nullptr_t) const; - // friend operators, so we can put cell on either side of comparisons with other types - - /// - /// Return true if this cell is uninitialized. - /// - friend XLNT_API bool operator==(std::nullptr_t, const cell &cell); - - /// - /// Convenience function for writing cell to an ostream. - /// Uses cell::to_string() internally. - /// - friend XLNT_API std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell); - private: // make these friends so they can use the private constructor friend class style; @@ -530,4 +517,15 @@ private: detail::cell_impl *d_; }; +/// +/// Return true if this cell is uninitialized. +/// +XLNT_API bool operator==(std::nullptr_t, const cell &cell); + +/// +/// Convenience function for writing cell to an ostream. +/// Uses cell::to_string() internally. +/// +XLNT_API std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell); + } // namespace xlnt diff --git a/include/xlnt/cell/cell_reference.hpp b/include/xlnt/cell/cell_reference.hpp index ada44eaa..f5933ff4 100644 --- a/include/xlnt/cell/cell_reference.hpp +++ b/include/xlnt/cell/cell_reference.hpp @@ -40,6 +40,9 @@ class range_reference; /// struct XLNT_API cell_reference_hash { + /// + /// + /// std::size_t operator()(const cell_reference &k) const; }; diff --git a/include/xlnt/cell/index_types.hpp b/include/xlnt/cell/index_types.hpp index 771397ae..72dbf81e 100644 --- a/include/xlnt/cell/index_types.hpp +++ b/include/xlnt/cell/index_types.hpp @@ -41,11 +41,14 @@ using row_t = std::uint32_t; /// /// Columns can be referred to as a string A,B,...Z,AA,AB,..,ZZ,AAA,...,ZZZ /// or as a 1-indexed index. This class encapsulates both of these forms of -/// column referencing and allows for convertions between them. +/// column referencing and allows for conversions between them. /// class XLNT_API column_t { public: + /// + /// + /// using index_t = std::uint32_t; /// @@ -315,6 +318,9 @@ public: /// struct XLNT_API column_hash { + /// + /// + /// std::size_t operator()(const column_t &k) const; }; @@ -322,15 +328,20 @@ struct XLNT_API column_hash namespace std { +/// +/// Template specialization to allow xlnt::column_t to be used as a key in a std container. +/// template <> struct hash { + /// + /// + /// size_t operator()(const xlnt::column_t &k) const { + static xlnt::column_hash hasher; return hasher(k); } - - xlnt::column_hash hasher; }; } // namespace std diff --git a/include/xlnt/charts/axis.hpp b/include/xlnt/charts/axis.hpp deleted file mode 100644 index 82d1c1cd..00000000 --- a/include/xlnt/charts/axis.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API axis -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/bar_chart.hpp b/include/xlnt/charts/bar_chart.hpp deleted file mode 100644 index 246b09a8..00000000 --- a/include/xlnt/charts/bar_chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API bar_chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/chart.hpp b/include/xlnt/charts/chart.hpp deleted file mode 100644 index 76349961..00000000 --- a/include/xlnt/charts/chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/error_bar.hpp b/include/xlnt/charts/error_bar.hpp deleted file mode 100644 index c05eab4d..00000000 --- a/include/xlnt/charts/error_bar.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API error_bar -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/graph_chart.hpp b/include/xlnt/charts/graph_chart.hpp deleted file mode 100644 index 826e07a2..00000000 --- a/include/xlnt/charts/graph_chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API graph_chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/legend.hpp b/include/xlnt/charts/legend.hpp deleted file mode 100644 index 14c009cf..00000000 --- a/include/xlnt/charts/legend.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API legend -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/line_chart.hpp b/include/xlnt/charts/line_chart.hpp deleted file mode 100644 index de52b9f2..00000000 --- a/include/xlnt/charts/line_chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API line_chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/pie_chart.hpp b/include/xlnt/charts/pie_chart.hpp deleted file mode 100644 index 3296ffdf..00000000 --- a/include/xlnt/charts/pie_chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API pie_chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/scatter_chart.hpp b/include/xlnt/charts/scatter_chart.hpp deleted file mode 100644 index b7f2a6d0..00000000 --- a/include/xlnt/charts/scatter_chart.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API scatter_chart -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/charts/series.hpp b/include/xlnt/charts/series.hpp deleted file mode 100644 index cb209894..00000000 --- a/include/xlnt/charts/series.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API series -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/drawing/drawing.hpp b/include/xlnt/drawing/drawing.hpp deleted file mode 100644 index c54d4592..00000000 --- a/include/xlnt/drawing/drawing.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class worksheet; -struct drawing_struct; - -class XLNT_API drawing -{ -public: - drawing(); - -private: - friend class worksheet; - drawing(drawing_struct *root); - drawing_struct *root_; -}; - -} // namespace xlnt diff --git a/include/xlnt/formula/excel_tokenizer_parser.txt b/include/xlnt/formula/excel_tokenizer_parser.txt deleted file mode 100644 index 91b4cb3a..00000000 --- a/include/xlnt/formula/excel_tokenizer_parser.txt +++ /dev/null @@ -1,61 +0,0 @@ -From ewbachtal@ewbi.com Fri Apr 3 11:00:25 2015 -Date: Fri, 3 Apr 2015 07:58:55 -0700 -From: Eric W. Bachtal -To: 'Paul Harrington' -Subject: RE: [pycel] re-license the parser/tokenizer under a license suitable for incorporation into openpyxl (#11) (fwd) - -Hi Paul, - -I can't speak for Dirk's wishes regarding his Python implementation, but I'm -fine with my original JavaScript or C# Excel formula parser code being -released with a BSD/MIT license, as long as proper attribution is provided -and there's a clear indication that the software is provided "as is", -without warranty of any kind. - -Good luck! - -ewb - -425 241 2505 - - ------Original Message----- -From: Paul Harrington [mailto:phrrngtn@panix.com] -Sent: Friday, April 3, 2015 7:19 AM -To: info@ewbi.com -Subject: Re: [pycel] re-license the parser/tokenizer under a license -suitable for incorporation into openpyxl (#11) (fwd) - - - -Hi, I was wondering if you would be OK with the parser (specifically the -Python implementation) being released with an BSD/MIT license? - -thanks for the implementation! - -pjjH - - - - ----------- Forwarded message ---------- -Date: Fri, 03 Apr 2015 06:26:39 -0700 -From: Dirk Gorissen -Reply-To: dgorissen/pycel - - -To: dgorissen/pycel -Cc: Paul Harrington -Subject: Re: [pycel] re-license the parser/tokenizer under a license -suitable - for incorporation into openpyxl (#11) - -I did not write the tokenizing/parser code and don't hold the copyright to -it. -Eric did and I just applied a small patch and integrated it. See the header -of tokenizer.py. - ---- -Reply to this email directly or view it on GitHub: -https://github.com/dgorissen/pycel/issues/11#issuecomment-89287122 diff --git a/include/xlnt/formula/known_formulae.hpp b/include/xlnt/formula/known_formulae.hpp deleted file mode 100644 index 88bfdefb..00000000 --- a/include/xlnt/formula/known_formulae.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API known_formulae -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/formula/tokenizer.hpp b/include/xlnt/formula/tokenizer.hpp deleted file mode 100644 index 2dbe21e0..00000000 --- a/include/xlnt/formula/tokenizer.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -class XLNT_API tokenizer -{ -}; - -} // namespace xlnt diff --git a/include/xlnt/formula/translator.hpp b/include/xlnt/formula/translator.hpp deleted file mode 100644 index c21d6398..00000000 --- a/include/xlnt/formula/translator.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include -#include - -#include - -namespace xlnt { - -class cell_reference; -class tokenizer; - -class XLNT_API translator -{ - translator(const std::string &formula, const cell_reference &ref); - - std::vector get_tokens(); - - static std::string translate_row(const std::string &row_str, int row_delta); - static std::string translate_col(const std::string &col_str, col_delta); - - std::pair strip_ws_name(const std::string &range_str); - - void translate_range(const range_reference &range_ref); - void translate_formula(const cell_reference &dest); - -private: - const std::string ROW_RANGE_RE; - const std::string COL_RANGE_RE; - const std::string CELL_REF_RE; - - std::string formula_; - cell_reference reference_; - tokenizer tokenizer_; -}; - -} // namespace xlnt diff --git a/include/xlnt/packaging/relationship.hpp b/include/xlnt/packaging/relationship.hpp index 6feefb09..5352e109 100644 --- a/include/xlnt/packaging/relationship.hpp +++ b/include/xlnt/packaging/relationship.hpp @@ -100,6 +100,9 @@ enum class XLNT_API relationship_type class XLNT_API relationship { public: + /// + /// + /// using type = relationship_type; /// diff --git a/include/xlnt/styles/color.hpp b/include/xlnt/styles/color.hpp index f6adbc05..60eff4c6 100644 --- a/include/xlnt/styles/color.hpp +++ b/include/xlnt/styles/color.hpp @@ -36,13 +36,25 @@ namespace xlnt { class XLNT_API indexed_color { public: + /// + /// + /// indexed_color(std::size_t index); + /// + /// + /// std::size_t get_index() const; + /// + /// + /// void set_index(std::size_t index); private: + /// + /// + /// std::size_t index_; }; @@ -52,13 +64,25 @@ private: class XLNT_API theme_color { public: + /// + /// + /// theme_color(std::size_t index); + /// + /// + /// std::size_t get_index() const; + /// + /// + /// void set_index(std::size_t index); private: + /// + /// + /// std::size_t index_; }; @@ -68,27 +92,60 @@ private: class XLNT_API rgb_color { public: + /// + /// + /// rgb_color(const std::string &hex_string); + /// + /// + /// rgb_color(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a = 255); + /// + /// + /// std::string get_hex_string() const; + /// + /// + /// std::uint8_t get_red() const; + /// + /// + /// std::uint8_t get_green() const; + /// + /// + /// std::uint8_t get_blue() const; + /// + /// + /// std::uint8_t get_alpha() const; + /// + /// + /// std::array get_rgb() const; + /// + /// + /// std::array get_rgba() const; private: + /// + /// + /// static std::array decode_hex_string(const std::string &hex_string); + /// + /// + /// std::array rgba_; }; @@ -106,7 +163,7 @@ public: indexed, theme, rgb, - auto_ + auto_ }; /// diff --git a/include/xlnt/utils/exceptions.hpp b/include/xlnt/utils/exceptions.hpp index 5bedcbe1..24b3b1e2 100644 --- a/include/xlnt/utils/exceptions.hpp +++ b/include/xlnt/utils/exceptions.hpp @@ -333,7 +333,7 @@ public: /// /// /// - unsupported(const std::string &message); + unsupported(const std::string &message); /// /// diff --git a/include/xlnt/utils/path.hpp b/include/xlnt/utils/path.hpp index c40dbb74..8a18b91d 100644 --- a/include/xlnt/utils/path.hpp +++ b/include/xlnt/utils/path.hpp @@ -181,15 +181,20 @@ private: namespace std { +/// +/// Template specialization to allow xlnt:path to be used as a key in a std container. +/// template <> struct hash { + /// + /// + /// size_t operator()(const xlnt::path &p) const { + static hash hasher; return hasher(p.string()); } - - hash hasher; }; } // namespace std diff --git a/include/xlnt/utils/utf8string.hpp b/include/xlnt/utils/utf8string.hpp index 630c9177..9baa4d53 100644 --- a/include/xlnt/utils/utf8string.hpp +++ b/include/xlnt/utils/utf8string.hpp @@ -29,6 +29,9 @@ namespace xlnt { +/// +/// +/// class XLNT_API utf8string { public: diff --git a/include/xlnt/worksheet/worksheet.hpp b/include/xlnt/worksheet/worksheet.hpp index a00fef67..94b1674c 100644 --- a/include/xlnt/worksheet/worksheet.hpp +++ b/include/xlnt/worksheet/worksheet.hpp @@ -21,6 +21,7 @@ // // @license: http://www.opensource.org/licenses/mit-license.php // @author: see AUTHORS file + #pragma once #include @@ -113,7 +114,7 @@ public: /// /// /// - const workbook &get_workbook() const; + const workbook &get_workbook() const; /// /// @@ -699,7 +700,7 @@ public: /// /// /// - bool has_view() const; + bool has_view() const; /// /// @@ -709,30 +710,30 @@ public: /// /// /// - bool x14ac_enabled() const; + bool x14ac_enabled() const; /// /// /// - void enable_x14ac(); + void enable_x14ac(); /// /// /// - void disable_x14ac(); + void disable_x14ac(); private: friend class cell; friend class const_range_iterator; friend class range_iterator; friend class workbook; - friend class detail::xlsx_consumer; - friend class detail::xlsx_producer; + friend class detail::xlsx_consumer; + friend class detail::xlsx_producer; /// /// /// - void register_comments_in_manifest(); + void register_comments_in_manifest(); /// /// diff --git a/source/cell/cell.cpp b/source/cell/cell.cpp index 5e4be642..de6c6c8a 100644 --- a/source/cell/cell.cpp +++ b/source/cell/cell.cpp @@ -862,7 +862,7 @@ calendar cell::get_base_date() const return get_workbook().get_base_date(); } -std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell) +XLNT_API std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell) { return stream << cell.to_string(); } diff --git a/source/charts/tests/test_chart.hpp b/source/charts/tests/test_chart.hpp deleted file mode 100644 index 6c141f99..00000000 --- a/source/charts/tests/test_chart.hpp +++ /dev/null @@ -1,157 +0,0 @@ -#pragma once - -#include -#include - -#include - -class test_chart : public CxxTest::TestSuite -{ -public: - void setUp() - { - /* - xlnt::workbook wb; - auto ws = wb.get_active(); - ws.set_title("data"); - - for(int i = 0; i < 10; i++) - { - ws.cell(i, 0) = i; - auto chart = BarChart(); - chart.title = "TITLE"; - chart.add_serie(Serie(Reference(ws, (0, 0), (10, 0)))); - chart._series[-1].color = Color.GREEN; - cw = ChartWriter(chart); - root = Element("test"); - } - */ - } - - void test_write_title() - { - /* - cw._write_title(root); - TS_ASSERT_EQUALS(get_xml(root), "TITLE"); - */ - } - - void test_write_xaxis() - { - /* - cw._write_axis(root, chart.x_axis, "c:catAx"); - TS_ASSERT_EQUALS(get_xml(root), ""); - */ - } - - void test_write_yaxis() - { - /* - cw._write_axis(root, chart.y_axis, "c:valAx"); - TS_ASSERT_EQUALS(get_xml(root), ""); - */ - } - - void test_write_series() - { - //cw._write_series(root); - //TS_ASSERT_EQUALS(get_xml(root), "\"data\"!$A$1:$A$11General0123456789None"); - } - - void test_write_legend() - { - /*cw._write_legend(root); - TS_ASSERT_EQUALS(get_xml(root), "");*/ - } - - void test_no_write_legend() - { - /*xlnt::workbook wb; - auto ws = wb.get_active(); - ws.set_title("data"); - for(int i = 0; i < 10; i++) - { - ws.cell(i, 0) = i; - ws.cell(i, 1) = i; - scatterchart = ScatterChart(); - scatterchart.add_serie(Serie(Reference(ws, (0, 0), (10, 0)), ; - xvalues = Reference(ws, (0, 1), (10, 1)))); - cw = ChartWriter(scatterchart); - root = Element("test"); - scatterchart.show_legend = False; - cw._write_legend(root); - TS_ASSERT_EQUALS(get_xml(root), ""); - }*/ - } - - void test_write_print_settings() - { - /*cw._write_print_settings(root); - TS_ASSERT_EQUALS(get_xml(root), "");*/ - } - - void test_write_chart() - { - //cw._write_chart(root); - //// Truncate floats because results differ with Python >= 3.2 and <= 3.1 - //test_xml = sub("([0-9][.][0-9]{4})[0-9]*", "\\1", get_xml(root)); - //TS_ASSERT_EQUALS(test_xml, "TITLE\"data\"!$A$1:$A$11General0123456789None"); - } - - void setUp_scatter() - { - /*wb = Workbook(); - ws = wb.get_active_sheet(); - ws.title = "data"; - for i in range(10) - { - ws.cell(row = i, column = 0).value = i; - ws.cell(row = i, column = 1).value = i; - scatterchart = ScatterChart(); - scatterchart.add_serie(Serie(Reference(ws, (0, 0), (10, 0)), ; - xvalues = Reference(ws, (0, 1), (10, 1)))); - cw = ChartWriter(scatterchart); - root = Element("test"); - }*/ - } - - void test_write_xaxis_scatter() - { - /*scatterchart.x_axis.title = "test x axis title"; - cw._write_axis(root, scatterchart.x_axis, "c:valAx"); - TS_ASSERT_EQUALS(get_xml(root), "test x axis title");*/ - } - - void test_write_yaxis_scatter() - { - /*scatterchart.y_axis.title = "test y axis title"; - cw._write_axis(root, scatterchart.y_axis, "c:valAx"); - TS_ASSERT_EQUALS(get_xml(root), "test y axis title");*/ - } - - void test_write_series_scatter() - { - /*cw._write_series(root); - TS_ASSERT_EQUALS(get_xml(root), "\"data\"!$B$1:$B$11General0123456789None\"data\"!$A$1:$A$11General0123456789None");*/ - } - - void test_write_legend_scatter() - { - /*cw._write_legend(root); - TS_ASSERT_EQUALS(get_xml(root), "");*/ - } - - void test_write_print_settings_scatter() - { - /*cw._write_print_settings(root); - TS_ASSERT_EQUALS(get_xml(root), "");*/ - } - - void test_write_chart_scatter() - { - //cw._write_chart(root); - //// Truncate floats because results differ with Python >= 3.2 and <= 3.1 - //test_xml = sub("([0-9][.][0-9]{4})[0-9]*", "\\1", get_xml(root)); - //TS_ASSERT_EQUALS(test_xml, "; - } -}; diff --git a/source/detail/xlsx_consumer.cpp b/source/detail/xlsx_consumer.cpp index 2a5d6fe3..d79ab1f1 100644 --- a/source/detail/xlsx_consumer.cpp +++ b/source/detail/xlsx_consumer.cpp @@ -2222,9 +2222,8 @@ void xlsx_consumer::read_worksheet(const std::string &rel_id) auto vml_drawings_part = manifest.canonicalize({workbook_rel, sheet_rel, manifest.get_relationship(sheet_path, xlnt::relationship::type::vml_drawing)}); - auto receive = xml::parser::receive_default; - xml::parser parser(archive_->open(vml_drawings_part.string()), vml_drawings_part.string(), receive); - parser_ = &parser; + xml::parser vml_parser(archive_->open(vml_drawings_part.string()), vml_drawings_part.string(), receive); + parser_ = &vml_parser; read_vml_drawings(ws); } @@ -2233,7 +2232,7 @@ void xlsx_consumer::read_worksheet(const std::string &rel_id) // Sheet Relationship Target Parts -void xlsx_consumer::read_vml_drawings(worksheet ws) +void xlsx_consumer::read_vml_drawings(worksheet/*ws*/) { } diff --git a/source/drawing/drawing.cpp b/source/drawing/drawing.cpp deleted file mode 100644 index 8f04f512..00000000 --- a/source/drawing/drawing.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// Copyright (c) 2010-2015 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, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#include - -namespace xlnt { - -struct drawing_struct -{ - drawing_struct() - { - } -}; - -drawing::drawing() : root_(nullptr) -{ -} - -} // namespace xlnt diff --git a/source/drawing/tests/test_drawing.hpp b/source/drawing/tests/test_drawing.hpp deleted file mode 100644 index 64bc27c6..00000000 --- a/source/drawing/tests/test_drawing.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include - -#include - -class test_drawing : public CxxTest::TestSuite -{ -};