From cba4282c3ab554db5416f8949d447bae4ec28170 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 23 Feb 2022 00:32:21 +0100 Subject: [PATCH] CppunitTest_sfx2_classification: remove duplicated dispatchCommand it's already defined in unotest::MacrosTest Change-Id: I34645b95d83ca1ed167c99bd12c9b6ffebef032c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130400 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sfx2/qa/cppunit/test_classification.cxx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sfx2/qa/cppunit/test_classification.cxx b/sfx2/qa/cppunit/test_classification.cxx index 49664aca6f2f..c086d2e973cb 100644 --- a/sfx2/qa/cppunit/test_classification.cxx +++ b/sfx2/qa/cppunit/test_classification.cxx @@ -27,7 +27,6 @@ namespace class ClassificationTest : public test::BootstrapFixture, public unotest::MacrosTest { uno::Reference mxComponent; - void dispatchCommand(const uno::Reference& xComponent, const OUString& rCommand, const uno::Sequence& rPropertyValues); void testClassification(); public: @@ -59,20 +58,6 @@ void ClassificationTest::tearDown() test::BootstrapFixture::tearDown(); } -void ClassificationTest::dispatchCommand(const uno::Reference& xComponent, const OUString& rCommand, const uno::Sequence& rPropertyValues) -{ - uno::Reference xController = uno::Reference(xComponent, uno::UNO_QUERY_THROW)->getCurrentController(); - CPPUNIT_ASSERT(xController.is()); - uno::Reference xFrame(xController->getFrame(), uno::UNO_QUERY); - CPPUNIT_ASSERT(xFrame.is()); - - uno::Reference xContext = ::comphelper::getProcessComponentContext(); - uno::Reference xDispatchHelper(frame::DispatchHelper::create(xContext)); - CPPUNIT_ASSERT(xDispatchHelper.is()); - - xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues); -} - void ClassificationTest::testClassification() { uno::Sequence aPropertyValues(comphelper::InitPropertySequence(