From 9630bbc6df8bbff2c853e07be93579a96cc7cdbb Mon Sep 17 00:00:00 2001 From: Mert Tumer Date: Wed, 19 Jan 2022 14:23:52 +0300 Subject: lok: Set pasted text rect pos to 0, 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131519 Tested-by: Jenkins --- sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'sd') diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index d5972c459e92..8a4da8dbf301 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2469,21 +2469,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide() SdrTextObj* pTextObj = dynamic_cast(pObject); CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(SdrObjKind::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(6739), aPos.getX(), 100); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6822), aPos.getY(), 100); - } - else - { - // We get this with 'make check' - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(12990), aPos.getX(), 100); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(7393), aPos.getY(), 100); - } + CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getX()); + CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getY()); } void SdTiledRenderingTest::testTdf115873() -- cgit