From 8157678eba97d7de5c53b424a9866d327392bbd9 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 31 May 2021 12:27:58 -0700 Subject: Fix standard incompetence found by MSVC - requires-expression still not working, because they aren't supported yet outside of a concept --- core/src/Model/Template/TableTemplate.hpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'core/src/Model/Template/TableTemplate.hpp') diff --git a/core/src/Model/Template/TableTemplate.hpp b/core/src/Model/Template/TableTemplate.hpp index 688192a..f7a79e9 100644 --- a/core/src/Model/Template/TableTemplate.hpp +++ b/core/src/Model/Template/TableTemplate.hpp @@ -34,12 +34,12 @@ public: Vec2i Location; /// Location of the primary (top left) cell, if this cell is a part of a merged group. /// Otherwise, either component of this field shall be -1. - Vec2i PrimaryCellLocation; - int SpanX; - int SpanY; - TextAlignment HorizontalAlignment = AlignAxisMin; - TextAlignment VerticalAlignment = AlignAxisMin; - CellType Type; + Vec2i PrimaryCellLocation{ -1, -1 }; + int SpanX = 0; + int SpanY = 0; + TextAlignment HorizontalAlignment = AlignCenter; + TextAlignment VerticalAlignment = AlignCenter; + CellType Type = ConstantCell; /// The id of the group description object, if this cell isn't a constant or singluar parameter cell. Otherwise, this value is -1. int DataId = -1; @@ -56,7 +56,7 @@ public: // TODO support horizontal filling order /// Parameter group information for a grouped array of cells. When instanciated, an array of 0 or more /// elements shall be provided by the user, which will replace the group of templated cells with a list -/// of rows, each instanciated with the n-th element in the provided array. +/// of rows, each instantiated with the n-th element in the provided array. /// \code /// [["foo", "bar", "foobar"], /// ["a", "b", c"], @@ -124,7 +124,7 @@ public: const TableTemplate& GetTable() const; }; -/// A table template, where individual cells can be filled by workflows instanciating this template. Merged cells, +/// A table template, where individual cells can be filled by workflows instantiating this template. Merged cells, /// parametric rows/columns, and grids are also supported. /// /// This current supports exporting to xlsx files. @@ -163,6 +163,9 @@ public: }; BreakCellsResult BreakCells(Vec2i topLeft); - lxw_workbook* InstanciateToExcelWorkbook(const TableInstanciationParameters& params) const; - lxw_worksheet* InstanciateToExcelWorksheet(lxw_workbook* workbook, const TableInstanciationParameters& params) const; + lxw_workbook* InstantiateToExcelWorkbook(const TableInstanciationParameters& params) const; + lxw_worksheet* InstantiateToExcelWorksheet(lxw_workbook* workbook, const TableInstanciationParameters& params) const; + + virtual ReadResult ReadFrom(std::istream& stream) override; + virtual void WriteTo(std::ostream& stream) const override; }; -- cgit v1.2.3-70-g09d2