[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sd/qa sd/source
sd/qa/uitest/impress_tests/data/tdf127900.fodp | 778 + sd/qa/uitest/impress_tests/tdf127900.py| 39 + sd/source/ui/view/drawview.cxx |3 3 files changed, 819 insertions(+), 1 deletion(-) New commits: commit 90d79c4703e81c3b8b2b9db9cee679fb964f325a Author: Attila Bakos (NISZ) AuthorDate: Tue Aug 24 16:48:07 2021 +0200 Commit: Tünde Tóth CommitDate: Thu Oct 21 10:51:55 2021 +0200 tdf#127900 sd: fix regression at applying master properties Language settings of frames in slide master weren't applied on the slides based on that master. Regression since LO 6.3 by "tdf#126067 Fix slide scope feature." (commit 40bb9ac690d979ef544d5aa759bd734a176912a0). Co-developed-by: Dániel Arató (NISZ) Change-Id: I559adbe00870ed8a3d2947fef8dae435a387e34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120993 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit ca5e344aec6a5848831101bc0d623b2bac754b6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123862 Tested-by: Tünde Tóth Reviewed-by: Tünde Tóth diff --git a/sd/qa/uitest/impress_tests/data/tdf127900.fodp b/sd/qa/uitest/impress_tests/data/tdf127900.fodp new file mode 100644 index ..adedafc2757a --- /dev/null +++ b/sd/qa/uitest/impress_tests/data/tdf127900.fodp @@ -0,0 +1,778 @@ + + +http://openoffice.org/2004/office; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:oooc="http://openoffice.org/2004/calc; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns :css3t="http://www.w3.org/TR/css3-text/; xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:officeooo="http://openoffice.org/2009/office; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.presentation"> + 2021-08-30T08:55:10.39400LibreOffice/7.1.1.2$Windows_X86_64 LibreOffice_project/fe0b08f4af1bacafe4c7ecc87ce55bb4261646762021-08-30T08:56:29.11600PT7S1 + + + 0 + 0 + 14099 + + + + view1 + false + false + true + true + true + true + false + false + true + 1500 + false + Hw== + Hw== + + false + true + false + 0 + 1 + false + true + true + 4 + 0 + -974 + -423 + 28894 + 17739 + 2000 + 2000 + 500 + 500 + 2000 + 4 + 2000 + 4 + false + 1500 + true + false + + + + + true + $(inst)/share/palette%3B$(user)/config/standard.sob + 0 + $(inst)/share/palette%3B$(user)/config/standard.soc + $(inst)/share/palette%3B$(user)/config/standard.sod + 1250 + true + true + false + true + false + $(inst)/share/palette%3B$(user)/config/standard.sog + true + $(inst)/share/palette%3B$(user)/config/standard.soh + false + false + true + true + false + true + false + false + true + false + false + false + false + false + $(inst)/share/palette%3B$(user)/config/standard.soe + false + 4 + false + 0 + low-resolution + Microsoft Print to PDF + false +
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sd/qa sd/source
sd/qa/unit/data/pptx/LostPlaceholder.odp |binary sd/qa/unit/export-tests-ooxml1.cxx | 35 ++- sd/source/filter/eppt/pptx-epptooxml.cxx | 17 +++ 3 files changed, 47 insertions(+), 5 deletions(-) New commits: commit 6dc0e26f9b88fc8490315ac97d23630f014ee4a9 Author: Attila Bakos (NISZ) AuthorDate: Tue Apr 20 13:02:44 2021 +0200 Commit: Balazs Varga CommitDate: Thu Oct 21 09:39:59 2021 +0200 tdf#111903 tdf#137152 PPTX export: fix placeholders Empty placeholders were exported as white empty custom shapes, losing their visibility and usability. Note: export of properties hasn't been implemented, yet. Change-Id: Ie8bd6a611f5fb43bcaa55f6b2f5b07daf731b163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114331 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123856 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/sd/qa/unit/data/pptx/LostPlaceholder.odp b/sd/qa/unit/data/pptx/LostPlaceholder.odp new file mode 100644 index ..80ead189f260 Binary files /dev/null and b/sd/qa/unit/data/pptx/LostPlaceholder.odp differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index d0837001ceca..a6b0c428aff1 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -62,6 +62,7 @@ public: void testN828390_4(); void testN828390_5(); void testFdo71961(); +void testLostPlaceholders(); void testN828390(); void testBnc880763(); void testBnc862510_5(); @@ -114,6 +115,7 @@ public: CPPUNIT_TEST(testN828390_4); CPPUNIT_TEST(testN828390_5); CPPUNIT_TEST(testFdo71961); +CPPUNIT_TEST(testLostPlaceholders); CPPUNIT_TEST(testN828390); CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); @@ -361,6 +363,37 @@ void SdOOXMLExportTest1::testN828390_5() xDocShRef->DoClose(); } +void SdOOXMLExportTest1::testLostPlaceholders() +{ +::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/LostPlaceholder.odp"), ODP); +CPPUNIT_ASSERT(xDocShRef.is()); + +xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); +CPPUNIT_ASSERT(xDocShRef.is()); + +auto pDoc = xDocShRef->GetDoc(); +CPPUNIT_ASSERT(pDoc); +auto pPage = pDoc->GetPage(1); +CPPUNIT_ASSERT(pPage); +auto pObj = pPage->GetObj(1); +CPPUNIT_ASSERT(pObj); +uno::Reference xShp (pObj->getUnoShape(), uno::UNO_QUERY); +CPPUNIT_ASSERT(xShp); + +CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ShapeType!", OUString(u"com.sun.star.presentation.OutlinerShape"), xShp->getShapeType()); +uno::Reference xShpProps(xShp, uno::UNO_QUERY); +// Without the fix in place there will be the following error: +// Expected: com.sun.star.presentation.OutlinerShape +// Actual: com.sun.star.drawing.CustomShape + +CPPUNIT_ASSERT_EQUAL_MESSAGE("It must be a placeholder!", true, xShpProps->getPropertyValue("IsPresentationObject").get()); +// Without the fix in place this will the following: +// Expected: true +// Actual: false + +xDocShRef->DoClose(); +} + void SdOOXMLExportTest1::testFdo71961() { ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo71961.odp"), ODP); @@ -370,7 +403,7 @@ void SdOOXMLExportTest1::testFdo71961() // Export to .pptx changes all text frames to custom shape objects, which obey TextWordWrap property // (which is false for text frames otherwise and is ignored). Check that frames that should wrap still do. -SdrObjCustomShape *pTxtObj = dynamic_cast( pPage->GetObj( 1 )); +auto pTxtObj = pPage->GetObj( 1 ); CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr); CPPUNIT_ASSERT_EQUAL( OUString( "Text to be always wrapped" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0)); CPPUNIT_ASSERT_EQUAL( true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue()); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index c734bf10f0f5..2579d5627148 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1438,13 +1438,22 @@ ShapeExport& PowerPointShapeExport::WritePageShape(const Reference< XShape >& xS bool PowerPointShapeExport::WritePlaceholder(const Reference< XShape >& xShape, PlaceholderType ePlaceholder, bool bMaster) { SAL_INFO("sd.eppt", "WritePlaceholder " << bMaster << " " << ShapeExport::NonEmptyText(xShape)); -if (bMaster && ShapeExport::NonEmptyText(xShape)) +if (!xShape) +return false; +try { -WritePlaceholderShape(xShape, ePlaceholder); +Reference xShapeProps(xShape, UNO_QUERY); +if