summaryrefslogtreecommitdiff
path: root/sd/qa/unit/tiledrendering/tiledrendering.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-16 16:45:21 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:09 -0400
commit82bb3b84594d4eadaa062cdb8381360dbc7cf3b6 (patch)
tree9f9096183c2f6b54371305721168db637d8766ff /sd/qa/unit/tiledrendering/tiledrendering.cxx
parent2e6fd3dca0d1ab7dd03f6dca2574c926462daaf0 (diff)
comphelper: enable LibreOfficeKit::isViewCallback() by default
This requires porting the sw/sd/sc_tiledrendering test code to the new internal API, as only the public LOK API is unchanged. Reviewed-on: https://gerrit.libreoffice.org/26379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5bf3ae663a2189e37959235cda8c6a4051e10a1a) Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9
Diffstat (limited to 'sd/qa/unit/tiledrendering/tiledrendering.cxx')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 9f7488f93959..ab9196c0b865 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -28,6 +28,7 @@
#include <svx/svdotable.hxx>
#include <DrawDocShell.hxx>
+#include <ViewShellBase.hxx>
#include <ViewShell.hxx>
#include <sdpage.hxx>
#include <unomodel.hxx>
@@ -258,8 +259,8 @@ xmlDocPtr SdTiledRenderingTest::parseXmlDump()
void SdTiledRenderingTest::testRegisterCallback()
{
SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
// Start text edit of the empty title shape.
SdPage* pActualPage = pViewShell->GetActualPage();
@@ -443,14 +444,14 @@ void SdTiledRenderingTest::testSearch()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
uno::Reference<container::XIndexAccess> xDrawPage(pXImpressDocument->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
xShape->setString("Aaa bbb.");
lcl_search("bbb");
- sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdrView* pView = pViewShell->GetView();
EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView();
// Did we indeed manage to select the second word?
@@ -478,7 +479,8 @@ void SdTiledRenderingTest::testSearchAll()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
lcl_search("match", /*bFindAll=*/true);
@@ -498,7 +500,8 @@ void SdTiledRenderingTest::testSearchAllSelections()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
lcl_search("third", /*bFindAll=*/true);
// Make sure this is found on the 3rd slide.
@@ -512,7 +515,8 @@ void SdTiledRenderingTest::testSearchAllNotifications()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
lcl_search("third", /*bFindAll=*/true);
// Make sure that we get no notifications about selection changes during search.
@@ -526,7 +530,8 @@ void SdTiledRenderingTest::testSearchAllFollowedBySearch()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
lcl_search("third", /*bFindAll=*/true);
lcl_search("match" /*,bFindAll=false*/);
@@ -559,7 +564,8 @@ void SdTiledRenderingTest::testInsertDeletePage()
{
comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("insert-delete.odp");
- pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
SdDrawDocument* pDoc = pXImpressDocument->GetDocShell()->GetDoc();
CPPUNIT_ASSERT(pDoc);