1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

Spreadsheet: Save and load cell types and formatting options

This commit is contained in:
AnotherTest 2020-09-25 22:30:32 +03:30 committed by Andreas Kling
parent 395df7b27d
commit 4748248fef
3 changed files with 99 additions and 0 deletions

View file

@ -52,6 +52,7 @@ Vector<StringView> CellType::names()
}
CellType::CellType(const StringView& name)
: m_name(name)
{
ASSERT(!s_cell_types.contains(name));
s_cell_types.set(name, this);

View file

@ -52,8 +52,13 @@ public:
virtual JS::Value js_value(Cell&, const CellTypeMetadata&) const = 0;
virtual ~CellType() { }
const String& name() const { return m_name; }
protected:
CellType(const StringView& name);
private:
String m_name;
};
}