Commit Graph

58 Commits

Author SHA1 Message Date
wmayer
2c229d3bc0 Spreadsheet: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
26f9e7869f App: replace three boolean of CellAddress::toString() with a bitmask of enums 2022-01-09 10:39:54 +01:00
Zheng, Lei
0029f3206d Spreadsheet: improve copy/cut/paste cells
Add color bound around user copy/cut ranges. Do not touch Spreadsheet
object when cutting, only do so when pasting.
2021-12-21 21:41:02 -07:00
Zheng, Lei
caa29060cf Spreadsheet: fix handling of absolute cell address 2021-12-21 21:41:02 -07:00
Zheng, Lei
2a3951ca32 Spreadsheet: change alias handling
No longer add dynamic property for alias, simply rely on
get(Dynamic)PropertyByName() to check for aliases.

Add new API PropertyContainer::getPropertyNamedList() so that
ExpressionCompleter can discover properties with aliases.
2021-12-21 21:41:02 -07:00
Zheng, Lei
68fca40983 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
Zheng, Lei
127e8098e8 Spreadsheet: add a few context menu options 2021-10-12 14:34:58 -05:00
Chris Hennes
403a569315 [Spreadsheet] Refactor keyboard handling
LineEdit no longer actually handles motion, it simply indicates which
action was taken to cause it to lose focus (e.g. which key was pressed).
It's up to the client code to determine what this means. This allows
significant consolidation of keyboard-handling logic, and the
implementation of more extensive keyboard navigation features.

New keyboard shortcuts include a tab counter to implement auto-return,
plus Ctrl->Arrow, End, Home, Ctrl-End, and Ctrl-Home, matching the
behavior of OpenOffice, LibreOffice, etc.

Block selection via keyboard has also been added by holding down the
shift key during navigation with the arrow keys (this also works in
combination with the Ctrl modifier for region navigation).
2021-10-08 14:55:39 -05:00
mwganson
0be3565dbe [Spreadsheet] add preference page and 3 import/export parameters 2021-09-27 22:05:36 -05:00
0penBrain
2a3edfd83e [SpreadSheet] Fixes #4563 exported range issue 2021-02-12 18:06:07 +01:00
Benjamin Nauck
d525b29fa5 [Spreadsheet] Remove alias from dynamic properties on removeRows/Columns
When removing a row in a spreadsheet which has an assigned alias, the
alias will not be removed from the list of dynamic properties.

This makes it impossible to create a new alias which uses the same name
even if the original was removed (using removeRows/removeColumns)

Fixes #4492
2021-01-04 22:10:58 +01:00
luz paz
44636aca2f Spreadsheet: Make all file headers uniform [skip-ci] 2020-11-03 14:52:53 +01:00
wmayer
4ec45b545e 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
Zheng, Lei
41387fd991 App: fix dynamic property undo/redo
Instead of enforce property type match when undo/redo, modify various
property Paste() to make it type safe.
2019-10-07 17:24:31 +02:00
Zheng, Lei
976952db63 Spreadsheet: improve cyclic dependency exception handling 2019-10-07 17:24:30 +02:00
Zheng, Lei
a1417c5ffa App: extend Expression syntax
* Support sub-object reference syntax using the following syntax,
    Part.<<Box.>>.Placement
  or, with sub-object label referencing
    Part.<<$Cube.>>.Placement

* Extend indexing support, including range based indexing, e.g.
    A1[B2+1][C3][D4:-1]

* Add new constants, None, True, true, False, false.
2019-09-28 15:31:24 +02:00
Zheng, Lei
ea7eee8061 Expression: split Expression.h to ExpressionParser.h
Split Expression details into a separate header to reduce recompilation
time on changes.
2019-09-28 15:30:41 +02:00
Zheng, Lei
d141975701 App: use Python number protocol in Expression
This adds support to do mul/div with matrix and vector, as well as
Python formated string with operator %.
2019-09-28 15:30:34 +02:00
wmayer
a247b7e6a5 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
Zheng, Lei
e911b69769 Spreadsheet changes
Various changes to support in-place editing, and more.
2019-08-17 15:15:47 +02:00
Zheng, Lei
34ed8a8e00 Spreadsheet: convert PropertySheet to link type property
PropertySheet is changed to derive from PropertyExpressionContainer,
which makes it a link type property that is capable of external linking.
It now relies on the unified link property API to manage object
depenency, and tracking of object life time, relabeling, etc.

