diff options
Diffstat (limited to 'sd/source/console')
-rw-r--r-- | sd/source/console/PresenterHelper.cxx | 15 | ||||
-rw-r--r-- | sd/source/console/PresenterScreen.cxx | 4 | ||||
-rw-r--r-- | sd/source/console/PresenterSlideShowView.cxx | 4 |
3 files changed, 15 insertions, 8 deletions
diff --git a/sd/source/console/PresenterHelper.cxx b/sd/source/console/PresenterHelper.cxx index 9bdd580460f8..76bec0ecee7d 100644 --- a/sd/source/console/PresenterHelper.cxx +++ b/sd/source/console/PresenterHelper.cxx @@ -36,10 +36,17 @@ Reference<presentation::XSlideShowController> PresenterHelper::GetSlideShowContr { Reference<presentation::XSlideShowController> xSlideShowController; - if( rxController.is() ) - if (auto xPS = rxController->getModel().query<XPresentationSupplier>()) - if (auto xPresentation = xPS->getPresentation().query<XPresentation2>()) - xSlideShowController = xPresentation->getController(); + if( rxController.is() ) try + { + Reference<XPresentationSupplier> xPS ( rxController->getModel(), UNO_QUERY_THROW); + + Reference<XPresentation2> xPresentation(xPS->getPresentation(), UNO_QUERY_THROW); + + xSlideShowController = xPresentation->getController(); + } + catch(RuntimeException&) + { + } return xSlideShowController; } diff --git a/sd/source/console/PresenterScreen.cxx b/sd/source/console/PresenterScreen.cxx index dcf0cb93a564..cd6c20d38cc5 100644 --- a/sd/source/console/PresenterScreen.cxx +++ b/sd/source/console/PresenterScreen.cxx @@ -411,8 +411,8 @@ void PresenterScreen::SwitchMonitors() nNewScreen++; // otherwise we store screens offset by one. // Set the new presentation display - if (auto xProperties = xPresentation.query<beans::XPropertySet>()) - xProperties->setPropertyValue("Display", Any(nNewScreen)); + Reference<beans::XPropertySet> xProperties (xPresentation, UNO_QUERY_THROW); + xProperties->setPropertyValue("Display", Any(nNewScreen)); } catch (const uno::Exception &) { } } diff --git a/sd/source/console/PresenterSlideShowView.cxx b/sd/source/console/PresenterSlideShowView.cxx index 002bc217d659..32693f116410 100644 --- a/sd/source/console/PresenterSlideShowView.cxx +++ b/sd/source/console/PresenterSlideShowView.cxx @@ -799,8 +799,8 @@ Reference<awt::XWindow> PresenterSlideShowView::CreateViewWindow ( xViewWindow.set( xToolkit->createWindow(aWindowDescriptor),UNO_QUERY_THROW); // Make the background transparent. The slide show paints its own background. - if (auto xPeer = xViewWindow.query<awt::XWindowPeer>()) - xPeer->setBackground(0xff000000); + Reference<awt::XWindowPeer> xPeer (xViewWindow, UNO_QUERY_THROW); + xPeer->setBackground(0xff000000); xViewWindow->setVisible(true); } |