[Libreoffice-commits] .: 2 commits - connectivity/source ucb/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 5 23:18:43 PST 2012
connectivity/source/drivers/evoab2/NDriver.hxx | 5 ++++-
connectivity/source/drivers/evoab2/NStatement.cxx | 2 +-
ucb/source/ucp/gio/gio_content.cxx | 6 +++---
ucb/source/ucp/gio/gio_provider.cxx | 9 +++++----
ucb/source/ucp/gio/gio_provider.hxx | 2 +-
5 files changed, 14 insertions(+), 10 deletions(-)
New commits:
commit efe0cbe6da64b2e150331112becade0ac3a53555
Author: David Tardon <dtardon at redhat.com>
Date: Tue Nov 6 08:15:47 2012 +0100
fdo#46808 adapt evoab driver
Change-Id: I4debeba1b9637fdaaa369a28c9a6c98a4729d76e
diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx
index e255a32..a6bcf2e 100644
--- a/connectivity/source/drivers/evoab2/NDriver.hxx
+++ b/connectivity/source/drivers/evoab2/NDriver.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/compbase2.hxx>
#include "connectivity/CommonTools.hxx"
#include <osl/module.h>
@@ -79,7 +80,9 @@ namespace connectivity
public:
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- & getMSFactory(void) const { return m_xFactory; }
+ & getMSFactory(void) const { return m_xFactory; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ getComponentContext( ) const { return comphelper::getComponentContext( m_xFactory ); }
// static methods
static sal_Bool acceptsURL_Stat( const ::rtl::OUString& url );
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 6c0de19..bd377e5 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -55,7 +55,7 @@ OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection)
, m_xResultSet(NULL)
, m_pResultSet(NULL)
, m_pConnection(_pConnection)
- , m_aParser(_pConnection->getDriver().getMSFactory())
+ , m_aParser(_pConnection->getDriver().getComponentContext())
, m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL )
, m_pParseTree(NULL)
, m_nMaxFieldSize(0)
commit b50610f0fa35cf1a5f1e8f26f2a33dba5f0ffd01
Author: David Tardon <dtardon at redhat.com>
Date: Tue Nov 6 08:15:22 2012 +0100
fdo#46808 adapt GIO provider
Change-Id: I63d2c4a3e4b83ef94c309223c78fb2f93ccf251e
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index b19e98b..32fecc2 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -599,7 +599,7 @@ sal_Bool Content::exchangeIdentity( const uno::Reference< ucb::XContentIdentifie
0, aOldURL.getLength(), xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
@@ -730,7 +730,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
rtl::OUString aNewURL = getParentURL();
aNewURL += rtl::OUString( newName, strlen(newName), RTL_TEXTENCODING_UTF8 );
uno::Reference< ucb::XContentIdentifier > xNewId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL );
+ = new ::ucbhelper::ContentIdentifier( aNewURL );
if (!exchangeIdentity( xNewId ) )
{
@@ -1158,7 +1158,7 @@ uno::Reference< ucb::XContent >
name = create_document ? "[New_Content]" : "[New_Collection]";
aURL += rtl::OUString::createFromAscii( name );
- uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(m_xSMgr, aURL));
+ uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(aURL));
try
{
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index 40a744a..bbd7531 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -51,7 +51,8 @@ ContentProvider::queryContent(
try
{
- xContent = new ::gio::Content(m_xSMgr, this, Identifier);
+ uno::Reference<lang::XMultiServiceFactory> xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW);
+ xContent = new ::gio::Content(xMSF, this, Identifier);
}
catch ( com::sun::star::ucb::ContentCreationException const & )
{
@@ -65,8 +66,8 @@ ContentProvider::queryContent(
}
ContentProvider::ContentProvider(
- const uno::Reference< lang::XMultiServiceFactory >& rSMgr )
-: ::ucbhelper::ContentProviderImplHelper( rSMgr )
+ const uno::Reference< uno::XComponentContext >& rxContext )
+: ::ucbhelper::ContentProviderImplHelper( rxContext )
{
}
@@ -84,7 +85,7 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
lang::XServiceInfo,
com::sun::star::ucb::XContentProvider );
-XSERVICEINFO_IMPL_1( ContentProvider,
+XSERVICEINFO_IMPL_1_CTX( ContentProvider,
rtl::OUString( "com.sun.star.comp.GIOContentProvider" ),
rtl::OUString( "com.sun.star.ucb.GIOContentProvider" ) );
diff --git a/ucb/source/ucp/gio/gio_provider.hxx b/ucb/source/ucp/gio/gio_provider.hxx
index b3cfef6..076a9c7 100644
--- a/ucb/source/ucp/gio/gio_provider.hxx
+++ b/ucb/source/ucp/gio/gio_provider.hxx
@@ -32,7 +32,7 @@ class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
{
public:
ContentProvider( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& rSMgr );
+ ::com::sun::star::uno::XComponentContext >& rxContext );
virtual ~ContentProvider();
// XInterface
More information about the Libreoffice-commits
mailing list