diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 53686f34aeca..3197fedea659 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -35,19 +36,24 @@ public: Test() : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr) {} }; -// TODO: the re-import doesn't work just yet, but that isn't a regression... CPPUNIT_TEST_FIXTURE(Test, testFlyInFly) { createSwDoc("ooo39250-1-min.rtf"); - save(TestFilter::DOCX); + saveAndReload(TestFilter::DOCX); // check that anchor of text frame is in other text frame uno::Reference const xAnchored(getShape(3), uno::UNO_QUERY); CPPUNIT_ASSERT(xAnchored.is()); - CPPUNIT_ASSERT_EQUAL(u"Frame1"_ustr/*generated name*/, uno::Reference(xAnchored, uno::UNO_QUERY_THROW)->getName()); + // generated name + OUString sName = uno::Reference(xAnchored, uno::UNO_QUERY_THROW)->getName(); + CPPUNIT_ASSERT(sName == u"Frame1" || sName == u"Frame 1"); uno::Reference const xAnchorText(xAnchored->getAnchor()->getText()); uno::Reference const xAnchorFrame(xAnchorText, uno::UNO_QUERY); CPPUNIT_ASSERT(xAnchorFrame.is()); CPPUNIT_ASSERT_EQUAL(u"Frame3"_ustr, uno::Reference(xAnchorFrame, uno::UNO_QUERY_THROW)->getName()); + + // All frames are floating frames - not inline + for (auto& pSpz : *getSwDoc()->GetSpzFrameFormats()) + CPPUNIT_ASSERT(RndStdIds::FLY_AS_CHAR != pSpz->GetAnchor().GetAnchorId()); } DECLARE_OOXMLEXPORT_TEST(testTdf125778_lostPageBreakTOX, "tdf125778_lostPageBreakTOX.docx") diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 4142adf80371..005655c04e20 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1742,7 +1742,6 @@ void DocxSdrExport::writeOnlyTextOfFrame(ww8::Frame const* pParentFrame) ExportDataSaveRestore aDataGuard(m_pImpl->getExport(), nStt, nEnd, pParentFrame); m_pImpl->setBodyPrAttrList(sax_fastparser::FastSerializerHelper::createAttrList().get()); - ::comphelper::FlagRestorationGuard const g(m_pImpl->m_bFlyFrameGraphic, true); comphelper::ValueRestorationGuard vg(m_pImpl->getExport().m_nTextTyp, TXT_TXTBOX); m_pImpl->getExport().WriteText(); }