summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2022-01-19 14:23:52 +0300
committerMert Tumer <mert.tumer@collabora.com>2022-01-20 09:55:44 +0100
commit9ca4bb1e7392347b03887486cad597c0fb7ce774 (patch)
treeab10e694178e464085053558805fa564fe031ca1 /sd
parentf168cfc7a3a374fba2175eb8682a69b924928ccb (diff)
lok: Set pasted text rect pos to 0, 0
Rect size change according to the length of the text however, this can make the text inserted in the negative coordinates and half of it becomes invisible. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 917f2eb04038..7934fb8ca34e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2465,21 +2465,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObject);
CPPUNIT_ASSERT(pTextObj);
CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pTextObj->GetObjIdentifier());
- // This test is unreliable: it gives alternating results for the following coordinates.
- // As a compromise, instead of disabling it altogether, we allow for both sets of values.
const Point aPos = pTextObj->GetLastBoundRect().TopLeft();
- if (aPos.getX() < 10000)
- {
- // We get this with 'make CppunitTest_sd_tiledrendering'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6739), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6822), aPos.getY(), 100);
- }
- else
- {
- // We get this with 'make check'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(12990), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(7393), aPos.getY(), 100);
- }
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(0), aPos.getX());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(0), aPos.getY());
}
void SdTiledRenderingTest::testTdf115873()