Spreadsheet: change alias handling

No longer add dynamic property for alias, simply rely on
get(Dynamic)PropertyByName() to check for aliases.

Add new API PropertyContainer::getPropertyNamedList() so that
ExpressionCompleter can discover properties with aliases.
This commit is contained in:
Zheng, Lei
2019-12-26 19:02:04 +08:00
committed by Chris Hennes
parent 79cda0a1b7
commit 2a3951ca32
10 changed files with 108 additions and 104 deletions

View File

@@ -65,6 +65,12 @@ void DynamicProperty::getPropertyList(std::vector<Property*> &List) const
List.push_back(v.property);
}
void DynamicProperty::getPropertyNamedList(std::vector<std::pair<const char*, Property*> > &List) const
{
for (auto &v : props.get<0>())
List.emplace_back(v.getName(),v.property);
}
void DynamicProperty::getPropertyMap(std::map<std::string,Property*> &Map) const
{
for (auto &v : props.get<0>())