Spreadsheet: Fixed issue #2894: Unit strings could be used as aliases.

This commit is contained in:
Eivind Kvedalen
2017-03-06 00:27:19 +01:00
committed by Yorik van Havre
parent 31b0233393
commit 2714dd82c8
4 changed files with 27 additions and 0 deletions

View File

@@ -149,6 +149,9 @@ bool PropertySheet::isValidAlias(const std::string &candidate)
if (getValueFromAlias(candidate) != 0)
return false;
if (ExpressionParser::isTokenAUnit(candidate))
return false;
if (boost::regex_match(candidate.c_str(), cm, gen)) {
static const boost::regex e("\\${0,1}([A-Z]{1,2})\\${0,1}([0-9]{1,5})");