diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2020-05-28 13:47:30 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-10 10:27:53 +0200 |
commit | 6c14c87cad6a3c38d7e597932ec591f4bc610be8 (patch) | |
tree | 4dbbc31a8d0d7a1196a51496768e1df3b01511b0 /writerfilter | |
parent | 06e2cbb31d0ea703df872b91eb8eacdcaced7653 (diff) |
tdf#133457 DOCX import: fix frame position regression
caused by commit f5636817e7677a3081263df9004940a7d5ac54af
(tdf#112287 DOCX frame import: fix default vAnchor).
Co-authored-by: Attila Bakos (NISZ)
Change-Id: I6fe16ff274d6a2fa4a335c7790ecd0f01641a6fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95035
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index e06c98145b23..557b09fa5917 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1167,10 +1167,21 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) pStyleProperties->IsyValid() ? pStyleProperties->Gety() : DEFAULT_VALUE)); //Default the anchor in case FramePr_vAnchor is missing ECMA 17.3.1.11 - aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16( - rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ? + if (rAppendContext.pLastParagraphProperties->GetWrap() == text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE && + pStyleProperties->GetWrap() == text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE) + { + aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16( + rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ? + rAppendContext.pLastParagraphProperties->GetvAnchor() : + pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::FRAME))); + } + else + { + aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16( + rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ? rAppendContext.pLastParagraphProperties->GetvAnchor() : - pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::PAGE_PRINT_AREA ))); + pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::PAGE_PRINT_AREA))); + } aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SURROUND), rAppendContext.pLastParagraphProperties->GetWrap() != text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE |