diff options
author | Justin Luth <jluth@mail.com> | 2022-05-21 18:09:59 +0200 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2022-06-10 22:27:37 +0200 |
commit | 758945b077220fe151c1565c6d5b0bad02de6d58 (patch) | |
tree | e9c66780063d8525454cb4763f8e21ba1e9384fe /sw | |
parent | 95d91cd41e030a317b51a00086bf042282c8f9e1 (diff) |
tdf#75297 sw uno: override default num char style when NONE
The problem was during ODT import. When no text:style-name
is provided, or if it is an empty string, then the default
"Numbering symbols" character style remained active,
preventing the ability to round-trip a NONE char style.
Since this depends on the built-in name
(and that name can easily enough change)
there is not much point in creating a unit test.
Change-Id: Id942060abd3e024758f93f3d279ef8b561cfc5a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134888
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 5a94663ff121..c68a4fac048f 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1574,10 +1574,11 @@ void SwXNumberingRules::SetPropertiesToNumFormat( OUString sCharFormatName; SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, SwGetPoolIdFromName::ChrFmt ); SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc; - if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE) + if (sCharFormatName.isEmpty() || sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE) { rCharStyleName = aInvalidStyle; aFormat.SetCharFormat(nullptr); + aFormat.SetCharFormatName(""); } else if (pLocalDoc) { |