Commit Graph

799 Commits

Author SHA1 Message Date
Max Wilfinger
53c367f4b5 Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
c7952719f3 Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
2f8b4f0106 Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
ee926ba67f Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
4332a95b49 Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
87c7dd6163 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
7eb21b9951 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
bea7c631e8 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
6c32e8ae07 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
b90cbcca08 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
9c6aa7267f Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
07c35c1a83 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
27c4cf52e0 Update src/Mod/Spreadsheet/Gui/Command.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
71ec5e8050 Update src/Mod/Spreadsheet/Gui/Workbench.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:16 -05:00
Max Wilfinger
c5ddbb8a16 Spreadsheet: Update UI strings for consistency 2025-06-30 10:35:16 -05:00
Kacper Donat
a1f0d7b5fc Spreadsheet Fix '=' regression in spreadsheets (#22146)
* Tools: Add ExpressionLineEdit to QtDesigner plugin

* Spreadsheet: Only use validator when when prefix is not '='

---------

Co-authored-by: wmayer <wmayer@freecad.org>
2025-06-23 22:20:25 +02:00
Benjamin Nauck
0fd4f2bac6 Spreadsheet: Only use validator when when prefix is not '=' 2025-06-23 16:14:35 +02:00
xtemp09
be542053e1 [Spreadsheet] Replace override cursor with QGraphicsItem::setCursor (#22097)
* [Spreadsheet] Replace the risky use of override cursor with
QGraphicsItem::setCursor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-21 12:57:07 +02:00
Ladislav Michl
54fae95685 Revert "Sheet: Disable zooming"
This reverts 0c4fb60 ("Sheet: Disable zooming") as it breaks some
users workflow.
2025-06-11 06:54:59 +02:00
Kacper Donat
ea9ca39db9 Spreadsheet: Fix cursor being stuck resize state when scaled 2025-06-11 06:54:59 +02:00
wmayer
7ac57656e1 Sheet: Further cleanup in Sheet class
With PR 21445 an unused function has been removed. But the underlying
class member isn't used anywhere else and can be removed as well.
2025-06-05 10:15:58 +02:00
wmayer
5763e959f6 Sheet: Improve handling of unsupported formulas
With the example file of issue 20299 the parser stops with an exception
and reads in the formulas only partially. This PR doesn't fix the issue
but avoids to raise an exception so that as much as possible will be
read in. For unsupported formulas a suitable message is printed with
the content of the cell.
2025-06-05 10:15:28 +02:00
wmayer
e2f39f59be Sheet: Fix crash in Cell::setContent
This fixes issue 14697
2025-06-05 10:15:24 +02:00
wmayer
74f09bbf8d Sheet: Fix reading xlsx files
for the specs of the XLSX file format see:
https://jkp-ads.com/articles/excel2007fileformat00.aspx or
https://www.data2type.de/xml-xslt-xslfo/spreadsheetml/xlsx-format

In order to find the correct sheet file one has to first read-in
xl/_rels/workbook.xml.rels and save the relations of Id and Target.
The file xl/workbook.xml contains a list of sheet elements where for
each element the attribute 'r:id' is set. This attribute can be used
to look up for the actual data file.

This fixes issue 19757
2025-06-05 10:14:42 +02:00
wmayer
4d123e8ae9 Sheet: Disable zooming
With PR 16130 the zooming capability was added to spreadsheet view.

The SheetTableView is added to a QGraphicsScene of a QGraphicsView
that provides the method scale(). However, this causes some problems
with header of the table view and makes resizing columns or rows
very unintuitive.

A correctly working table view is probably more important than the
possibility to zoom in or out and that's why the latter will be
disabled.

This fixes issue 19863
2025-06-05 10:14:03 +02:00
Gonzalo
1f11be1059 Avoid error importing spreadsheet with deleted sheet (#19757)
This fix was proposed by pageeddie on https://github.com/FreeCAD/FreeCAD/issues/19757
2025-06-04 21:54:31 -05:00
Ladislav Michl
a0917bcc7c Base: Units: introduce unit one
Dimensionless quantities have all exponents equal to zero.
Such quantities are simply numbers. The associated unit is
the unit one, symbol 1, although this is rarely explicitly
written.

See chapter 2.3.3 Dimensions of quantities, The International
System of Units, 9th edition.
2025-06-03 09:31:38 +02:00
pre-commit-ci[bot]
8f5c56ea28 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-02 09:53:47 +00:00
Yorik van Havre
640642eed2 Translations: Merged crowdin translations 2025-06-02 11:48:26 +02:00
Yorik van Havre
26e16765b0 Translations: updated ts files 2025-06-02 11:07:28 +02:00
Pieter Hijma
8c01d577e7 Core: Update expressions on property rename
This includes both expressions in generic containers and in
spreadsheets.
2025-05-26 18:11:27 +02:00
mosfet80
68aaa50100 Sketcher: Remove unused variables (#21504)
removed unused variables
2025-05-25 00:19:46 +02:00
Andrea
6d81096b5a SpreadSheet: remove function
Observer is no longer required as PropertySheet is now derived from  PropertyLinkBase and will handle all the link related behavior
2025-05-19 18:27:01 +02:00
Chris Hennes
952485dcbb Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Benjamin Bræstrup Sayoc
2b6e73c29d Everywhere: clean up getAttribute conversions 2025-05-09 15:54:57 +02:00
Benjamin Bræstrup Sayoc
2b1aec0041 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Benjamin Nauck
f6b62fcc99 Spreadsheet: use isEmpty() instead of count() where possible 2025-05-03 22:22:10 +02:00
tetektoza
8fda3b4bd1 Core: Introduce PDF Import-Export dialog (#20860)
* Core: Introduce PDF Import-Export dialog

Currently, we only have hardcoded exporting to one pdf version, which
leads to (as in one of the below issues) to problems, such as
non-transparent layers, which are by default not supported in PDF/A-1b.

So, this patch adds an option to the user to select their preferred PDF
version by introducing new dialog under Import-Export in Preferences,
and allowing to update that version before exporting.

* Core: Add informational messages regarding selected PDF format

* Gui: Handle Qt < 6.8 unsupported PDF format

* Gui: Switch PDF export prefs dialog to use tr()

* Gui: Remove center alignment of PDF version description

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-04-27 19:31:34 -05:00
Kacper Donat
5658331bb0 Spreadsheet: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Kacper Donat
a5071587de Spreadsheet: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
xtemp09
2af7e8a37e [Spreadsheet] Add usage of override cursor in SheetViewHeader (#20786)
* [Spreadsheet] Add usage of override cursor in SheetViewHeader

Closes #19863

* Update src/Mod/Spreadsheet/Gui/SheetTableView.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-16 20:42:24 +02:00
Chris Hennes
e2c2017df5 Merge pull request #20649 from pieterhijma/viewprovider-toggle-visibility
[Core] Allow setting visibility toggling in the ViewProvider
2025-04-14 10:45:14 -05:00
Kacper Donat
77e40b9747 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
9d97d1c895 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
luzpaz
e526547885 Fix various typos (#20651)
* Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,anull,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,groupe,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,localy,lod,mantatory,matc,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,re-use,re-used,re-using,rin,ro,rougly,sectionin,seperator,sergent,serie,shs,sinc,siz,som,stpo,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uupper,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-05 22:58:20 -05:00
Pieter Hijma
524d3c41c0 [Core] Disable toggling visibility for objects
- VarSet
- Spreadsheet
- FEM objects
2025-04-05 16:12:49 +02:00
Pieter Hijma
6fcd72d286 [Core] Remove DisplayMode from Spreadsheet 2025-04-05 15:57:49 +02:00
Benjamin Nauck
cb2c8a5a2d Spreadsheet: Add #include <limits> where used 2025-03-31 23:52:48 +02:00