Commit Graph

31 Commits

Author SHA1 Message Date
andrea reale
3a85c7c729 Code clean 2022-03-02 18:55:10 +01:00
Uwe
a8c912d6f8 [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
Zheng, Lei
0c2c334f87 Spreadsheet: support cell binding
Cell binding allows one to bind a range of cells of one sheet to another
range of cells of an arbitary sheet, including any empty cells in the
range.

The binding is implemented with PropertyExpressionEngine and
PropertySheet::setPathValue(), which binds a special path of
PropertySheet, such as

    .cells.Bind.A1.D1

to an expression, such as

     tuple(.cells, <<A2>>, <<A5>>)

The A1 and D1 in the example above specifies the binding start and end
cell address. And <<A2>> and <<A5>> are the range of cells to bind to.
Note that you can use any expression that evalutes to string for the
binding destination, e.g. <<A%d>> % B1, which uses the value inside B1
to construct the binding destination. The '.cells' in the tuple shown
above is an example to bind cells of the same PropertySheet. It can be
change to to reference to any other spreadsheet, even those outside the
current document, e.g. Document#Spreadsheet001.cells
2021-12-21 21:41:02 -07:00
Chris Hennes
fc193e3614 Spreadsheet: Prevent marking a cell dirty when the content didn't change 2021-11-03 19:16:31 -05:00
Chris Hennes
bdd600ba6e Spreadsheet: Display new value, or pending, when dirty
If recomputes are turned off, the old behavior was that a cell would
display its old property value in the SheetView. The new behavior is
that we check to see if the value is actually something that gets
computed: if so, show "#PENDING". If not, display the new value, but
format it specially to indicate that it's been changed and that
a recompute is (eventually) needed.
2021-11-03 09:23:43 -05:00
Zheng, Lei
64053912b1 Spreadsheet: support displaying of integer 2021-10-12 15:14:31 -05:00
Chris Hennes
48b4a9d7c9 Remove unneeded Qt version checks 2021-03-28 17:41:27 +02:00
Chris Hennes
be0d3e1157 Remove deprecated Qt constants
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:

Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
2021-03-28 17:03:09 +02:00
luz paz
786d84d288 Spreadsheet: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Spreadsheet Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
abf4c92280 Spreadsheet: Fix header uniformity + trailing whitespace
[skip ci]
2020-11-27 19:39:06 +01:00
wmayer
1291e910f1 Spreadsheet: [skip ci] disable unused function 2020-09-09 21:18:31 +02:00
wmayer
698777b213 Spreadsheet: [skip ci] use global scheme to display quantities in a spreadsheet table 2020-09-09 16:28:55 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
e14e5b845e [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
Zheng, Lei
11321bb996 Spreadsheet changes
Various changes to support in-place editing, and more.
2019-08-17 15:15:47 +02:00
wmayer
cf66178f4f fixes 0003876: Spreadsheet WB does not respect number of decimal settings
fixes 0003875: Spreadsheet workbench does not respect locale for decimal separator
2019-03-02 23:07:49 +01:00
wmayer
c9f25d75d3 fix typo 2018-03-11 18:34:18 +01:00
Eivind Kvedalen
638fa8c61d Spreadsheet: Fixed dead code issue reported by Coverity (128977). 2016-12-15 17:27:18 +01:00
wmayer
47c91f01b8 fix -Wextra & -Wdeprecated in Spreadsheet 2016-09-22 16:35:05 +02:00
wmayer
9a38507c76 fix Coverity issues 2016-08-21 23:13:22 +02:00
Eivind Kvedalen
ae111d11b5 Spreadsheet: Removed own expression parser and instead use the one in App. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
f373b57b69 Spreadsheet: Enable tooltip for error messages. 2016-01-08 23:09:00 +01:00
Eivind Kvedalen
899956cd51 Spreadsheet: Issue #2301: Handle enter/return and tab keys the same as e.g OpenOffice and Excel. 2015-11-28 12:56:27 +01:00
Eivind Kvedalen
7f417fe095 Spreadsheet: Added alias as tooltip. Made background of cell light yellow if an alias is defined for it. Can be overridden by setting a background color. 2015-10-11 09:41:14 +02:00
Eivind Kvedalen
6d0df4c58b Spreadsheet: Use Base::fromStdString/toStdString. 2015-09-21 14:51:01 +02:00
Eivind Kvedalen
e34884b1a8 Spreadsheet: Removed 'using namespace App'; preparation for moving Expression
classes to App.
2015-09-21 14:51:00 +02:00
wmayer
0a06b2b703 + fix various warnings 2015-08-29 23:01:19 +02:00
Eivind Kvedalen
b4dc4d97f4 - Self-reference bug
- Refactoring/clean-up of code
- Dependency tracking of aliased cells
- Various resolution errors
- Rewriting of ranges when columns/rows are inserted/removed
- References to aliases keep their units.
2015-03-04 22:18:20 +01:00
Eivind Kvedalen
1f347b53cf + Fixed merge of cells to retain value in upper left cell+ Replaced std::map::at() with iterators and find. Removed some superfluous calls to std::map::find()
+ Visual Studio fixes
+ Fixed return values
+ Removed unused variables
2015-02-13 21:53:59 +01:00
Eivind Kvedalen
935ec5b034 Initial implementation of Spreadsheet module (C++ version) by Eivind Kvedalen.
Various fixes for Windows by
Peter Lama <peterldev94@gmail.com>
Werner Mayer <wmayer@users.sourceforge.net>
2015-02-13 21:53:58 +01:00