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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docinf.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
8 files changed, 10 insertions, 10 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index af3e99c930fa..14c5d98ca5d2 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -240,7 +240,7 @@ static uno::Reference<rdf::XURI> const & getURI(uno::Reference< uno::XComponentContext > const & i_xContext) { static uno::Reference< rdf::XURI > xURI( - rdf::URI::createKnown(i_xContext, Constant), uno::UNO_QUERY_THROW); + rdf::URI::createKnown(i_xContext, Constant), uno::UNO_SET_THROW); return xURI; } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 294a68b7c94b..578b1f74e41f 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -791,7 +791,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name, for (sal_Int32 i = 0; i < i_rValue.getLength(); ++i) { css::uno::Reference<css::xml::dom::XElement> xElem( m_xDoc->createElementNS(getNameSpace(i_name), name), - css::uno::UNO_QUERY_THROW); + css::uno::UNO_SET_THROW); css::uno::Reference<css::xml::dom::XNode> xNode(xElem, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::xml::dom::XNode> xTextNode( @@ -939,7 +939,7 @@ SfxDocumentMetaData::updateElement(const char *i_name, if (nullptr != i_pAttrs) { css::uno::Reference<css::xml::dom::XElement> xElem( m_xDoc->createElementNS(getNameSpace(i_name), name), - css::uno::UNO_QUERY_THROW); + css::uno::UNO_SET_THROW); xNode.set(xElem, css::uno::UNO_QUERY_THROW); // set attributes for (auto const& elem : *i_pAttrs) diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 6960064e147b..b58dfd81bca1 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -146,7 +146,7 @@ ErrCode LoadOlePropertySet( if( xCustomSect.get() ) { uno::Reference < beans::XPropertyContainer > xUserDefined( - i_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW); + i_xDocProps->getUserDefinedProperties(), uno::UNO_SET_THROW); ::std::vector< sal_Int32 > aPropIds; xCustomSect->GetPropertyIds( aPropIds ); for( const auto& rPropId : aPropIds ) diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 67702b9c0ef5..23257dbc5949 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -2743,7 +2743,7 @@ void SfxURLRelocator_Impl::implExpandURL( OUString& io_url ) { if ( !mxMacroExpander.is() ) { - mxMacroExpander.set( theMacroExpander::get(mxContext), UNO_QUERY_THROW ); + mxMacroExpander.set( theMacroExpander::get(mxContext), UNO_SET_THROW ); } io_url = mxMacroExpander->expandMacros( io_url ); } diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index e0ea4437af31..2ece4b9a6e6c 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1377,7 +1377,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon ::framework::DocumentUndoGuard aUndoGuard( _rxScriptContext.get() ); // obtain the script, and execute it - Reference< provider::XScript > xScript( xScriptProvider->getScript( _rScriptURL ), UNO_QUERY_THROW ); + Reference< provider::XScript > xScript( xScriptProvider->getScript( _rScriptURL ), UNO_SET_THROW ); if ( pCaller && pCaller->hasValue() ) { Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 7261d429d919..4caf74eb15c6 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -799,7 +799,7 @@ void IMPL_SfxBaseModel_DataContainer::impl_setDocumentProperties( const Reference< document::XDocumentProperties >& rxNewDocProps) { - m_xDocumentProperties.set(rxNewDocProps, UNO_QUERY_THROW); + m_xDocumentProperties.set(rxNewDocProps, UNO_SET_THROW); if (m_pObjectShell.is()) { Reference<util::XModifyBroadcaster> const xMB( diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index e15415fae421..34c22ca63546 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -899,7 +899,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement ( xUIElementFactory->createUIElement( rsImplementationURL, aCreationArguments.getPropertyValues()), - UNO_QUERY_THROW); + UNO_SET_THROW); return xUIElement; } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index aeb4931a48bb..fbd3a2bd29aa 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -537,8 +537,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { const sal_Int32 FILTERFLAG_EXPORT = 0x00000002; - css::uno::Reference< lang::XMultiServiceFactory > xSMGR(::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW); - css::uno::Reference< uno::XComponentContext > xContext(::comphelper::getProcessComponentContext(), css::uno::UNO_QUERY_THROW); + css::uno::Reference< lang::XMultiServiceFactory > xSMGR(::comphelper::getProcessServiceFactory(), css::uno::UNO_SET_THROW); + css::uno::Reference< uno::XComponentContext > xContext(::comphelper::getProcessComponentContext(), css::uno::UNO_SET_THROW); css::uno::Reference< css::frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); css::uno::Reference< css::frame::XModel > xModel; |