sfx2/qa/cppunit/test_classification.cxx | 15 --------------- 1 file changed, 15 deletions(-)
New commits: commit cba4282c3ab554db5416f8949d447bae4ec28170 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Feb 23 00:32:21 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Feb 23 09:08:05 2022 +0100 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 <xiscofa...@libreoffice.org> 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<lang::XComponent> mxComponent; - void dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues); void testClassification(); public: @@ -59,20 +58,6 @@ void ClassificationTest::tearDown() test::BootstrapFixture::tearDown(); } -void ClassificationTest::dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues) -{ - uno::Reference<frame::XController> xController = uno::Reference<frame::XModel>(xComponent, uno::UNO_QUERY_THROW)->getCurrentController(); - CPPUNIT_ASSERT(xController.is()); - uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY); - CPPUNIT_ASSERT(xFrame.is()); - - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); - uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext)); - CPPUNIT_ASSERT(xDispatchHelper.is()); - - xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues); -} - void ClassificationTest::testClassification() { uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(