diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-21 14:29:05 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-21 17:13:40 +0100 |
commit | 7a736a1cdc45f14c66b1c5fc96db4f5418267114 (patch) | |
tree | 22d884013778baf20f7e9fbc0b30d3ddb130e446 /sd | |
parent | 3fd5ddb3d01598ea434e6ad843a04a82c2f238f8 (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/uiimpress.cxx | 21 |
1 files changed, 1 insertions, 20 deletions
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(); |