Commit Graph

351 Commits

Author SHA1 Message Date
Yorik van Havre
77925c428e Updated ts files 2021-09-29 14:32:12 +02:00
mwganson
0be3565dbe [Spreadsheet] add preference page and 3 import/export parameters 2021-09-27 22:05:36 -05:00
Yorik van Havre
b042405933 Merged crowdin translations 2021-09-23 17:14:48 +02:00
mwganson
d02e708e75 [Spreadsheet] Prevent infinite loop when copy/paste of non-rectangular selection 2021-09-14 15:15:59 -05:00
Yorik van Havre
e19c086116 Merge pull request #5015 from Roy-043/Spreadsheet-importXLSX
Spreadsheet importXLSX: Added floor and ceil functions.
2021-09-07 12:45:03 +02:00
Yorik van Havre
89e1a97d80 Merged crowdin translations 2021-09-07 11:26:48 +02:00
Roy-043
4339e47582 Spreadsheet importXLSX: Added floor and ceil functions. Fixed aliasRef is None issue.
See https://forum.freecadweb.org/viewtopic.php?f=3&t=61807&p=530473#p530413
2021-09-07 09:26:39 +02:00
Yorik van Havre
49abe81271 Merged crowdin translations 2021-08-26 14:51:36 +02:00
Yorik van Havre
1cee70cd62 Merged crowdin translations 2021-07-08 16:06:38 +02:00
Yorik van Havre
ed9dca288c Merged crowdin translations 2021-07-01 13:56:25 +02:00
Yorik van Havre
c8b5d8d762 Merged crowdin translations 2021-06-24 17:22:19 +02:00
Yorik van Havre
69b084f492 Merged crowdin translations 2021-06-17 16:04:02 +02:00
Yorik van Havre
4a9963a03f Merged crowdin translations 2021-06-10 12:24:24 +02:00
0penBrain
6e7136284f [Spreadsheet] Expose SpreadsheetView::getSheet to Python 2021-06-07 21:18:26 +02:00
Yorik van Havre
d0d637b2c6 merged crowdin translations 2021-06-03 15:43:34 +02:00
Yorik van Havre
b1d9a5607f Merged crowdin translations 2021-05-27 14:51:33 +02:00
Yorik van Havre
7b0a6358b1 Merged crwodin translations 2021-05-12 16:36:31 +02:00
Yorik van Havre
81a44fcccb Updated ts files 2021-05-11 13:05:20 +02:00
wmayer
77b7b0816c Spreadsheet: remove some more deprecated Py2 code 2021-04-26 11:03:48 +02:00
Mateusz Skowroński
92683e1f63 Fix CMake warning: qt5_make_output_file is not part of the official API, and might be removed in Qt 6. 2021-04-19 15:10:53 +02:00
wmayer
21d3749d7a Spreadsheet: [skip ci] fix gcc warnings about unused variables 2021-04-03 12:21:42 +02:00
Benjamin Nauck
51596b5acc Spreadsheet: Fix UI issues when trying to insert rows/cols
* Add support for better translations (using pluralizations)
* Add support for inserting rows/columns after the selection
* Informs the user that it will insert rows/cols above/under/left/right of the selection
* Informs the user how many rows/cols that will be inserted
2021-04-02 19:33:06 +02:00
Chris Hennes
08ba85888e [Spreadsheet] Remove deprecated Qt < 5.9 code 2021-04-01 19:31:22 +02:00
Chris Hennes
b1f8184858 Remove unneeded Qt version checks 2021-03-28 17:41:27 +02:00
Chris Hennes
b15f134038 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
Benjamin Nauck
f6c9cc90ee [Base] Remove includes to StdStlTools.h as that's not needed anymore
std::make_unique was introduced in c++14, so no need to use the back
ported version
2021-03-06 21:20:32 +01:00
Benjamin Nauck
41de6c3d99 [Spreadsheet] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
David Osterberg
43bc30da84 Beautify xml step 1: These changes do not affect the uic output 2021-03-02 16:29:11 +01:00
Yorik van Havre
958009c2ca Merged crowdin translations 2021-02-25 13:27:48 +01:00
Yorik van Havre
5ba28fa7ff Merged crowdin translations 2021-02-24 18:07:59 +01:00
Benjamin Nauck
f5b7f645d8 Spreadsheet: Don't autocomplete when writing strings
After pull request https://github.com/FreeCAD/FreeCAD/pull/4215 it
doesn't make much sense helping the user to write expressions without
leading '=', as that content will be parsed as a string.

