View Issue Details

IDProjectCategoryView StatusLast Update
0004156ExpressionsFeaturepublic2021-02-07 00:43
ReporteropenBrain Assigned Tohyarion  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Target Version0.19Fixed in Version0.19 
Summary0004156: [Spreadsheet] Necessarily use of leading '=' to enter an expression
DescriptionAs is, a spreadsheet cell value tends to be automatically converted to an expression.
Also it creates inconsistent behavior depending on the spreadsheet state
Example reproducing process :
  1. In cell A3, enter text 'A1'
  2. In cell A1, enter value '1000'
  3. In cell A3, delete value then enter again 'A1' => This time it is considered an expression and '1000' value appears
To get a simple consistent behavior, proposed solution is that an expression necessarily shall start with a leading '=' sign.
All other inputs are just considered as user direct entries and displayed as such.

Forum thread
Tagsexpressions, spreadsheet
FreeCAD Information

Activities

hyarion

2020-12-30 17:09

developer   ~0015181

Just for the record, I've created a pull request ( https://github.com/FreeCAD/FreeCAD/pull/4215 ) with a possible solution.

The PR includes a test case for this issue but since numbers are expressions too, requiring '=' for them too didn't feely feel like a good option. Instead I took some creative freedom and allowed simple number inputs such as "1", "1 mm", "1/4", "1m/2m", etc. to be parsed without '='.
More about this can be read in the pull request.

Related Changesets

FreeCAD: master aa52a3f5

2021-02-05 12:29:57

yorik


Committer: GitHub Details Diff
Merge pull request 0004215 from hyarion/feature-spreadsheet-equal-prefix-for-expressions

[Spreadsheet] Only evaluate cell values when prefixed with '='
Affected Issues
0004156
mod - src/Mod/Spreadsheet/App/Cell.cpp Diff File
mod - src/Mod/Spreadsheet/TestSpreadsheet.py Diff File

Issue History

Date Modified Username Field Change
2019-10-08 11:28 openBrain New Issue
2019-10-08 11:28 openBrain Tag Attached: expressions
2019-10-08 11:28 openBrain Tag Attached: spreadsheet
2020-12-04 04:22 Kunda1 Project FreeCAD => Expressions
2020-12-30 17:09 hyarion Note Added: 0015181
2021-01-07 15:11 Kunda1 Assigned To => hyarion
2021-01-07 15:11 Kunda1 Status new => assigned
2021-02-06 06:30 abdullah Target Version => 0.20
2021-02-06 15:36 wmayer Changeset attached => FreeCAD master aa52a3f5
2021-02-06 15:40 wmayer Status assigned => closed
2021-02-06 15:40 wmayer Resolution open => fixed
2021-02-06 15:40 wmayer Fixed in Version => 0.19
2021-02-07 00:43 Kunda1 Target Version 0.20 => 0.19