sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 4 ++-- writerfilter/source/dmapper/GraphicImport.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit bd9178ad31051de316092ec062b9f378c8a19852 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Wed Jan 17 14:43:09 2024 -0500 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jan 22 11:37:14 2024 +0100 tdf#159158 writerfilter: relativeHeight max allowed value relativeHeight treats its content as unSigned values, but it needs to share the zOrder with z-index which is a signed value (negatives indicating the belowDoc position). Thus, it is logical that relativeHeight would have a maximum value, and based on trial and error it was determined to be 1DFF FFFF for DOCX. Change-Id: If3fc16061730fb034c187ce4f639e1b2e50e044f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162233 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index 40c4a42d4e8c..d83498b4427c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -945,8 +945,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf159158_zOrder_max, "tdf159158_zOrder_max.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, "ZOrder")); // lower CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, "ZOrder")); // higher // while yellow is a higher value, last duplicate wins, so lower value blue must be the maximum - // CPPUNIT_ASSERT_EQUAL(OUString("5-Point Star Yellow"), getProperty<OUString>(zOrder0, "Name")); - // CPPUNIT_ASSERT_EQUAL(OUString("5-Point Star Blue"), getProperty<OUString>(zOrder1,"Name")); + CPPUNIT_ASSERT_EQUAL(OUString("5-Point Star Yellow"), getProperty<OUString>(zOrder0, "Name")); + CPPUNIT_ASSERT_EQUAL(OUString("5-Point Star Blue"), getProperty<OUString>(zOrder1,"Name")); } DECLARE_OOXMLEXPORT_TEST(testTdf159158_zOrder_zIndexMax, "tdf159158_zOrder_zIndexMax.docx") diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index cacae807b48d..93ef346dcc99 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -741,7 +741,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) { // undocumented - based on testing: both 0 and 1 are equivalent to the maximum 503316479 const sal_Int32 nMaxAllowed = 0x1DFFFFFF; - if (nIntValue < 2/* || nIntValue > nMaxAllowed*/) + if (nIntValue < 2 || nIntValue > nMaxAllowed) m_pImpl->m_zOrder = nMaxAllowed; else m_pImpl->m_zOrder = nIntValue;