diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-16 12:38:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-16 14:48:23 +0200 |
commit | dcc92a7cb5aa1faa711c8da7f7d8ecee0a192c25 (patch) | |
tree | f6ed2e55dd7dad168af83e266dc53acbe2926af9 /desktop/qa | |
parent | 9035f00ede7925eb699864d17baf7c897a8c7e53 (diff) |
sfx2: add SfxLokHelper::getViewIds
and also expose it in the LOK API. This way clients don't have to keep
track of what views they created / destroyed, they can also get an up to
date list with this method.
Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
Diffstat (limited to 'desktop/qa')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 8f3807ee79d5..a7e24fcd7255 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -316,6 +316,12 @@ void DesktopLOKTest::testCreateView() int nId1 = pDocument->m_pDocumentClass->createView(pDocument); CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViewsCount(pDocument)); + // Test getViewIds(). + std::vector<int> aViewIds(2); + CPPUNIT_ASSERT(pDocument->m_pDocumentClass->getViewIds(pDocument, aViewIds.data(), aViewIds.size())); + CPPUNIT_ASSERT_EQUAL(nId0, aViewIds[0]); + CPPUNIT_ASSERT_EQUAL(nId1, aViewIds[1]); + // Make sure the created view is the active one, then switch to the old // one. CPPUNIT_ASSERT_EQUAL(nId1, pDocument->m_pDocumentClass->getView(pDocument)); |