tdf#141268: svx_unit: Add unittest
Change-Id: Ie2f5bff44d8a113c3605fbe4311af5cbcfe009fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113658
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 4e3f76d..830c0074 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -888,6 +888,21 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf122323_largeSwingAngle)
CPPUNIT_ASSERT_EQUAL_MESSAGE("Start <> End", aStart, aEnd);
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141268)
{
OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf141268.odp";
mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.presentation.PresentationDocument");
CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is());
uno::Reference<drawing::XShape> xShape(getShape(0));
SdrObjCustomShape& rSdrCustomShape(
static_cast<SdrObjCustomShape&>(*GetSdrObjectFromXShape(xShape)));
// Check left/bottom of bound rect. Without fix it would be left=6722, bottom=9483.
tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
CPPUNIT_ASSERT_EQUAL(tools::Long(7620), aBoundRect.Left());
CPPUNIT_ASSERT_EQUAL(tools::Long(8585), aBoundRect.Bottom());
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176)
{
// Error was, that fObjectRotation was not correctly updated after shearing.
diff --git a/svx/qa/unit/data/tdf141268.odp b/svx/qa/unit/data/tdf141268.odp
new file mode 100644
index 0000000..41d0dc4
--- /dev/null
+++ b/svx/qa/unit/data/tdf141268.odp
Binary files differ