xmloff/source/text/txtimp.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 878f51b4ec313a45335585f6f88d3a2cd5631df1 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Apr 18 13:00:04 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Apr 29 21:06:24 2024 +0200 tdf#159903 xmloff: ODF import: fix bug in margin compatibility override The check for the property being set was wrong: the state in a parent style may be DIRECT_VALUE but a derived style may have a list style set, which effectively overrides the ParaLeftMargin and ParaFirstLineIndent. Fix this so that the compatibility override only happens when required. (regression from commit 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d) Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 1b2a6b98291cf8b7022951be19b915fe2a9e18e6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166218 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> (cherry picked from commit 0b816bade2395d532862e8f2bba6fd7ea0ce540f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166718 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Patrick Luby <guibomac...@gmail.com> diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 1e17f9921df0..f63b13cebe86 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1016,6 +1016,10 @@ auto IsPropertySet(uno::Reference<container::XNameContainer> const& rxParaStyles { return true; } + if (xPropState->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) + { + return false; // tdf#159903 this overrides value in the parent style + } // check if it is set by any parent common style OUString style; rxPropSet->getPropertyValue("ParaStyleName") >>= style; @@ -1028,6 +1032,10 @@ auto IsPropertySet(uno::Reference<container::XNameContainer> const& rxParaStyles { return true; } + if (xStyleProps->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) + { + return false; // tdf#159903 this overrides value in the parent style + } style = xStyle->getParentStyle(); } return false;