diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-13 12:02:32 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-13 17:17:22 +0100 |
commit | c94ae40267ae3352e95911bcd1fb9f12f4a714a0 (patch) | |
tree | 674a1c23dfe471de152cdae597714b63091853da /test | |
parent | 7b148b0edfb217196c171f8e64e79b49669fc36f (diff) |
Fix sc_ddelinkobj tests
Regression from commit 63ff8602c16b0c26927dc3413b12a5368fe367b0.
See thread started at
https://lists.freedesktop.org/archives/libreoffice/2018-December/081542.html
The Application::SetName is mandatory for DDE to work; otherwise
InitializeDde() in SfxApplication::SfxApplication() fails.
DDE spreadsheet formula expects full name of the target spreadsheet,
including path.
Fixed sheet name (it's "Sheet1", not "Sheet").
Removed redundant tests (former "testRemoveRefreshListener" tests all).
Change-Id: I6299a9ec03c3657a21ad42d0ff87db25cf2be905
Reviewed-on: https://gerrit.libreoffice.org/65079
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/sheet/xddelink.cxx | 6 | ||||
-rw-r--r-- | test/source/util/xrefreshable.cxx | 22 |
2 files changed, 4 insertions, 24 deletions
diff --git a/test/source/sheet/xddelink.cxx b/test/source/sheet/xddelink.cxx index 403449452ba5..b166275d5367 100644 --- a/test/source/sheet/xddelink.cxx +++ b/test/source/sheet/xddelink.cxx @@ -30,15 +30,15 @@ void XDDELink::testGetItem() { uno::Reference<sheet::XDDELink> xLink(init(), UNO_QUERY_THROW); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to execute getItem()", OUString("Sheet.A1"), + CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to execute getItem()", OUString("Sheet1.A1"), xLink->getItem()); } void XDDELink::testGetTopic() { uno::Reference<sheet::XDDELink> xLink(init(), UNO_QUERY_THROW); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to execute getTopic()", OUString("ScDDELinksObj.ods"), - xLink->getTopic()); + CPPUNIT_ASSERT_MESSAGE("Unable to execute getTopic()", + xLink->getTopic().endsWith("ScDDELinksObj.ods")); } } // namespace apitest diff --git a/test/source/util/xrefreshable.cxx b/test/source/util/xrefreshable.cxx index 174115e64289..19d1dc42acb0 100644 --- a/test/source/util/xrefreshable.cxx +++ b/test/source/util/xrefreshable.cxx @@ -41,27 +41,7 @@ public: virtual void SAL_CALL disposing(const lang::EventObject& /* xEventObj */) override {} }; -void XRefreshable::testAddRefreshListener() -{ - uno::Reference<util::XRefreshable> xRefreshable(init(), uno::UNO_QUERY_THROW); - - rtl::Reference<MockedRefreshListener> xListener = new MockedRefreshListener(); - xRefreshable->addRefreshListener(uno::Reference<util::XRefreshListener>(xListener.get())); -} - -void XRefreshable::testRefresh() -{ - uno::Reference<util::XRefreshable> xRefreshable(init(), uno::UNO_QUERY_THROW); - - rtl::Reference<MockedRefreshListener> xListener = new MockedRefreshListener(); - xRefreshable->addRefreshListener(uno::Reference<util::XRefreshListener>(xListener.get())); - - xRefreshable->refresh(); - - CPPUNIT_ASSERT(xListener->m_bListenerCalled); -} - -void XRefreshable::testRemoveRefreshListener() +void XRefreshable::testRefreshListener() { uno::Reference<util::XRefreshable> xRefreshable(init(), uno::UNO_QUERY_THROW); |