summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-04-06 13:04:22 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-06 16:23:50 +0200
commitcb8b6503fb0c42e25faa75e110b05f69f4f62f59 (patch)
treecb7c113f99ae7eea5e954234138729ce32cf8102 /svx
parent7fc2cafbba36db25e7d0083cea162d2df08611b5 (diff)
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>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/customshapes.cxx15
-rw-r--r--svx/qa/unit/data/tdf141268.odpbin0 -> 12987 bytes
2 files changed, 15 insertions, 0 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 4e3f76db74ec..830c0074c757 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 000000000000..41d0dc4469f1
--- /dev/null
+++ b/svx/qa/unit/data/tdf141268.odp
Binary files differ