Bug 167580 - Writer table formulas: hide "phd"
Summary: Writer table formulas: hide "phd"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDesign, topicUI
Depends on:
Blocks:
 
Reported: 2025-07-18 15:50 UTC by Mike Kaganski
Modified: 2025-08-14 11:57 UTC (History)
3 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 Mike Kaganski 2025-07-18 15:50:34 UTC
PHD is curiously documented [1] "Calculates a percentage". Which is actually (from any normal user point of view) is wrong. Which is clear immediately from the example given there: "10 + 15 PHD displays 10.15". Yes, it displays 10.15, and not 11.5, which would happen, if PHD meant "add 15 percent of 10 to 10".

The actual operation performed by PHD is simply "take the value before, and multiply by 0.01" [2]. It is a useless thing, replacement for "/100", and its presence is misleading. Of course, it can't be removed from code, without breaking existing documents; but it can be removed from the UI (and help).

[1] https://help.libreoffice.org/25.2/en-US/text/swriter/02/14020000.html?&DbPAR=WRITER
[2] https://opengrok.libreoffice.org/xref/core/sw/source/core/bastyp/calc.cxx?r=e2af30210fcbfe9e20f893360cf10edfdf22b7e1#1075
Comment 1 Mike Kaganski 2025-07-18 15:52:58 UTC
Examples of real-life confusion:

https://ask.libreoffice.org/t/formulas-and-syntax-in-writer-tables/124522 (where the author seriously claims that PHD does "n × (1 + x/100)" in their tutorial-like document, uploaded for wide reference)

https://ask.libreoffice.org/t/calculate-percentage-in-writer-table/65480 (discussing how to use PHD, exactly because it's counter-intuitive).
Comment 2 Heiko Tietze 2025-07-31 10:23:31 UTC
(In reply to Mike Kaganski from comment #0)
> ...but it can be removed from the UI (and help).
+1
Comment 3 V Stuart Foote 2025-08-05 16:40:17 UTC
+1 to remove from "UI (and Help)" but retain for backward compatibility.
Comment 4 Heiko Tietze 2025-08-14 11:57:01 UTC
We discussed the topic in the design meeting. 

The statement "Expression faulty" is unclear and we should add some explanation (though this might be off-topic here).

It's not clear why this was added in first place; current MSO has no percentage. But since it is a weird function and can be easily replaced with % (perhaps it was introduced as an alternative?), removing the access in the UI should do no harm.

Should be enough to remove the entry from sw/uiconfig/swriter/ui/inputwinmenu.ui