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

2020-03-07 Thread Andrew Lee () (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 8905ed739110050f713c3f8030bd747fed1cb0dc
Author: Andrew Lee (李健秋) 
AuthorDate: Sat Mar 7 19:10:02 2020 +0800
Commit: Michael Meeks 
CommitDate: Sat Mar 7 17:47:38 2020 +0100

Add single setActive for all tests in tiledrendering module

Originally there are 'setActive' in the 1st call of each tests in the
tiledrendering module.

Here we add a single setActive to replace the 1st call of each tests.

Signed-off-by: Andrew Lee (李健秋) 
Change-Id: I7e8a6fa39d2d4bf0e4eab2e30cbee7437e59ef9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90157
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 214b6352f9f6..2062b937ac9a 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -62,6 +62,7 @@ class SwTiledRenderingTest : public SwModelTestBase
 {
 public:
 SwTiledRenderingTest();
+virtual void setUp() override;
 virtual void tearDown() override;
 void testRegisterCallback();
 void testPostKeyEvent();
@@ -220,6 +221,13 @@ SwTiledRenderingTest::SwTiledRenderingTest()
 {
 }
 
+void SwTiledRenderingTest::setUp()
+{
+SwModelTestBase::setUp();
+
+comphelper::LibreOfficeKit::setActive(true);
+}
+
 void SwTiledRenderingTest::tearDown()
 {
 if (mxComponent.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-07 Thread Andrew Lee () (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   75 -
 1 file changed, 75 deletions(-)

New commits:
commit 54c6230a19359ef6ea6a11ed326c520cdbe271d4
Author: Andrew Lee (李健秋) 
AuthorDate: Sat Mar 7 19:15:19 2020 +0800
Commit: Michael Meeks 
CommitDate: Sat Mar 7 17:48:04 2020 +0100

Drop replaced setActive call of each tests in tiledrendering module

We added a single setup method to replaced setActive call in each
tests.

This commit drop all the replaced setActive call in each tests in
this tiledrendering module.

Signed-off-by: Andrew Lee (李健秋) 
Change-Id: If0d0b8f6cd03bfbb935bd8a0023530799f5cde34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90158
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 2062b937ac9a..1e8baea4312f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -364,7 +364,6 @@ void SwTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 
 void SwTiledRenderingTest::testRegisterCallback()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
@@ -395,7 +394,6 @@ void SwTiledRenderingTest::testPostKeyEvent()
 
 void SwTiledRenderingTest::testPostMouseEvent()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
@@ -439,8 +437,6 @@ void SwTiledRenderingTest::testSetTextSelection()
 
 void SwTiledRenderingTest::testGetTextSelection()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("shape-with-text.fodt");
 // No crash, just empty output for unexpected mime type.
 CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), 
"foo/bar"));
@@ -522,8 +518,6 @@ void SwTiledRenderingTest::testResetSelection()
 
 void SwTiledRenderingTest::testInsertShape()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("2-pages.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
@@ -552,8 +546,6 @@ static void lcl_search(bool bBackward)
 
 void SwTiledRenderingTest::testSearch()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
@@ -619,8 +611,6 @@ void SwTiledRenderingTest::testSearchViewArea()
 
 void SwTiledRenderingTest::testSearchTextFrame()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
@@ -653,7 +643,6 @@ void SwTiledRenderingTest::testSearchTextFrameWrapAround()
 
 void SwTiledRenderingTest::testDocumentSizeChanged()
 {
-comphelper::LibreOfficeKit::setActive();
 // Get the current document size.
 SwXTextDocument* pXTextDocument = createDoc("2-pages.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
@@ -671,8 +660,6 @@ void SwTiledRenderingTest::testDocumentSizeChanged()
 
 void SwTiledRenderingTest::testSearchAll()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
@@ -691,7 +678,6 @@ void SwTiledRenderingTest::testSearchAll()
 
 void SwTiledRenderingTest::testSearchAllNotifications()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback,
 this);
@@ -714,8 +700,6 @@ void SwTiledRenderingTest::testSearchAllNotifications()
 
 void SwTiledRenderingTest::testPageDownInvalidation()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("pagedown-invalidation.odt");
 uno::Sequence 
aPropertyValues(comphelper::InitPropert