summaryrefslogtreecommitdiff
path: root/editeng/source/items
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2022-08-01 09:29:10 -0400
committerJustin Luth <jluth@mail.com>2022-08-01 23:41:54 +0200
commit654454a32bd6dc40d131861fab5dbe0a9111a7c3 (patch)
tree430ba36d592e928f42115d122ed127e6e250a77e /editeng/source/items
parentf306d601a1eab561815a0a1e6dc2cd3d857d4f05 (diff)
related tdf#150197 editeng: clear oListFormat on SetListFormat()
Although a pre=existing prefix/suffix was cleared, a non-existing oListFormat should replace an earlier one if it is being reset. The hasValue only applies to setting backward compatiblity stuff. No real-world impact noticed - just cleaning up after a code read. I ALMOST needed this in my prior patch, but then I changed to use the other SetListFormat function call. Change-Id: I39eed26b7720f0f9a0d982a1cd1703a55c5ab986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137675 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'editeng/source/items')
-rw-r--r--editeng/source/items/numitem.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index cbbd7efb9dc4..1239ea529126 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -589,13 +589,13 @@ void SvxNumberFormat::SetListFormat(std::optional<OUString> oSet)
sPrefix.clear();
sSuffix.clear();
+ sListFormat = oSet;
+
if (!oSet.has_value())
{
return;
}
- sListFormat = oSet;
-
// For backward compatibility and UI we should create something looking like
// a prefix, suffix and included levels also. This is not possible in general case
// since level format string is much more flexible. But for most cases is okay