summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2023-07-10 08:01:45 -0400
committerJustin Luth <jluth@mail.com>2023-07-11 19:43:50 +0200
commitf1ef3012fc7391d3dd4060a8f3108c60243dc45f (patch)
tree1cd8f2a8a94bca2a2fc1b7e71195cac4a87a3ed1 /sw
parentd15c4caabaa21e0efe3a08ffbe145390e802bab9 (diff)
document the unusal application of a style-property to define DF
One would expect the normal process of a style defining a property, and direct formatting overriding the style. However, in the case of a list level, ODF spec says that the definition in the list level has no meaning at all, except at the time when the style is applied to a paragraph. At that time, the program can chose whether or not to set the list level directly on the paragraph to the suggested level. Change-Id: Ia415f7be438b5123127f292c9f02cb9b9cfe66fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154249 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docfmt.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index a882bac7bfd1..5f7b6d9d6c10 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1074,7 +1074,12 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* pArgs )
}
else
{
- // forcing reset of list level from paragraph
+ // The List Level must be applied as direct formatting. The spec says:
+ // 19.495 The style:list-level attribute specifies the list level value
+ // of a list style that may be applied to any paragraph style.
+ // It does not directly specify the paragraph's list level value,
+ // but consumers can change the paragraph's list level value to the specified value
+ // when the paragraph style is applied.
pCNd->SetAttr(pFormat->GetFormatAttr(RES_PARATR_LIST_LEVEL));
}
}