summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2016-04-20 13:52:31 -0400
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-21 13:48:33 +0000
commit1a74c6333a79ccf0579b33ebc42ce2ccc23ccadb (patch)
tree61dee187e9588e9ba65066e6196dc584413d26ba /sd/qa
parent4779f443e9a58e3bd9ec7668796a877ef2362d99 (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 'sd/qa')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index d50d01e8994d..88b437f3286b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -60,6 +60,7 @@ public:
void testSearchAllFollowedBySearch();
void testInsertDeletePage();
void testInsertTable();
+ void testPartHash();
#endif
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
@@ -78,6 +79,7 @@ public:
CPPUNIT_TEST(testSearchAllFollowedBySearch);
CPPUNIT_TEST(testInsertDeletePage);
CPPUNIT_TEST(testInsertTable);
+ CPPUNIT_TEST(testPartHash);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -660,6 +662,22 @@ void SdTiledRenderingTest::testInsertTable()
comphelper::LibreOfficeKit::setActive(false);
}
+void SdTiledRenderingTest::testPartHash()
+{
+ comphelper::LibreOfficeKit::setActive();
+ SdXImpressDocument* pDoc = createDoc("dummy.odp");
+
+ int nParts = pDoc->getParts();
+ for (int it = 0; it < nParts; it++)
+ {
+ CPPUNIT_ASSERT(!pDoc->getPartHash(it).isEmpty());
+ }
+
+ // check part that it does not exists
+ CPPUNIT_ASSERT(pDoc->getPartHash(100).isEmpty());
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
#endif
CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);