SheetExpressions.h header

#include <ew/app/SheetExpressions.h>

Namespace ew::app

Functions

QString ew::app::spreadsheet::evaluatedValue(const ew::core::project::Project &project, const ew::core::spreadsheet::Spreadsheet &sheet, int row, int column, const ew::app::expression::Viewer &viewer={})

One cell of sheet, with the world reachable. evaluatedValues is what a whole grid wants.

std::map< std::pair< int, int >, QString > ew::app::spreadsheet::evaluatedValues(const ew::core::project::Project &project, const ew::core::spreadsheet::Spreadsheet &sheet, const ew::app::expression::Viewer &viewer={})

Evaluates sheet with the rest of the project reachable from its formulas.

The same answer ew::core::spreadsheet::evaluatedValues gives, plus one thing the engine layer cannot supply on its own: a name that is not a cell is resolved against the world, so [email protected] * 2 computes in a cell exactly as it does in a validation rule and a branching condition. One resolver, four surfaces – see ew::app::expression::WorldResolver.

viewer is who the sheet is being read as; the default is the author, who sees everything. A restricted reader gets a refusal in the cell rather than a value, because a formula that could read a hidden field would publish it through its result.