This patch also includes various fix and improvement of Spreadsheet,
such as improved recompute efficiency, correct handling of document
label change, etc.
2019-08-17 14:52:09 +02:00
DeepSOIC
28cbe2bd89 Spreadsheet: fix #3474 cross-CS drag-drop issue 2019-01-20 00:45:49 +01:00
wmayer
fc16bcbfca Replace Base::Exception with appropriate subclass 2018-11-14 18:02:49 +01:00
wmayer
7b86681678 fixes 0003638: Importing CSV-files produces an empty spreadsheet without the data 2018-10-18 23:32:32 +02:00
wmayer
a2d44d2642 fixes 0003521: Import of csv file into Spreadsheet does not work if the path contains non ASCII characters 2018-09-24 22:16:48 +02:00
Markus Lampert
0b40519f3f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
luz.paz
a35dd3feea Typos
The stepcode typos aren't to be found upstream. Recomend we merge nonetheless.
2018-01-08 21:07:00 +01:00
luzpaz
ab8f8919b6 Misc. typos
+ some are doxy others are just comment code.  
+ some minor whitespace and grammatical tweaks. 
+ app/SCL/* typos have also been submitted upstream (https://github.com/stepcode/stepcode/pull/366). So it's ok to merge them in to master.
2017-10-04 17:59:11 +02:00
wmayer
a5bc70cca0 remove properties from transactions when being deleted 2017-08-28 21:20:17 +02:00
hgutsche
de8f66f857 Some fixes for doygen syntax errors and some configuration to make it run smoother under Windows 2017-02-28 18:52:04 +01:00
Kunda
dde52952f4 source typo fixes pt1 (only on py3 merged code)
issue 0002914
2017-02-27 11:32:47 +01:00
wmayer
6cf82fbe62 fix -Wextra & -Wdeprecated in Spreadsheet 2016-09-22 16:35:05 +02:00
Yorik van Havre
4de1b39b4f Spreadsheet: Made SheetPython inherit python object from Sheet 2016-08-01 13:17:47 -03:00
Yorik van Havre
8f45e13789 Spreadsheet: Added Python version of Spreadhseet::Sheet 2016-06-14 19:16:00 -03:00
Eivind Kvedalen
a21571a652 Spreadsheet: Removed own expression parser and instead use the one in App. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
1802d94a1a Spreadsheet: Override DocumentObject::renameObjectIdentifiers() to get better renaming support. 2016-02-18 16:54:42 +01:00
Eivind Kvedalen
8c943d0ad7 Spreadsheet: Refactored code to use AtomicPropertyChangeInterface. 2016-02-18 16:54:40 +01:00
Eivind Kvedalen
53dcaccd4e Spreadsheet: Refactored alias checking code, so GUI and Python error messages are aligned. 2016-02-18 16:54:39 +01:00
Eivind Kvedalen
301fcc2ab7 Spreadsheet: Issue #2402: Don't allow duplicate aliases. 2016-01-26 10:52:34 +01:00
Eivind Kvedalen
d45a95bf3a Spreadsheet: Issue #2402: Added functionality to get cell address given an alias. 2016-01-26 10:52:00 +01:00
Eivind Kvedalen
87c6af3547 Spreadsheet: Removed setPosition() function. 2015-11-28 12:56:28 +01:00
wmayer
c159a8ddc2 + fix inconsistencies in using DynamicProperty class 2015-11-17 12:22:07 +01:00
wmayer
1225a7ac06 + support of adding/removing dynamic properties in property editor 2015-11-16 22:47:29 +01:00
Eivind Kvedalen
29695a8ae7 Spreadsheet: Removed unused function. 2015-10-11 09:41:15 +02:00
Eivind Kvedalen
4d5646fa5d Spreadsheet: Replaced own Expression classed by the ones in App. 2015-09-21 14:51:11 +02:00
Eivind Kvedalen
3474419925 Spreadsheet: Updated documentation. 2015-09-21 14:51:02 +02:00
Eivind Kvedalen
4f589f6d60 Spreadsheet: Use Base::fromStdString/toStdString. 2015-09-21 14:51:01 +02:00
Eivind Kvedalen
61cbad8a12 Spreadsheet: Removed 'using namespace App'; preparation for moving Expression
classes to App.
2015-09-21 14:51:00 +02:00
Eivind Kvedalen
f7625481a2 Spreadsheet: Made freecad_dynamic_cast calls unambiguous (preparation for next commit). 2015-09-21 14:50:58 +02:00
Eivind Kvedalen
2206e1cd7f Added -Wno-sign-compare -Wno-reorder -Wno-switch -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment to mask warnings when compiling salomesmesh. 2015-09-21 14:50:58 +02:00