From a361231b1363d072d737e9b1d411b71aa9550d84 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 May 2019 10:13:12 +0200 Subject: fix wrong SET/QUERY flags passed to uno::Reference By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/presenter/PresenterHelpView.cxx | 2 +- sdext/source/presenter/PresenterNotesView.cxx | 2 +- sdext/source/presenter/PresenterPane.cxx | 2 +- sdext/source/presenter/PresenterPaneFactory.cxx | 4 ++-- sdext/source/presenter/PresenterSlideShowView.cxx | 4 ++-- sdext/source/presenter/PresenterSlideSorter.cxx | 4 ++-- sdext/source/presenter/PresenterSpritePane.cxx | 2 +- sdext/source/presenter/PresenterToolBar.cxx | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sdext/source/presenter') diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx index 57dd858a2ea1..03df1dcd3797 100644 --- a/sdext/source/presenter/PresenterHelpView.cxx +++ b/sdext/source/presenter/PresenterHelpView.cxx @@ -141,7 +141,7 @@ PresenterHelpView::PresenterHelpView ( // Get the content window via the pane anchor. Reference xCM (rxController, UNO_QUERY_THROW); Reference xCC ( - xCM->getConfigurationController(), UNO_QUERY_THROW); + xCM->getConfigurationController(), UNO_SET_THROW); mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW); mxWindow = mxPane->getWindow(); diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index ca3e362fcc19..dcf4fa51ba73 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -79,7 +79,7 @@ PresenterNotesView::PresenterNotesView ( try { Reference xCM (rxController, UNO_QUERY_THROW); - Reference xCC (xCM->getConfigurationController(), UNO_QUERY_THROW); + Reference xCC (xCM->getConfigurationController(), UNO_SET_THROW); Reference xPane (xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW); mxParentWindow = xPane->getWindow(); diff --git a/sdext/source/presenter/PresenterPane.cxx b/sdext/source/presenter/PresenterPane.cxx index e539d98b4373..91b5bcdbac3f 100644 --- a/sdext/source/presenter/PresenterPane.cxx +++ b/sdext/source/presenter/PresenterPane.cxx @@ -40,7 +40,7 @@ PresenterPane::PresenterPane ( maBoundingBox() { Reference xFactory ( - mxComponentContext->getServiceManager(), UNO_QUERY_THROW); + mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set( xFactory->createInstanceWithContext( "com.sun.star.comp.Draw.PresenterHelper", diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index 3bc43ebbd2cc..90ee5dec609b 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -248,7 +248,7 @@ Reference PresenterPaneFactory::CreatePane ( { Reference xContext (mxComponentContextWeak); Reference xFactory ( - xContext->getServiceManager(), UNO_QUERY_THROW); + xContext->getServiceManager(), UNO_SET_THROW); // Create a border window and canvas and store it in the pane // container. @@ -287,7 +287,7 @@ Reference PresenterPaneFactory::CreatePane ( pDescriptor->mbIsSprite = bIsSpritePane; // Get the window of the frame and make that visible. - Reference xWindow (pDescriptor->mxBorderWindow, UNO_QUERY_THROW); + Reference xWindow (pDescriptor->mxBorderWindow, UNO_SET_THROW); xWindow->setVisible(true); } diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index 29ccb0f66c0c..5dbea9683bca 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -92,12 +92,12 @@ PresenterSlideShowView::PresenterSlideShowView ( void PresenterSlideShowView::LateInit() { - mxSlideShow.set( mxSlideShowController->getSlideShow(), UNO_QUERY_THROW); + mxSlideShow.set( mxSlideShowController->getSlideShow(), UNO_SET_THROW); Reference xSlideShowComponent (mxSlideShow, UNO_QUERY); xSlideShowComponent->addEventListener(static_cast(this)); Reference xFactory ( - mxComponentContext->getServiceManager(), UNO_QUERY_THROW); + mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set (xFactory->createInstanceWithContext( "com.sun.star.comp.Draw.PresenterHelper", mxComponentContext), diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 1ee15e43e993..c965ef004e32 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -276,9 +276,9 @@ PresenterSlideSorter::PresenterSlideSorter ( // Get pane and window. Reference xCM (rxController, UNO_QUERY_THROW); Reference xCC ( - xCM->getConfigurationController(), UNO_QUERY_THROW); + xCM->getConfigurationController(), UNO_SET_THROW); Reference xFactory ( - mxComponentContext->getServiceManager(), UNO_QUERY_THROW); + mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW); mxWindow = mxPane->getWindow(); diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx index d8821bfcb43a..197e2dbf5aa9 100644 --- a/sdext/source/presenter/PresenterSpritePane.cxx +++ b/sdext/source/presenter/PresenterSpritePane.cxx @@ -37,7 +37,7 @@ PresenterSpritePane::PresenterSpritePane (const Reference& rx mpSprite(new PresenterSprite()) { Reference xFactory ( - mxComponentContext->getServiceManager(), UNO_QUERY_THROW); + mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set( xFactory->createInstanceWithContext( "com.sun.star.comp.Draw.PresenterHelper", diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index 10dfda0bcea4..5d065da4454e 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1021,7 +1021,7 @@ PresenterToolBarView::PresenterToolBarView ( try { Reference xCM (rxController, UNO_QUERY_THROW); - Reference xCC(xCM->getConfigurationController(),UNO_QUERY_THROW); + Reference xCC(xCM->getConfigurationController(),UNO_SET_THROW); mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW); mxWindow = mxPane->getWindow(); -- cgit