[Libreoffice-commits] core.git: svx/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 6 14:24:32 UTC 2021


 svx/qa/unit/customshapes.cxx   |   15 +++++++++++++++
 svx/qa/unit/data/tdf141268.odp |binary
 2 files changed, 15 insertions(+)

New commits:
commit cb8b6503fb0c42e25faa75e110b05f69f4f62f59
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Apr 6 13:04:22 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Apr 6 16:23:50 2021 +0200

    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 at libreoffice.org>

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
Binary files /dev/null and b/svx/qa/unit/data/tdf141268.odp differ


More information about the Libreoffice-commits mailing list