diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-10-03 15:43:00 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-10-04 18:41:32 +0200 |
commit | 44401e14ff0aab5bc9505c2ec3b78ce91eaf8f4f (patch) | |
tree | 7782287a79116c0013e5ba1061172566040d4cef /writerfilter | |
parent | 1058d5edc0b6bbaddea2af520d8b5c3e54ec7498 (diff) |
related tdf#157572 writerfilter framePr: no vAlign if w:y defined
Documentation suggests that vAlign overrides w:y
(as long as vAnchor is not equal to text).
However, testing proves the opposite.
Only when w:y is not defined does vAlign take effect.
make CppunitTest_sw_ooxmlexport5 \
CPPUNIT_TEST_NAME=testTdf157572_defaultVAnchor
make CppunitTest_sw_ooxmlexport18 \
CPPUNIT_TEST_NAME=testTdf154703_framePr2
Change-Id: I8a5366d9b6bde0ad838f9584836a85fe79ce8b1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157528
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9c1b32a54927..77528bc546c7 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1863,12 +1863,16 @@ DomainMapper_Impl::MakeFrameProperties(const ParagraphProperties& rProps) comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_POSITION), nY)); sal_Int16 nVertOrient = text::VertOrientation::NONE; - for (const auto pProp : vProps) + // Testing indicates that yAlign should be ignored if there is any specified w:y + if (!bValidY) { - if (pProp->GetyAlign() < 0) - continue; - nVertOrient = pProp->GetyAlign(); - break; + for (const auto pProp : vProps) + { + if (pProp->GetyAlign() < 0) + continue; + nVertOrient = pProp->GetyAlign(); + break; + } } aFrameProperties.push_back( comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT), nVertOrient)); |