sd/qa/unit/uiimpress.cxx | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-)
New commits: commit 7a736a1cdc45f14c66b1c5fc96db4f5418267114 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Feb 21 14:29:05 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Feb 21 17:13:40 2022 +0100 CppunitTest_sd_uiimpress: Remove duplicated dispatchCommand SdUiImpressTest already inherits from unotest::MacrosTest Change-Id: If9683cf6ddb9c56913e19d9c7d1ebbf09864b742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130280 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 446170b1e05a..52210ca995f7 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -680,25 +680,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127481) CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pActualPage->GetObjCount()); } -namespace -{ -void 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); -} -} - CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillColor) { // Load the document and create two new windows. @@ -712,7 +693,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillColor) { "Color", uno::makeAny(OUString("ff0000")) }, })); - ::dispatchCommand(mxComponent, ".uno:FillPageColor", aPropertyValues); + dispatchCommand(mxComponent, ".uno:FillPageColor", aPropertyValues); SdPage* pPage = pViewShell->getCurrentPage(); const SfxItemSet& rPageAttr = pPage->getSdrPageProperties().GetItemSet();