summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/api/querycontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/core/api/querycontainer.cxx')
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 90961e5efaa5..6ffb4740307b 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -66,7 +66,7 @@ DBG_NAME(OQueryContainer)
OQueryContainer::OQueryContainer(
const Reference< XNameContainer >& _rxCommandDefinitions
, const Reference< XConnection >& _rxConn
- , const Reference< XMultiServiceFactory >& _rxORB,
+ , const Reference< XComponentContext >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings)
:ODefinitionContainer(_rxORB,NULL,TContentPtr(new ODefinitionContainer_Impl))
,m_pWarnings( _pWarnings )
@@ -154,7 +154,9 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
throw DisposedException( ::rtl::OUString(), *this );
// first clone this object's CommandDefinition part
- Reference< XPropertySet > xCommandDefinitionPart( m_aContext.createComponent( (::rtl::OUString)SERVICE_SDB_QUERYDEFINITION ), UNO_QUERY_THROW );
+ Reference< XPropertySet > xCommandDefinitionPart(
+ m_aContext->getServiceManager()->createInstanceWithContext( SERVICE_SDB_QUERYDEFINITION, m_aContext),
+ UNO_QUERY_THROW );
::comphelper::copyProperties( _rxDesc, xCommandDefinitionPart );
// TODO : the columns part of the descriptor has to be copied
@@ -343,11 +345,11 @@ Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XConte
Reference< XContent > xReturn;
if ( xContainer .is() )
{
- xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext.getLegacyServiceFactory(), m_pWarnings );
+ xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext, m_pWarnings );
}
else
{
- OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext.getLegacyServiceFactory() );
+ OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext );
xReturn = pNewObject;
pNewObject->setWarningsContainer( m_pWarnings );