wmayer
88893f7524
Core: fix possible memory leaks when using parser
2024-04-26 21:42:34 +02:00
Andrei Pozolotin
9e1edf36f0
Resolve #11965 - no proper execute() for cross-property references
...
Solution B: parsequant() function
2024-02-19 11:12:52 -06:00
Chris Hennes
950507a498
Revert "Resolve #11825 - no automatic quantity conversion: App::anyToQuantity"
...
This reverts commit c1ef15fbdf5db5aaf2ec86cb44bff237d1966238.
2024-02-12 15:29:15 -06:00
Andrei Pozolotin
71a61cf423
Resolve #11825 - no automatic quantity conversion: App::anyToQuantity
2024-01-11 11:32:18 -06:00
wmayer
1cf1a90a17
App: modernize C++: use default member init
2023-08-23 19:51:44 +02:00
wmayer
af8c05c507
App: modernize C++: return braced init list
2023-08-18 00:36:24 +02:00
Chris Hennes
15c7aabe27
App: clang-tidy cleanup of Expression::_renameObjectIdentifier
2023-08-17 15:59:45 +02:00
Djuro Drljaca
8c25886da2
Keep the label of a variable in expression on spreadsheet alias rename ( #10222 )
...
Fixes #5800
2023-08-16 21:35:58 -05:00
Daniel-Khodabakhsh
a9ac5b8398
Expressions: Add Vector API expression functions ( #10237 )
2023-08-15 23:00:16 -05:00
wmayer
4991475341
App: modernize C++: use range-based for loop
2023-08-14 16:40:25 +02:00
wmayer
ec73caa40e
modernize C++: make unique
2023-08-07 19:51:30 -06:00
wmayer
7a3106d31b
modernize C++: use bool literals
2023-08-06 01:35:39 +02:00
luzpaz
38a01939e0
Migrate domain name from freecadweb to freecad ( #9352 )
...
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files
Closes #6415
2023-04-24 15:19:20 -05:00
0penBrain
8dcbd7080e
Expression: use a precision that ensures no floating point issue
2023-04-05 19:51:51 +02:00
Daniel-Khodabakhsh
071200ac8a
Add various matrix related expression functions ( #8603 )
...
Adds a few new Expression functions with the goal to:
- Simplify Placement, Rotation, Vector and Matrix object creation.
- Add new matrix functions for rotation and translation.
2023-03-11 20:13:23 -06:00
M G Berberich
9c1d80d9e6
add cbrt (cube root) to expressions ( #8629 )
...
This adds a function cbrt(arg) to the freecad-expressions that computes
the cube root of arg. Instead of arg^(1/3) this handles the units of the
argument, so that one can compute units from p.e. ml to mm.
cbrt(27 ml) → 30 mm
instead of
(27 ml)^(1/3) → 30
2023-02-26 17:49:58 +01:00
0penBrain
6f278d7673
[BugFix] Expression: always add space char before unit when converting to string, fixes #8562
2023-02-24 19:44:44 +01:00
wmayer
aeb5ea0ddf
App: [skip ci] reduce code duplication
2022-12-23 18:39:59 +01:00
wmayer
b9d88f9985
App: remove dead code and simplify code
2022-12-23 17:02:04 +01:00
wmayer
6653991a97
Gui/Mod: handle several compiler warnings:
...
* ignore -Wfree-nonheap-object for generated code
* replace 0 with Qt::NoModifier when creating a QKeyEvent
* in Qt 5.14 QCombobox::activated(QString) is deprecated, use textActivated
* don't mix QCheckBox::setChecked() with tristate API
2022-11-29 10:36:02 +01:00
marioalexis
209c78d43e
App: Replace C cast
2022-09-18 11:06:51 -05:00
wmayer
656890be38
App: modernize C++: replace 'typedef' with 'using'
2022-08-29 12:58:39 +02:00
berniev
d2babf0eb5
App: Single arg ctors must be explicit
2022-08-24 07:20:57 +02:00
berniev
d9ac252982
App: redundant void 2
2022-08-08 09:45:36 +02:00
berniev
22dcf5866f
App: use empty
2022-08-06 19:29:59 +02:00
berniev
ac81a8380f
App: use emplace_back
2022-08-05 10:31:51 +02:00
wmayer
a7172cd730
App: improve whitespaces
2022-08-01 01:29:47 +02:00
berniev
b6cae3bfdf
App: Modernise ctors dtors defs etc
2022-08-01 00:34:46 +02:00
Uwe
e69a920f18
[App] remove superfluous nullptr checks
2022-07-18 03:12:01 +02:00
0penBrain
d96a7ac9d8
[Bugfix] Expression: fix precedence+associativity management in parenthesis removal
...
Fixes #6948
2022-06-11 15:59:06 +02:00
wmayer
f7b2421df2
App: fix regression in Expression::getDepObjects
...
Avoid to add labels muliple times as reported here: https://forum.freecadweb.org/viewtopic.php?p=593994#p593994
2022-05-09 10:53:21 +02:00
wmayer
caecc921f0
App: fixes #6844 : Crash in PropertyXLinkContainer::updateDeps
2022-05-08 18:22:29 +02:00
Chris Hennes
f7edc74eee
App: PR6497 move return statement to new line
2022-03-29 12:33:37 -05:00
wmayer
1a20b7f119
App: modernize C++11
...
* use nullptr
2022-03-23 17:29:23 +01:00
Uwe
a8c912d6f8
[App] Expression and Extension: remove unused includes
2022-02-25 18:06:57 +01:00
Zheng, Lei
7e4f71606c
App: warning on invalid cell offset in Expression
2021-12-21 21:41:02 -07: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
Zheng, Lei
10f1ac8436
App: add expression build-in href() for backward compatibility
...
As deprecated alias for hiddenref()
2021-12-21 21:41:02 -07:00
Zheng, Lei
fdae470c1b
App: add hiddenref() expression built-in function
...
Any object reference inside this function is treated as hidden to
exclude it from dependency calculation. This function allows some form
of cyclic depdenency.
Merger note: renamed from "HREF" to "HIDDENREF" to avoid confusion with
the standard "hypertext reference" use of HREF.
2021-11-14 20:45:09 -06:00
Zheng, Lei
864f6d96a6
App: add expression built-in function str()
...
...for stringify
2021-10-12 13:42:10 -05:00
Chris Hennes
373246858e
[App] Fix LGTM warning decl hides param
2021-09-19 12:31:24 -05:00
wmayer
e92325c9c9
App: remove some more deprecated Py2 code
...
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:55:56 +02:00
luz paz
a1fc733ddf
App: remove Py2 code from several src/App .cpp files
2021-04-19 15:27:06 +02:00
Benjamin Nauck
358cb01a9c
[App] Switch from boost::tuple to std::tuple
...
It's better to use the standard lib when possible
2021-03-06 19:31:06 +01:00
wmayer
45e0673645
LGTM: [skip ci] fix: Declaration hides parameter
...
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
e6b6fa627e
Coverity: Not restoring ostream format
2020-07-20 17:34:29 +02:00
wmayer
f9ef60d063
Coverity: Empty virtual destructor
2020-07-20 17:34:27 +02:00
wmayer
7eeb35b869
Coverity: Big parameter passed by value
2020-07-20 17:34:25 +02:00
wmayer
70c3cc7c03
PVS: V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.
2020-07-18 10:59:28 +02:00
wmayer
2ebd1c3518
PVS: V501 There are identical sub-expressions to the left and to the right
2020-07-18 10:59:27 +02:00