diff options
author | Justin Luth <jluth@mail.com> | 2024-09-11 19:22:10 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2024-09-13 03:45:38 +0200 |
commit | 0125a92e0168646f1f0b5dfdaabb841eb6358a78 (patch) | |
tree | dc174248b8926a222fbf62972e3cb9ece0a4d584 | |
parent | 47a348bb0fd6dfdd93c1975d216daadc4f6b9b6f (diff) |
tdf#162926 Revert "tdf#100037 vml import: set fly-anchored AS_CHARs...
...above fly's zOrder"
This reverts my 24.8 commit f714fb262ad8561afcababf4b7a97dedb1b72c15.
Some activeX binary (I assume) seemed to be composed of two parts
and yet didn't have a TextBox property, but when sent to the background
the textbox part of it disappeared.
I assume it was some kind of two-part monstrosity,
but nothing in the ServiceInfo indicated anything excludable.
Change-Id: I6e088a74e62db8b2bb732ba66e2cb3319b9c401e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173239
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder2.docx | bin | 150049 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder3.docx | bin | 150034 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 44 | ||||
-rw-r--r-- | sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 24 |
4 files changed, 1 insertions, 67 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder2.docx b/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder2.docx Binary files differdeleted file mode 100644 index e30824ba10c8..000000000000 --- a/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder2.docx +++ /dev/null diff --git a/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder3.docx b/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder3.docx Binary files differdeleted file mode 100644 index d97bd7ecb291..000000000000 --- a/sw/qa/extras/ooxmlexport/data/tdf100037_inlineZOrder3.docx +++ /dev/null diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index d8854f8f1a78..b7c170b76cf2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -1078,50 +1078,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder, "tdf100037_inlineZOrder.doc CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder1, u"LinkDisplayName"_ustr)); } -DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder2, "tdf100037_inlineZOrder2.docx") -{ - // given a yellow floating textbox-with-image overlapped by a blue textbox-with-image, - // the inline image should take its zOrder from the textbox it is in. - if (isExported()) - return; // we don't export images inside of draw textboxes I guess - - uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher - // yellow textbox (Frame1) is the lowest - CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); - //CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder1, "Name")); - CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr)); - // CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder3, "LinkDisplayName")); -} - -DECLARE_OOXMLEXPORT_TEST(testTdf100037_inlineZOrder3, "tdf100037_inlineZOrder3.docx") -{ - // given a yellow floating textbox-with-image that overlaps a blue textbox-with-image, - // the inline image should take its zOrder from the textbox it is in. - if (isExported()) - return; // we don't export images inside of draw textboxes I guess - - uno::Reference<beans::XPropertySet> zOrder0(getShape(1), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder1(getShape(2), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder2(getShape(3), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> zOrder3(getShape(4), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(zOrder0, u"ZOrder"_ustr)); // lower - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(zOrder1, u"ZOrder"_ustr)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(zOrder2, u"ZOrder"_ustr)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(zOrder3, u"ZOrder"_ustr)); // higher - // blue textbox (Frame2) is the lowest - CPPUNIT_ASSERT_EQUAL(u"Frame2"_ustr, getProperty<OUString>(zOrder0, u"LinkDisplayName"_ustr)); - // CPPUNIT_ASSERT_EQUAL(OUString("Image2"), getProperty<OUString>(zOrder1, "LinkDisplayName")); - CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr, getProperty<OUString>(zOrder2, u"LinkDisplayName"_ustr)); - // CPPUNIT_ASSERT_EQUAL(OUString("Image1"), getProperty<OUString>(zOrder3, "LinkDisplayName")); -} - DECLARE_OOXMLEXPORT_TEST(testTdf155903, "tdf155903.odt") { // Without the accompanying fix in place, this test would have crashed, diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 7d0f8346bd76..bf12873e7404 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -4918,29 +4918,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape xShapePropertySet->setPropertyValue(getPropertyName(PROP_BOTTOM_MARGIN), aPropMargin->second); - sal_Int64 zOrder = SAL_MIN_INT64; // lowest in heaven-layer: AS_CHAR in body text - // AS_CHARs anchored inside a fly should be just above the fly's zOrder - if (m_vAnchoredStack.size() > 1) - { - uno::Reference<beans::XPropertySet> xParentPropertySet( - m_vAnchoredStack[m_vAnchoredStack.size() - 2].xTextContent, - uno::UNO_QUERY_THROW); - uno::Sequence<beans::PropertyValue> aGrabBag; - xParentPropertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= aGrabBag; - for (const auto& rProp : aGrabBag) - { - if (rProp.Name == "VML-Z-ORDER") - { - rProp.Value >>= zOrder; - ++zOrder; - GraphicZOrderHelper::adjustRelativeHeight(zOrder, /*IsZIndex=*/true, - zOrder < 0, - IsInHeaderFooter()); - xShapePropertySet->setPropertyValue(getPropertyName(PROP_OPAQUE), - uno::Any(zOrder >= 0)); - } - } - } + sal_Int64 zOrder = SAL_MIN_INT64; xShapePropertySet->setPropertyValue(u"ZOrder"_ustr, uno::Any(rZOrderHelper.findZOrder(zOrder, /*LastDuplicateWins*/true))); rZOrderHelper.addItem(xShapePropertySet, zOrder); |