diff options
author | Henry Castro <hcastro@collabora.com> | 2016-04-20 13:52:31 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-21 13:48:33 +0000 |
commit | 1a74c6333a79ccf0579b33ebc42ce2ccc23ccadb (patch) | |
tree | 61dee187e9588e9ba65066e6196dc584413d26ba /sc/qa | |
parent | 4779f443e9a58e3bd9ec7668796a877ef2362d99 (diff) |
lokit: add getPartHash
In the tiled rendering case, the slides, no matter
if it is inserted or deleted, the part names always return
sequential names i.e. Slide 1, Slide 2, ..., Slide N.
However the client side needs to know what slides had been
deleted or inserted, so it is necessary to send the hash codes.
Change-Id: I0e9caeec660c3e42dd9f751bdce7690f9ad365a1
Reviewed-on: https://gerrit.libreoffice.org/24267
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/tiledrendering/tiledrendering.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 574723e6a9a3..9007e0f42ac5 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -48,12 +48,14 @@ public: #if !defined(WNT) && !defined(MACOSX) void testRowColumnSelections(); void testSortAscendingDescending(); + void testPartHash(); #endif CPPUNIT_TEST_SUITE(ScTiledRenderingTest); #if !defined(WNT) && !defined(MACOSX) CPPUNIT_TEST(testRowColumnSelections); CPPUNIT_TEST(testSortAscendingDescending); + CPPUNIT_TEST(testPartHash); #endif CPPUNIT_TEST_SUITE_END(); @@ -281,6 +283,22 @@ void ScTiledRenderingTest::testSortAscendingDescending() comphelper::LibreOfficeKit::setActive(false); } +void ScTiledRenderingTest::testPartHash() +{ + comphelper::LibreOfficeKit::setActive(); + ScModelObj* pModelObj = createDoc("sort-range.ods"); + + int nParts = pModelObj->getParts(); + for (int it = 0; it < nParts; it++) + { + CPPUNIT_ASSERT(!pModelObj->getPartHash(it).isEmpty()); + } + + // check part that it does not exists + CPPUNIT_ASSERT(pModelObj->getPartHash(100).isEmpty()); + comphelper::LibreOfficeKit::setActive(false); +} + #endif CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest); |