writerfilter/source/dmapper/DomainMapper_Impl.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
New commits: commit 6f1052da8d145b1176186024dc4745cbd561fe36 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Mar 11 17:55:06 2023 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Tue Mar 14 22:46:00 2023 +0000 tdf#154129 writerfilter framePr: check whole style inheritance: hRule This patch depends on HAnchor, which created vProps. A style can inherit its properties from another style, but the code was naively just checking the first paragraph style, and not any of the parents. There were no existing ooxmlexport tests where the old and new method produced different values. Change-Id: I8648ec7abce5943be4850ec0f2dd054cd9ce1a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148716 Reviewed-by: Justin Luth <jl...@mail.com> Tested-by: Jenkins diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index e3baf350b5f9..62dda7d02ac2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1651,10 +1651,14 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) aFrameProperties.push_back( comphelper::makePropertyValue(getPropertyName(PROP_HEIGHT), nHeight)); - sal_Int16 nhRule = sal_Int16( - rAppendContext.pLastParagraphProperties->GethRule() >= 0 ? - rAppendContext.pLastParagraphProperties->GethRule() : - pStyleProperties->props().GethRule()); + sal_Int16 nhRule = -1; + for (const auto pProp : vProps) + { + if (pProp->GethRule() < 0) + continue; + nhRule = pProp->GethRule(); + break; + } if ( nhRule < 0 ) { if ( rAppendContext.pLastParagraphProperties->Geth() >= 0 ||