sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 3 +++ writerfilter/source/dmapper/GraphicImport.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit d4355f14d1483a57fa08579b143a762f0aad4631 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Feb 28 18:36:26 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Feb 28 19:43:00 2023 +0000 tdf#143311 writerfilter: import decorative flag on as-char flys too Change-Id: I9704d35a8286b92169dffd8de7e57e286884f607 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148016 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 9eb7eabd2434..0394c03495a6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -830,6 +830,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153874, "image_through_shape.docx") CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, xShape1->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()); CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, xShape2->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()); CPPUNIT_ASSERT_LESS(xShape2->getPropertyValue("ZOrder").get<sal_uInt64>(), xShape1->getPropertyValue("ZOrder").get<sal_uInt64>()); + CPPUNIT_ASSERT(xShape1->getPropertyValue("Decorative").get<bool>()); + // not implemented on shape yet + //CPPUNIT_ASSERT(xShape2->getPropertyValue("Decorative").get<bool>()); } DECLARE_OOXMLEXPORT_TEST(testTextBoxZOrder, "testTextBoxZOrder.docx") diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index c8c1e392f2c0..2351100f06bb 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1795,10 +1795,10 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ), uno::Any(true)); + xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_DECORATIVE), uno::Any(m_pImpl->m_bDecorative)); sal_Int32 nWidth = - m_pImpl->m_nLeftPosition; if (m_pImpl->m_rGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) { - xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_DECORATIVE), uno::Any(m_pImpl->m_bDecorative)); //adjust margins if( (m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT && (m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||