sd/qa/unit/export-tests.cxx | 22 ---------------------- xmloff/source/draw/sdpropls.cxx | 8 ++------ 2 files changed, 2 insertions(+), 28 deletions(-)
New commits: commit bd03dc39f6f02a875590413378355daa4893a988 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Thu Apr 30 18:26:14 2020 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Tue May 19 10:25:42 2020 +0200 tdf#97630 xmloff: ODF export: fix draw:fit-to-size mess, step 2 Restrict the export of draw:fit-to-size to only the standard values "true"/"false". Keep the broken export for ODFVER_012_EXT_COMPAT, since it's easy to do. Change-Id: Ieaab3b635a116a1d0b6155115f8f7f74935a125a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93226 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 4bdced5fe6fa..f1d99e2c840a 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -372,12 +372,7 @@ void SdExportTest::testTdf97630() CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp); uno::Reference<beans::XPropertySet> xShape2(xDP->getByIndex(2), uno::UNO_QUERY); xShape2->getPropertyValue("TextFitToSize") >>= tmp; -#if 1 -// TODO see TODO in sdpropls.cxx - CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_ALLLINES, tmp); -#else CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp); -#endif uno::Reference<beans::XPropertySet> xShape3(xDP->getByIndex(3), uno::UNO_QUERY); xShape3->getPropertyValue("TextFitToSize") >>= tmp; CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_AUTOFIT, tmp); @@ -388,34 +383,17 @@ void SdExportTest::testTdf97630() CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, tmp); uno::Reference<beans::XPropertySet> xShape5(xDP->getByIndex(5), uno::UNO_QUERY); xShape5->getPropertyValue("TextFitToSize") >>= tmp; -#if 1 -// TODO see TODO in sdpropls.cxx - CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_ALLLINES, tmp); -#else CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp); -#endif } xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml"); // text shapes assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='false' and @style:shrink-to-fit='false']", 1); -#if 1 -// TODO see TODO in sdpropls.cxx - assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='true' and @style:shrink-to-fit='false']", 1); - assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='all' and @style:shrink-to-fit='false']", 1); - assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='shrink-to-fit' and @style:shrink-to-fit='true']", 1); -#else assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='true' and @style:shrink-to-fit='false']", 2); assertXPath(pXmlDoc, "//style:style[@style:family='presentation']/style:graphic-properties[@draw:fit-to-size='false' and @style:shrink-to-fit='true']", 1); -#endif // fontworks assertXPath(pXmlDoc, "//style:style[@style:family='graphic']/style:graphic-properties[@draw:fit-to-size='false' and @style:shrink-to-fit='false']", 1); -#if 1 -// TODO see TODO in sdpropls.cxx - assertXPath(pXmlDoc, "//style:style[@style:family='graphic']/style:graphic-properties[@draw:fit-to-size='all' and @style:shrink-to-fit='false']", 1); -#else assertXPath(pXmlDoc, "//style:style[@style:family='graphic']/style:graphic-properties[@draw:fit-to-size='true' and @style:shrink-to-fit='false']", 1); -#endif xDocShRef->DoClose(); } diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index a6298d892450..1902d20c3f30 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1172,12 +1172,8 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy case XML_SD_TYPE_FITTOSIZE: { if (mpExport -#if 1 -// TODO: remove in a couple releases, when users have the import of style:shrink-to-fit - && (mpExport->getSaneDefaultVersion() - <= SvtSaveOptions::ODFSVER_012) -#endif - ) + && (mpExport->getSaneDefaultVersion() // tdf#97630 + != SvtSaveOptions::ODFSVER_012_EXT_COMPAT)) { pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum_Odf12); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits