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

Tamás Zolnai tamas.zolnai at collabora.com
Wed Feb 21 21:51:13 UTC 2018


 sd/qa/unit/tiledrendering/tiledrendering.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 0a46237093c1750ee69ddb6a365098dc1d06b758
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Wed Feb 21 17:47:59 2018 +0100

    Add some extra assert to this test case
    
    To find out why this test fails for some linux tinderbox.
    
    Change-Id: I49d1afbbac631abe49378b12b888615e3e0e1bef
    Reviewed-on: https://gerrit.libreoffice.org/50121
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b7dd2d05d097..b938800a12c3 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2062,9 +2062,7 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
     // Load the document.
     comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("paste_text_onslide.odp");
-
-    ViewCallback aView1;
-    SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView1);
+    CPPUNIT_ASSERT(pXImpressDocument);
 
     // select second text object
     pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::TAB);
@@ -2110,7 +2108,10 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
     Scheduler::ProcessEventsToIdle();
 
     // Check the position of the newly added text shape, created for pasted text
-    SdrObject* pObject = pXImpressDocument->GetDocShell()->GetViewShell()->GetActualPage()->GetObj(2);
+    SdPage* pActualPage = pXImpressDocument->GetDocShell()->GetViewShell()->GetActualPage();
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pActualPage->GetObjCount());
+    SdrObject* pObject = pActualPage->GetObj(2);
+    CPPUNIT_ASSERT(pObject);
     SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObject);
     CPPUNIT_ASSERT(pTextObj);
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TEXT), pTextObj->GetObjIdentifier());


More information about the Libreoffice-commits mailing list