sw/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
New commits: commit e9e01ff356bb22332787b72e2d59af542c69eb2f Author: Michael Stahl <michael.st...@collabora.com> AuthorDate: Fri Jul 11 21:12:47 2025 +0200 Commit: Michael Stahl <michael.st...@collabora.com> CommitDate: Mon Jul 14 10:18:20 2025 +0200 sw: add something about styles to README Change-Id: I2f6e23a69fdb950bfa778252b2f10eaa371f0e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187756 Reviewed-by: Michael Stahl <michael.st...@collabora.com> Tested-by: Jenkins diff --git a/sw/README.md b/sw/README.md index 1c6dd8c9a22b..5221bc854403 100644 --- a/sw/README.md +++ b/sw/README.md @@ -197,6 +197,31 @@ There are multiple model classes involved for fields: Note that there is no UNO service to represent a list. +### Styles + +Styles are either user-defined, or built-in. + +User-defined styles simply have a user-defined name. + +Built-in styles are identified by `RES_POOL*` constants in `inc/poolfmt.hxx`. + +Each built-in style has 2 names: + +* programmatic name (ProgName): this is defined in functions + `SwStyleNameMapper::GetTextProgNameArray()` etc, and *never* *ever* changes. + +* translatable name (UIName): this is defined as `STR_POOL*` constants + for en-US in `sw/inc/strings.hrc` and is translated like any other + translatable string. + These strings have been changed and may change in future versions. + +At the UNO API, and in ODF documents, only ProgNames are relevant. + +In the UI, the UINames are used. + +Unfortunately the core code also uses UIName, it would be better if it used +ProgName and the conversion would happen in UI code. + ### Layout The layout is a tree of `SwFrame` subclasses, the following relationships are