summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 10:13:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-13 08:15:27 +0200
commita361231b1363d072d737e9b1d411b71aa9550d84 (patch)
tree08641fe2af10c1f22c7fd58e62f99b6dbe301c62 /scripting
parentce76026231d9536d2025a1e69f435bcbf39fe4f8 (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 'scripting')
-rw-r--r--scripting/source/dlgprov/DialogModelProvider.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx6
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx2
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx6
-rw-r--r--scripting/source/provider/MasterScriptProviderFactory.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/scripting/source/dlgprov/DialogModelProvider.cxx b/scripting/source/dlgprov/DialogModelProvider.cxx
index afd4628e9ed1..bd9525a5bc5b 100644
--- a/scripting/source/dlgprov/DialogModelProvider.cxx
+++ b/scripting/source/dlgprov/DialogModelProvider.cxx
@@ -61,7 +61,7 @@ void SAL_CALL DialogModelProvider::initialize(const css::uno::Sequence< uno::Any
aDialogSourceURLAny <<= sURL;
Reference< frame::XModel > xModel;
- m_xDialogModel.set( dlgprov::lcl_createDialogModel( m_xContext, xInput , xModel, xStringResourceManager, aDialogSourceURLAny ), UNO_QUERY_THROW);
+ m_xDialogModel.set( dlgprov::lcl_createDialogModel( m_xContext, xInput , xModel, xStringResourceManager, aDialogSourceURLAny ), UNO_SET_THROW);
m_xDialogModelProp.set(m_xDialogModel, UNO_QUERY_THROW);
}
}
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index a1184e8eeb49..64f12bfb9350 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -104,7 +104,7 @@ namespace dlgprov
Reference< task::XInteractionHandler > xDummyHandler;
aArgs[5] <<= xDummyHandler;
- Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_QUERY_THROW );
+ Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_SET_THROW );
// TODO: Ctor
Reference< resource::XStringResourceManager > xStringResourceManager( xSMgr_->createInstanceWithContext
( "com.sun.star.resource.StringResourceWithLocation",
@@ -119,7 +119,7 @@ namespace dlgprov
}
Reference< container::XNameContainer > lcl_createControlModel(const Reference< XComponentContext >& i_xContext)
{
- Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_QUERY_THROW );
+ Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_SET_THROW );
Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", i_xContext ), UNO_QUERY_THROW );
return xControlModel;
}
@@ -417,7 +417,7 @@ namespace dlgprov
Any aDialogSourceURLAny;
aDialogSourceURLAny <<= aURL;
- Reference< container::XNameContainer > xDialogModel( createDialogModel( xInput , xStringResourceManager, aDialogSourceURLAny ), UNO_QUERY_THROW);
+ Reference< container::XNameContainer > xDialogModel( createDialogModel( xInput , xStringResourceManager, aDialogSourceURLAny ), UNO_SET_THROW);
xCtrlModel.set( xDialogModel, UNO_QUERY );
}
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 8a4cffec6deb..07c4353893d6 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -392,7 +392,7 @@ void ScriptProtocolHandler::createScriptProvider()
Any aContext;
if ( getScriptInvocation() )
aContext <<= m_xScriptInvocation;
- m_xScriptProvider.set( xFac->createScriptProvider( aContext ), UNO_QUERY_THROW );
+ m_xScriptProvider.set( xFac->createScriptProvider( aContext ), UNO_SET_THROW );
}
}
catch ( const Exception & e )
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 6621d5453737..d3fc898086b8 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -293,7 +293,7 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
{
try
{
- Reference< frame::XModel > model( MiscUtils::tDocUrlToModel( openDocs[ i ] ), UNO_QUERY_THROW );
+ Reference< frame::XModel > model( MiscUtils::tDocUrlToModel( openDocs[ i ] ), UNO_SET_THROW );
// #i44599 Check if it's a real document or something special like Hidden/Preview
css::uno::Reference< css::frame::XController > xCurrentController = model->getCurrentController();
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index d3fd5a28f489..8daa183d5ec8 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -206,7 +206,7 @@ void MasterScriptProvider::createPkgProvider()
provider::theMasterScriptProviderFactory::get( m_xContext );
m_xMSPPkg.set(
- xFac->createScriptProvider( location ), UNO_QUERY_THROW );
+ xFac->createScriptProvider( location ), UNO_SET_THROW );
}
catch ( const Exception& e )
@@ -316,7 +316,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
{
xScriptProvider.set(
providerCache()->getProvider( serviceName ),
- UNO_QUERY_THROW );
+ UNO_SET_THROW );
}
catch( const Exception& e )
{
@@ -334,7 +334,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
provider::theMasterScriptProviderFactory::get( m_xContext );
Reference< provider::XScriptProvider > xSP(
- xFac_->createScriptProvider( makeAny( location ) ), UNO_QUERY_THROW );
+ xFac_->createScriptProvider( makeAny( location ) ), UNO_SET_THROW );
xScript = xSP->getScript( scriptURI );
}
diff --git a/scripting/source/provider/MasterScriptProviderFactory.cxx b/scripting/source/provider/MasterScriptProviderFactory.cxx
index f7798f8d195e..5cfb70e7d7f5 100644
--- a/scripting/source/provider/MasterScriptProviderFactory.cxx
+++ b/scripting/source/provider/MasterScriptProviderFactory.cxx
@@ -46,7 +46,7 @@ MasterScriptProviderFactory::~MasterScriptProviderFactory()
Reference< provider::XScriptProvider > SAL_CALL
MasterScriptProviderFactory::createScriptProvider( const Any& context )
{
- Reference< provider::XScriptProvider > xMsp( getActiveMSPList() ->getMSPFromAnyContext( context ), UNO_QUERY_THROW );
+ Reference< provider::XScriptProvider > xMsp( getActiveMSPList() ->getMSPFromAnyContext( context ), UNO_SET_THROW );
return xMsp;
}