summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow/SlideShowRestarter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slideshow/SlideShowRestarter.cxx')
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index ad452d80d67e..90ed5146ac6e 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -42,7 +42,7 @@ SlideShowRestarter::SlideShowRestarter (
: mnEventId(0),
mpSlideShow(rpSlideShow),
mpViewShellBase(pViewShellBase),
- mnDisplayCount(GetDisplayCount()),
+ mnDisplayCount(Application::GetScreenCount()),
mpDispatcher(pViewShellBase->GetViewFrame()->GetDispatcher()),
mnCurrentSlideNumber(0)
{
@@ -77,30 +77,12 @@ void SlideShowRestarter::Restart (bool bForce)
LINK(this, SlideShowRestarter, EndPresentation));
}
-sal_Int32 SlideShowRestarter::GetDisplayCount (void)
-{
- const Reference<XComponentContext> xContext (
- ::comphelper::getProcessComponentContext() );
- Reference<XMultiComponentFactory> xFactory (
- xContext->getServiceManager(), UNO_QUERY);
- if ( ! xFactory.is())
- return 0;
-
- Reference<com::sun::star::container::XIndexAccess> xIndexAccess (
- xFactory->createInstanceWithContext("com.sun.star.awt.DisplayAccess",xContext),
- UNO_QUERY);
- if ( ! xIndexAccess.is())
- return 0;
-
- return xIndexAccess->getCount();
-}
-
IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation)
{
mnEventId = 0;
if (mpSlideShow.is())
{
- if (mnDisplayCount!=GetDisplayCount())
+ if (mnDisplayCount != (sal_Int32)Application::GetScreenCount())
{
mpSlideShow->end();