Spreadsheet: fix string save/restore, fixes #6395
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
734d1adb46
commit
8c6eeb8407
@@ -250,12 +250,7 @@ bool Cell::getStringContent(std::string & s, bool persistent) const
|
||||
s = "=" + expression->toString(persistent);
|
||||
else if (freecad_dynamic_cast<App::StringExpression>(expression.get())) {
|
||||
s = static_cast<App::StringExpression*>(expression.get())->getText();
|
||||
char * end;
|
||||
errno = 0;
|
||||
double d = strtod(s.c_str(), &end);
|
||||
(void)d; // fix gcc warning
|
||||
if (!*end && errno == 0)
|
||||
s = "'" + s;
|
||||
s = "'" + s;
|
||||
}
|
||||
else if (freecad_dynamic_cast<App::ConstantExpression>(expression.get()))
|
||||
s = "=" + expression->toString();
|
||||
|
||||
Reference in New Issue
Block a user