Bug 158685 - Implement a simple calculation of values to input size and position of draw objects
Summary: Implement a simple calculation of values to input size and position of draw o...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Draw-UX Measurement-Units
  Show dependency treegraph
 
Reported: 2023-12-13 13:12 UTC by Francox
Modified: 2024-01-12 10:28 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francox 2023-12-13 13:12:17 UTC
Description:
I propose an enhancement of libreoffice's Draw with the following:

Adding the possibility to put a simple formula in the form where the user choose the size of an object.
For example, to specify the height of an object, we cannot use a formula (3+3,2, for example) in the specific option. We have to put 6,2 instead.

Please, is it possible to implemente it ?




Actual Results:
we have to put 6,2 in the size options of an object

Expected Results:
I would like to to put 3+3,2 in the size options of an object


Reproducible: Always


User Profile Reset: No

Additional Info:
No other information.
Comment 1 Francox 2023-12-13 17:19:36 UTC
En français.....

Bonjour,

Lors de la réalisation de dessin, par exemple, un plan de maison, il paraît plus simple et plus interactif, de rentrer une formule par exemple 3x2,1 au lieu du résultat. Notamment en cas de calcul compliqué. Par exemple, la longueur d'un rectangle est 20mm+53mm+21. Est il possible de rentrer cette formule ou suis-je obligé de rentrer la valeur 94mm.

J'aimerai savoir s'il y a un moyen de rentrer ce calcul pour la largeur du rectangle ou faut-il obligatoirement réaliser le calcul avant?

Quand je dessine, j'ai aussi la problématique alors je me retrouve avec une feuille calc et une feuille draw ouverte pour pouvoir faire ce que je propose. Si le champ largeur accepterait les formules se serait intéressant.
Comment 2 V Stuart Foote 2023-12-13 21:52:54 UTC
Guess this input method would be implemented on the "Position and Size..." dialog and tab.

Kind of a stretch for *needing* to do the simple calculations in the input field of the UI, but we already have spin box and direct unit conversion, so might be of use?
Comment 3 Francox 2023-12-14 08:39:41 UTC
when we are working and in full concentration, it is, in my opinion, important to be able to enter formulas in the position and dimension field (this avoids errors and loss of concentration). I hope you will consider this interesting proposal.
Comment 4 Heiko Tietze 2023-12-14 09:17:46 UTC
Reminds me on bug 72662 asking for a unit selector (similar to what we have for paragraph style with percent). Could be nice if the input field parse formulas first.

The example is nothing that needs computational support, division slike 2/3 make more sense. But I wonder if this is limited to basic arithmetic or some functions/constants are needed too. like "pi()/4 * 1.2345" or "sqr(sin(2)/cos(3))".
Comment 5 Cor Nouws 2024-01-11 08:03:54 UTC
(In reply to Heiko Tietze from comment #4)
> ... But I wonder if this is limited to basic arithmetic or some
> functions/constants are needed too. like "pi()/4 * 1.2345" or
> "sqr(sin(2)/cos(3))".
Setting the scope of the possibilities is a question indeed, if we would want to do this.
With the availability of CALCulators that people can tweak to whatever they need, I doubt if it is wise to start walking this path..
Comment 6 Buovjaga 2024-01-12 06:46:05 UTC
How it works in GIMP: https://librearts.org/2020/07/how-to-use-math-input-in-gimp/
Comment 7 Heiko Tietze 2024-01-12 10:28:44 UTC
We discussed the topic in the design meeting.

In addition to what has been commented here, the slash might be used as a number separator in some locales and one cannot be sure it is a divider (the function could be limited to spinedits). The very basic arithmetic is not enough anyway, and many tools provide the functionality out of the box (eg. KRunner on Linux/KDE but also the search bar on Windows starts a calculator).

(In reply to Buovjaga from comment #6)
> https://librearts.org/2020/07/how-to-use-math-input-in-gimp/
I like mixing units a lot. Adding it to the number in order to convert into what is defined could be a good alternative to the widget proposed in bug 72662.

So while we concluded that such a feature is not worth the effort, I think we can keep the ticket open with a low priority until more users ask for such a feature.