How to use running slideshow in unit test?

Regina Henschel rb.henschel at t-online.de
Sun Apr 19 16:41:29 UTC 2020


Hi all,

to make a unit test for tdf#129898 
(https://gerrit.libreoffice.org/c/core/+/92502), I would need a running 
slideshow in full screen mode, and then use mouse to paint something.

How do I get a running slideshow? I have not found any test, which uses 
a running slideshow.

I have tried this in sd\qa\unit\misc-tests.cxx:

const OUString sURL("/sd/qa/unit/data/tdf129898_MousePointerAsPen.odp");
sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(sURL), 
ODP);
sd::DrawViewShell* pDrawViewShell = 
static_cast<sd::DrawViewShell*>(xDocShRef -> GetViewShell());
uno::Reference<presentation::XPresentation2> xPresentation2 = 
xDocShRef->GetDoc()->getPresentation();
xPresentation2->start();
CPPUNIT_ASSERT(xPresentation2->isRunning());

But the assertion fails.

In debugger I see, mbIsInStartup=true and mxController empty.

Kind regards
Regina


More information about the LibreOffice mailing list