diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-10 10:13:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 08:15:27 +0200 |
commit | a361231b1363d072d737e9b1d411b71aa9550d84 (patch) | |
tree | 08641fe2af10c1f22c7fd58e62f99b6dbe301c62 /sd/source/ui | |
parent | ce76026231d9536d2025a1e69f435bcbf39fe4f8 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/filedlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/ImagePreparer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Receiver.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 4 |
16 files changed, 28 insertions, 28 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 20248f664f5e..f6107693d29f 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -2239,7 +2239,7 @@ void CustomAnimationEffectTabPage::onSoundPreview() if( nPos >= 2 ) try { const OUString aSoundURL( maSoundList[ nPos-2 ] ); - mxPlayer.set( avmedia::MediaWindow::createPlayer( aSoundURL, "" ), uno::UNO_QUERY_THROW ); + mxPlayer.set( avmedia::MediaWindow::createPlayer( aSoundURL, "" ), uno::UNO_SET_THROW ); mxPlayer->start(); } catch( uno::Exception& ) diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index d0910d6bb97c..e6cfb0c1d98f 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -185,7 +185,7 @@ static OUString getDescription( const Any& rTarget, bool bWithText ) rTarget >>= aParaTarget; Reference< XEnumerationAccess > xText( aParaTarget.Shape, UNO_QUERY_THROW ); - Reference< XEnumeration > xEnumeration( xText->createEnumeration(), UNO_QUERY_THROW ); + Reference< XEnumeration > xEnumeration( xText->createEnumeration(), css::uno::UNO_SET_THROW ); sal_Int32 nPara = aParaTarget.Paragraph; while( xEnumeration->hasMoreElements() && nPara ) diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index c5b0385b56f8..6971328837e8 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -907,7 +907,7 @@ static sal_Int32 calcMaxParaDepth( const Reference< XShape >& xTargetShape ) { Reference< XPropertySet > xParaSet; - Reference< XEnumeration > xEnumeration( xText->createEnumeration(), UNO_QUERY_THROW ); + Reference< XEnumeration > xEnumeration( xText->createEnumeration(), UNO_SET_THROW ); while( xEnumeration->hasMoreElements() ) { xEnumeration->nextElement() >>= xParaSet; @@ -1664,7 +1664,7 @@ static bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape Reference< XTextRangeCompare > xTextRangeCompare( xShape, UNO_QUERY_THROW ); Reference< XEnumerationAccess > xParaEnumAccess( xShape, UNO_QUERY_THROW ); - Reference< XEnumeration > xParaEnum( xParaEnumAccess->createEnumeration(), UNO_QUERY_THROW ); + Reference< XEnumeration > xParaEnum( xParaEnumAccess->createEnumeration(), UNO_SET_THROW ); Reference< XTextRange > xRange; Reference< XTextRange > xStart( xSelectedText->getStart() ); Reference< XTextRange > xEnd( xSelectedText->getEnd() ); diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 4822b3da3426..9c8d072e61ea 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -113,7 +113,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void) #if HAVE_FEATURE_AVMEDIA try { - mxPlayer.set( avmedia::MediaWindow::createPlayer( aUrl, "" ), css::uno::UNO_QUERY_THROW ); + mxPlayer.set( avmedia::MediaWindow::createPlayer( aUrl, "" ), css::uno::UNO_SET_THROW ); mxPlayer->start(); maUpdateIdle.Start(); } diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index ef74c5eeaa7c..7a0a1ed09fcc 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1342,7 +1342,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) #if HAVE_FEATURE_AVMEDIA try { - mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark(), ""/*TODO?*/), uno::UNO_QUERY_THROW ); + mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark(), ""/*TODO?*/), uno::UNO_SET_THROW ); mxPlayer->start(); } catch( uno::Exception& ) diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index e1526aeac622..3a208fdde6ec 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -209,7 +209,7 @@ OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber ) uno::Reference<css::drawing::XDrawPage> aNotesPage; uno::Reference< drawing::XDrawPage > xSourceDoc( xController->getSlideByIndex( aSlideNumber ), - uno::UNO_QUERY_THROW ); + uno::UNO_SET_THROW ); uno::Reference<presentation::XPresentationPage> xPresentationPage( xSourceDoc, UNO_QUERY); if (xPresentationPage.is()) diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index 6a987a67e877..cd8cadea074e 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -73,12 +73,12 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) uno::Reference<presentation::XSlideShow> xSlideShow; try { uno::Reference< frame::XDesktop2 > xFramesSupplier = frame::Desktop::create( ::comphelper::getProcessComponentContext() ); - uno::Reference< frame::XFrame > xFrame ( xFramesSupplier->getActiveFrame(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XFrame > xFrame ( xFramesSupplier->getActiveFrame(), uno::UNO_SET_THROW ); uno::Reference<presentation::XPresentationSupplier> xPS ( xFrame->getController()->getModel(), uno::UNO_QUERY_THROW); xPresentation.set( xPS->getPresentation(), uno::UNO_QUERY_THROW); // Throws an exception if now slideshow running - xSlideShowController.set( xPresentation->getController(), uno::UNO_QUERY_THROW ); - xSlideShow.set( xSlideShowController->getSlideShow(), uno::UNO_QUERY_THROW ); + xSlideShowController.set( xPresentation->getController(), uno::UNO_SET_THROW ); + xSlideShow.set( xSlideShowController->getSlideShow(), uno::UNO_SET_THROW ); } catch (uno::RuntimeException &) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index c8ec19cdaecd..6700b17bed72 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1053,7 +1053,7 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp { try { - mxShow.set( createSlideShow(), UNO_QUERY_THROW ); + mxShow.set( createSlideShow(), UNO_SET_THROW ); mxView = new SlideShowView( *mpShowWindow, @@ -1477,7 +1477,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape ) #if HAVE_FEATURE_AVMEDIA try { - mxPlayer.set(avmedia::MediaWindow::createPlayer(pEvent->maStrBookmark, ""/*TODO?*/), uno::UNO_QUERY_THROW ); + mxPlayer.set(avmedia::MediaWindow::createPlayer(pEvent->maStrBookmark, ""/*TODO?*/), uno::UNO_SET_THROW ); mxPlayer->start(); } catch( uno::Exception& ) @@ -2234,7 +2234,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow() Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - xShow.set( presentation::SlideShow::create(xContext), UNO_QUERY_THROW ); + xShow.set( presentation::SlideShow::create(xContext), UNO_SET_THROW ); } catch( uno::Exception& ) { diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index 7ed2f281bb8f..71a9ddf4fc0b 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -186,7 +186,7 @@ SlideShowView::SlideShowView( ShowWindow& rOutputWindow, bool bFullScreen ) : SlideShowView_Base( m_aMutex ), mpCanvas( ::cppcanvas::VCLFactory::createSpriteCanvas( rOutputWindow ) ), - mxWindow( VCLUnoHelper::GetInterface( &rOutputWindow ), uno::UNO_QUERY_THROW ), + mxWindow( VCLUnoHelper::GetInterface( &rOutputWindow ), uno::UNO_SET_THROW ), mxWindowPeer( mxWindow, uno::UNO_QUERY_THROW ), mxPointer(), mpSlideShow( pSlideShow ), diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 64e6e457aca7..478e065ae40a 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -155,7 +155,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>& try { Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier( mrSlideSorter.GetModel().GetDocument()->getUnoModel(), UNO_QUERY_THROW ); - Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); + Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW ); // Iterate over all pages that were selected when this method was called // and delete the draw page the notes page. The iteration is done in @@ -188,7 +188,7 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>& try { Reference<drawing::XMasterPagesSupplier> xDrawPagesSupplier( mrSlideSorter.GetModel().GetDocument()->getUnoModel(), UNO_QUERY_THROW ); - Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getMasterPages(), UNO_QUERY_THROW ); + Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getMasterPages(), UNO_SET_THROW ); // Iterate over all pages that were selected when this method was called // and delete the draw page the notes page. The iteration is done in diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 5b7faa4f1e74..3e6b665b5245 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -108,7 +108,7 @@ TableDesignWidget::TableDesignWidget( VclBuilderContainer* pParent, ViewShellBas mxView.set(mrBase.GetController(), UNO_QUERY); addListener(); - Reference< XController > xController( mrBase.GetController(), UNO_QUERY_THROW ); + Reference< XController > xController( mrBase.GetController(), UNO_SET_THROW ); Reference< XStyleFamiliesSupplier > xFamiliesSupp( xController->getModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() ); const OUString sFamilyName( "table" ); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index a1ae1c4c3197..55186e478033 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2788,13 +2788,13 @@ void SdMasterPage::setBackground( const Any& rValue ) { if( GetModel() && IsImpressDocument() ) { - Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_QUERY_THROW ); + Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW ); Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ) ; OUString aStyleName(sUNO_PseudoSheet_Background); Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( aStyleName ), UNO_QUERY_THROW ); - Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_QUERY_THROW ); + Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_SET_THROW ); Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY ); PropertyEntryVector_t aBackgroundProperties = ImplGetPageBackgroundPropertySet()->getPropertyMap().getPropertyEntries(); @@ -2825,9 +2825,9 @@ void SdMasterPage::setBackground( const Any& rValue ) { SdUnoPageBackground* pBackground = new SdUnoPageBackground(); - Reference< beans::XPropertySetInfo > xInputSetInfo( xInputSet->getPropertySetInfo(), UNO_QUERY_THROW ); + Reference< beans::XPropertySetInfo > xInputSetInfo( xInputSet->getPropertySetInfo(), UNO_SET_THROW ); Reference< beans::XPropertySet > xDestSet( static_cast<beans::XPropertySet*>(pBackground) ); - Reference< beans::XPropertySetInfo > xDestSetInfo( xDestSet->getPropertySetInfo(), UNO_QUERY_THROW ); + Reference< beans::XPropertySetInfo > xDestSetInfo( xDestSet->getPropertySetInfo(), UNO_SET_THROW ); uno::Sequence< beans::Property> aProperties( xDestSetInfo->getProperties() ); sal_Int32 nCount = aProperties.getLength(); @@ -2885,7 +2885,7 @@ void SdMasterPage::getBackground( Any& rValue ) { if( IsImpressDocument() ) { - Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_QUERY_THROW ); + Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW ); Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ); const OUString aStyleName(sUNO_PseudoSheet_Background); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index b478b6d93658..9c2e7d5f5c11 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -373,7 +373,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) Reference<XControllerManager> xControllerManager ( GetViewShellBase().GetController(), UNO_QUERY_THROW); Reference<XConfigurationController> xConfigurationController ( - xControllerManager->getConfigurationController(), UNO_QUERY_THROW ); + xControllerManager->getConfigurationController(), UNO_SET_THROW ); Reference<XConfiguration> xConfiguration ( xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW ); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 31bcd12d03b9..3453cf3ae1f2 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -85,7 +85,7 @@ void DrawViewShell::DeleteActualPage() try { Reference<XDrawPagesSupplier> xDrawPagesSupplier( GetDoc()->getUnoModel(), UNO_QUERY_THROW ); - Reference<XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); + Reference<XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW ); Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW ); xPages->remove( xPage ); } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index c38a82d385f7..7de76723d82a 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1523,7 +1523,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( pMarkedObj ); - Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), UNO_QUERY_THROW ); + Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), UNO_SET_THROW ); Reference< beans::XPropertySet > xPropSet( xControlModel, UNO_QUERY_THROW ); xPropSet->setPropertyValue("Label" , Any( rText ) ); @@ -1567,7 +1567,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, OBJ_FM_BUTTON)); //, //mpDrawView->GetSdrPageView()->GetPage())); - Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); + Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_SET_THROW ); Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue( "Label" , Any( rText ) ); diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index e0a0e031f89f..7c48e20a95d8 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -128,9 +128,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) if(pUnoCtrl) try { - uno::Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); + uno::Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_SET_THROW ); form::FormButtonType eButtonType = form::FormButtonType_URL; const OUString sButtonType( "ButtonType" ); |