[Libreoffice-commits] core.git: sd/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 18 20:12:58 UTC 2020
sd/qa/unit/data/pptx/tdf136830.pptx |binary
sd/qa/unit/export-tests-ooxml2.cxx | 24 ++++++++++++++++++++++++
2 files changed, 24 insertions(+)
New commits:
commit 489afd23ed8eff3b9df4c243b4e4c8fbc264b9d8
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Sep 18 15:53:12 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Sep 18 22:12:19 2020 +0200
tdf#136830: sd_export_ooxml2: Add unittest
Change-Id: If42d57cb88119cc4cfc8266ec17c91d1d880fab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103008
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sd/qa/unit/data/pptx/tdf136830.pptx b/sd/qa/unit/data/pptx/tdf136830.pptx
new file mode 100644
index 000000000000..b9ca65899243
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf136830.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 899457e11e4a..20016799091a 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -185,6 +185,7 @@ public:
void testTdf125360_1();
void testTdf125360_2();
void testTdf125551();
+ void testTdf136830();
void testTdf126234();
void testTdf126741();
void testTdf127372();
@@ -302,6 +303,7 @@ public:
CPPUNIT_TEST(testTdf125360_1);
CPPUNIT_TEST(testTdf125360_2);
CPPUNIT_TEST(testTdf125551);
+ CPPUNIT_TEST(testTdf136830);
CPPUNIT_TEST(testTdf126234);
CPPUNIT_TEST(testTdf126741);
CPPUNIT_TEST(testTdf127372);
@@ -2569,6 +2571,28 @@ void SdOOXMLExportTest2::testTdf125551()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8587), xShapeBg->getSize().Height);
}
+void SdOOXMLExportTest2::testTdf136830()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf136830.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+ // Without the fix in place, the X position of the shapes would have been 0
+ uno::Reference<drawing::XShapes> xGroupShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
+
+ uno::Reference<drawing::XShape> xShape1(xGroupShape->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(14134), xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-5321), xShape1->getPosition().Y);
+
+ uno::Reference<drawing::XShape> xShape2(xGroupShape->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8085), xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8085), xShape2->getPosition().Y);
+
+ uno::Reference<drawing::XShape> xShape3(xGroupShape->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8283), xShape3->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4620), xShape3->getPosition().Y);
+}
+
void SdOOXMLExportTest2::testTdf100348_convert_Fontwork2TextWarp()
{
::sd::DrawDocShellRef xDocShRef = loadURL(
More information about the Libreoffice-commits
mailing list