sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 3 +++ writerfilter/source/dmapper/GraphicImport.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit cc1c04346861afba69215115c026174f758d7272 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Feb 28 18:36:26 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Mar 2 09:15:28 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> (cherry picked from commit d4355f14d1483a57fa08579b143a762f0aad4631) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148019 Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 70d3ed4bf137..d7dfbf73890e 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 b1ca37f871d1..b5a5e8bf743c 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1792,10 +1792,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->bDecorative)); sal_Int32 nWidth = - m_pImpl->nLeftPosition; if (m_pImpl->m_rGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) { - xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_DECORATIVE), uno::Any(m_pImpl->bDecorative)); //adjust margins if( (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT && (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||