writerfilter/source/dmapper/DomainMapper_Impl.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
New commits: commit 44837a12d12be3e525fa48b37c3dd2553cc97d94 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Mar 11 18:26:22 2023 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Wed Mar 15 01:51:31 2023 +0000 tdf#154129 writerfilter framePr: check whole style inheritance: wrap 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 sw.check tests where the old and new method produced different values. Change-Id: Ifdd4b5f9eefdc1f53e472c1bb5d19b526e00ee38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148717 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 f33d3c390afb..5d9906ee97b1 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1772,13 +1772,16 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) aFrameProperties.push_back(comphelper::makePropertyValue( getPropertyName(PROP_VERT_ORIENT_RELATION), nVAnchor)); - aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SURROUND), - rAppendContext.pLastParagraphProperties->GetWrap() != text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE - ? rAppendContext.pLastParagraphProperties->GetWrap() - : pStyleProperties->props().GetWrap() - != text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE - ? pStyleProperties->props().GetWrap() - : text::WrapTextMode_NONE )); + text::WrapTextMode nWrap = text::WrapTextMode_NONE; + for (const auto pProp : vProps) + { + if (pProp->GetWrap() == text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE) + continue; + nWrap = pProp->GetWrap(); + break; + } + aFrameProperties.push_back( + comphelper::makePropertyValue(getPropertyName(PROP_SURROUND), nWrap)); /** FDO#73546 : distL & distR should be unsigned integers <Ecma 20.4.3.6> Swapped the array elements 11,12 & 13,14 since 11 & 12 are