This change adjusts the behaviour in SpreadsheetGui's LineEdit to avoid
popping up the ExpressionCompleter when no leading equal sign is used.
2021-02-19 16:22:41 +01:00
Benjamin Nauck
dc444b1f09 Spreadsheet: Fix coverity warning
There are no reason to check the return values for these functions
as the string passed as an argument will be set to an empty string
if it false. An empty string is a valid option in these instances.

Coverity warnings fixed:

CID 316520 (1 of 1): Unchecked return value (CHECKED_RETURN)
3. check_return: Calling getAlias without checking return value (as is done elsewhere 8 out of 10 times).

CID 316557 (1 of 1): Unchecked return value (CHECKED_RETURN)
8. check_return: Calling getAlias without checking return value (as is done elsewhere 8 out of 10 times).
2021-02-19 15:47:27 +01:00
0penBrain
2a3edfd83e [SpreadSheet] Fixes #4563 exported range issue 2021-02-12 18:06:07 +01:00
Chris Hennes
3ef6e1c6d0 [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Yorik van Havre
bcb5c8786f merged crowdin translations 2021-02-09 16:12:18 +01:00
luz paz
3423e72679 LGTM: remove redundant variable assignment
ref: ddeaa48851/files/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py (x687bc63f783c60bd):1
2021-02-07 13:42:55 +01:00
Yorik van Havre
aa52a3f55c Merge pull request #4215 from hyarion/feature-spreadsheet-equal-prefix-for-expressions
[Spreadsheet] Only evaluate cell values when prefixed with '='
2021-02-05 13:29:57 +01:00
Benjamin Nauck
37952a5949 Spreadsheet: Add test for undo alias issue 2021-01-30 14:04:57 +01:00
Benjamin Nauck
f4c2539765 Spreadsheet: Allow alias removed by undo to be reused
Fixes issue descripted in the forum post:
https://forum.freecadweb.org/viewtopic.php?f=3&t=54009
2021-01-30 14:04:57 +01:00
Benjamin Nauck
24c6183661 Spreadsheet: make setContent use unique_ptr and cleanup
Make `Cell::setContent` use `unique_ptr` and
`make_unique` for expressions to avoid potential memory
leaks.
Also renames `expo` to `newExpr` to avoid mixup with the
member variable `expression`.

Both changes was made at the request of @chennes.
2021-01-20 18:55:27 +01:00
Benjamin Nauck
98414334ad [Spreadsheet] Add unit tests for new input behaviour 2021-01-20 18:55:27 +01:00
Benjamin Nauck
dbedb21676 [Spreadsheet] Only evaluate cell values when prefixed with '='
This commit only changes the user interaction with spreadsheet and does
not affect backwards compatibility (as valid cell expressions are
prefixed with '=' when serialized).

This fixes [#4156](https://tracker.freecadweb.org/view.php?id=4156),
which is discussed in the forum thread:
https://forum.freecadweb.org/viewtopic.php?f=3&t=39665

There has been additional logic added to handle numbers and simple
fractions without using '='.
The behaviour is what is expected by the spreadsheet test cases
and in line with how other spreadsheet software works.
The '-prefix can still be used to force the input to be handled as
as string instead.

Example of numbers and fractions handled are:
  3
  2mm
  1/8
  1mm/2
  1/2mm
  2/m
  1mm/2s

More complex expressions are not handled without '=' and will be stored
as strings instead, for example:
  2 / 3 / 2
  1 + 1/3
2021-01-20 18:55:27 +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
Yorik van Havre
5a322d75cb Merged crowdin translations 2020-12-23 15:13:05 +01:00
Yorik van Havre
5a974f824c Updated ts files 2020-12-23 14:51:04 +01:00
luz paz
7b6af35e6c 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
5bd5f3a963 Spreadsheet: Fix header uniformity + trailing whitespace
[skip ci]
2020-11-27 19:39:06 +01:00
Yorik van Havre
e76c857036 Merged crowdin translations 2020-11-10 14:58:06 +01:00
luz paz
44636aca2f Spreadsheet: Make all file headers uniform [skip-ci] 2020-11-03 14:52:53 +01:00
Yorik van Havre
7c9e0f3a99 Merged crowdin translations 2020-10-28 12:04:37 +01:00