From ef33c1e17052509a1541c0a0182ba3adafafe2cf Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 12 Sep 2024 13:08:48 +0200 Subject: SwModelTestBase: remove duplicated code to print execution time This is already handled in class TimingListener in sal/cppunittester/cppunittester.cxx Change-Id: I77d330351d53ef084597e6f46099d1d16f59aae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173258 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/qa/extras/mailmerge/mailmergetestbase.cxx | 2 -- sw/qa/inc/swmodeltestbase.hxx | 4 ---- sw/qa/unit/swmodeltestbase.cxx | 10 ---------- 3 files changed, 16 deletions(-) diff --git a/sw/qa/extras/mailmerge/mailmergetestbase.cxx b/sw/qa/extras/mailmerge/mailmergetestbase.cxx index fb5c57767871..fc6e084ac21a 100644 --- a/sw/qa/extras/mailmerge/mailmergetestbase.cxx +++ b/sw/qa/extras/mailmerge/mailmergetestbase.cxx @@ -94,7 +94,6 @@ public: column != nullptr); verify(); - finish(); mnCurOutputType = 0; } @@ -266,7 +265,6 @@ public: mxComponent->dispose(); // Output name early, so in the case of a hang, the name of the hanging input file is visible. std::cout << filename << ","; - mnStartTime = osl_getGlobalTimer(); mxComponent = loadFromDesktop(msMailMergeOutputURL + "/" + filename, u"com.sun.star.text.TextDocument"_ustr); calcLayout(); diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index 5cb46a07bfad..e31bcf48860f 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -93,8 +93,6 @@ protected: xmlBufferPtr mpXmlBuffer; OUString mpFilter; - sal_uInt32 mnStartTime; - /// Copy&paste helper. void paste(std::u16string_view aFilename, OUString aInstance, css::uno::Reference const& xTextRange); @@ -231,8 +229,6 @@ protected: /// Combines load() and saveAndReload(). void loadAndReload(const char* pName); - void finish(); - /// Get page count. int getPages() const; diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index 8c6b85cf428b..babaf0a3cdf3 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -60,7 +60,6 @@ SwModelTestBase::SwModelTestBase(const OUString& pTestDocumentPath, const OUStri , mbExported(false) , mpXmlBuffer(nullptr) , mpFilter(pFilter) - , mnStartTime(0) { } @@ -72,7 +71,6 @@ void SwModelTestBase::executeLoadVerifyReloadVerify(const char* filename, const verify(); saveAndReload(mpFilter, pPassword); verify(); - finish(); maTempFile.EnableKillingFile(); } @@ -83,7 +81,6 @@ void SwModelTestBase::executeImportExport(const char* filename, const char* pPas loadAndSave(filename, pPassword); maTempFile.EnableKillingFile(false); verify(); - finish(); maTempFile.EnableKillingFile(); } @@ -397,7 +394,6 @@ void SwModelTestBase::loadURL(OUString const& rURL, const char* pPassword) if (!isExported()) { std::cout << rURL << ":\n"; - mnStartTime = osl_getGlobalTimer(); } UnoApiXmlTest::load(rURL, pPassword); @@ -428,12 +424,6 @@ void SwModelTestBase::loadAndReload(const char* pName) saveAndReload(mpFilter); } -void SwModelTestBase::finish() -{ - sal_uInt32 nEndTime = osl_getGlobalTimer(); - std::cout << (nEndTime - mnStartTime) << std::endl; -} - int SwModelTestBase::getPages() const { uno::Reference xModel(mxComponent, uno::UNO_QUERY); -- cgit