diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-10-03 15:48:48 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-10-04 20:43:10 +0200 |
commit | 5760d7876dae55d351e80b990dc064440fa46a73 (patch) | |
tree | a062007ee5e9a67f1f6e937ef9d8e3e40e35da54 /writerfilter/source/dmapper/DomainMapper_Impl.cxx | |
parent | 3d665f4ee60d994257a29d5fc607d6c88593aed7 (diff) |
related tdf#157572 writerfilter framePr: no vAlign if vAnchor=text
See bug 157572 for the documentation.
This can be seen in MS Word's UI.
Have the vertical position be centered, and then change to "para":
-> the vertical position changes to a numbered distance.
make CppunitTest_sw_ooxmlexport5 \
CPPUNIT_TEST_NAME=testTdf157572_noVAlignAsText
make CppunitTest_sw_ooxmlexport5 \
CPPUNIT_TEST_NAME=testTdf157572_insidiousCombination
Change-Id: I6c00a34f14633e16178c1504a37e644a30cf4cd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157529
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 77528bc546c7..36a0f6c178f9 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1874,8 +1874,6 @@ DomainMapper_Impl::MakeFrameProperties(const ParagraphProperties& rProps) break; } } - aFrameProperties.push_back( - comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT), nVertOrient)); // Default the anchor in case FramePr_vAnchor is missing. // ECMA 17.3.1.11 says "page", @@ -1892,10 +1890,15 @@ DomainMapper_Impl::MakeFrameProperties(const ParagraphProperties& rProps) if (pProp->GetvAnchor() < 0) continue; nVAnchor = pProp->GetvAnchor(); + // vAlign is ignored if vAnchor is set to 'text' + if (nVAnchor == text::RelOrientation::FRAME) + nVertOrient = text::VertOrientation::NONE; break; } aFrameProperties.push_back( comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), nVAnchor)); + aFrameProperties.push_back( + comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT), nVertOrient)); text::WrapTextMode nWrap = text::WrapTextMode_NONE; for (const auto pProp : vProps) |