From 720b3c133cc6348537b4d013b4531856f73b392d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 28 Jul 2020 11:43:26 +0200 Subject: [PATCH] CppunitTest_sw_uiwriter: reset the redline author after using it See http://document-foundation-mail-archive.969070.n3.nabble.com/CppunitTest-different-results-depending-on-execution-command-td4283987.html Change-Id: I16f07232611d3d2cec675f34f0f93aee9618d80f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99585 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/extras/uiwriter/uiwriter.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 7d873c558e2c..b404f1901726 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -5519,6 +5519,10 @@ void SwUiWriterTest::testRedlineViewAuthor() uno::Reference xField(xFields->nextElement(), uno::UNO_QUERY); // This was 'Unknown Author' instead of 'A U. Thor'. CPPUNIT_ASSERT_EQUAL(aAuthor, xField->getPropertyValue("Author").get()); + + //Reset the redline author after using it, otherwise, it might interfere with other unittests + pView->SetRedlineAuthor("Unknown Author"); + pDocShell->SetView(pView); } void SwUiWriterTest::testTdf91292()