summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-31 15:30:37 +0200
committerNoel Grandin <noel@peralex.com>2013-06-03 10:00:02 +0200
commit2838b8eb5ead00780ed9ed9410abee8b8d53a9a4 (patch)
tree9adc985fafa8e87435546cee5e64aa6d83ef1fe3
parent28e3aff576f06b0b02c7232da5d723e865b3c7ed (diff)
fdo#46808, Convert ComponentContext in connectivity,extension..
...modules. Change-Id: Ie61976dc12b514bb85ca42496c0d9173a1c56264
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx6
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx12
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx31
-rw-r--r--connectivity/source/manager/mdrivermanager.hxx18
-rw-r--r--connectivity/source/simpledbt/dbtfactory.cxx5
-rw-r--r--connectivity/source/simpledbt/dbtfactory.hxx4
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx3
-rw-r--r--extensions/source/logging/consolehandler.cxx4
-rw-r--r--extensions/source/logging/csvformatter.cxx14
-rw-r--r--extensions/source/logging/filehandler.cxx8
-rw-r--r--extensions/source/logging/logger.cxx14
-rw-r--r--extensions/source/logging/loggerconfig.cxx15
-rw-r--r--extensions/source/logging/loggerconfig.hxx8
-rw-r--r--extensions/source/logging/plaintextformatter.cxx14
-rw-r--r--extensions/source/propctrlr/defaultforminspection.cxx8
-rw-r--r--extensions/source/propctrlr/defaultforminspection.hxx2
-rw-r--r--extensions/source/propctrlr/defaulthelpprovider.cxx9
-rw-r--r--extensions/source/propctrlr/defaulthelpprovider.hxx5
-rw-r--r--extensions/source/propctrlr/formcontroller.cxx2
-rw-r--r--extensions/source/propctrlr/inspectormodelbase.cxx3
-rw-r--r--extensions/source/propctrlr/inspectormodelbase.hxx5
-rw-r--r--extensions/source/propctrlr/objectinspectormodel.cxx8
-rw-r--r--forms/source/component/ComboBox.cxx4
-rw-r--r--forms/source/component/Edit.cxx2
-rw-r--r--forms/source/component/ListBox.cxx2
-rw-r--r--forms/source/component/Pattern.cxx2
-rw-r--r--include/connectivity/dbmetadata.hxx8
-rw-r--r--include/connectivity/formattedcolumnvalue.hxx7
-rw-r--r--include/connectivity/virtualdbtools.hxx8
-rw-r--r--include/svx/databaselocationinput.hxx4
-rw-r--r--include/svx/dbtoolsclient.hxx2
-rw-r--r--svx/source/fmcomp/gridcell.cxx8
-rw-r--r--svx/source/form/databaselocationinput.cxx18
-rw-r--r--svx/source/form/dbtoolsclient.cxx2
-rw-r--r--svx/source/inc/gridcell.hxx7
35 files changed, 114 insertions, 158 deletions
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 79881a425d73..788fc88dd0a5 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -38,7 +38,6 @@
#include <tools/diagnose_ex.h>
#include <comphelper/namedvaluecollection.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <sal/macros.h>
@@ -56,6 +55,7 @@ namespace dbtools
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::container::XChild;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::beans::XPropertySet;
@@ -364,7 +364,7 @@ namespace dbtools
}
//--------------------------------------------------------------------
- bool DatabaseMetaData::supportsUserAdministration( const ::comphelper::ComponentContext& _rContext ) const
+ bool DatabaseMetaData::supportsUserAdministration( const Reference<XComponentContext>& _rContext ) const
{
lcl_checkConnected( *m_pImpl );
@@ -377,7 +377,7 @@ namespace dbtools
if ( !xUsersSupp.is() )
{
// - or at the driver manager
- Reference< XDriverManager2 > xDriverManager = DriverManager::create( _rContext.getUNOContext() );
+ Reference< XDriverManager2 > xDriverManager = DriverManager::create( _rContext );
Reference< XDataDefinitionSupplier > xDriver( xDriverManager->getDriverByURL( m_pImpl->xConnectionMetaData->getURL() ), UNO_QUERY );
if ( xDriver.is() )
xUsersSupp.set( xDriver->getDataDefinitionByConnection( m_pImpl->xConnection ), UNO_QUERY );
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index daff9098e88a..625872fa22c3 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -33,7 +33,6 @@
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <comphelper/numbers.hxx>
-#include <comphelper/componentcontext.hxx>
#include <unotools/sharedunocomponent.hxx>
//........................................................................
@@ -49,6 +48,7 @@ namespace dbtools
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::sdbc::XRowSet;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::util::NumberFormatter;
@@ -184,7 +184,7 @@ namespace dbtools
}
//................................................................
- void lcl_initColumnDataValue_nothrow( const ::comphelper::ComponentContext& i_rContext, FormattedColumnValue_Data& i_rData,
+ void lcl_initColumnDataValue_nothrow( const Reference<XComponentContext>& i_rContext, FormattedColumnValue_Data& i_rData,
const Reference< XRowSet >& i_rRowSet, const Reference< XPropertySet >& i_rColumn )
{
OSL_PRECOND( i_rRowSet.is(), "lcl_initColumnDataValue_nothrow: no row set!" );
@@ -196,10 +196,10 @@ namespace dbtools
{
// get the number formats supplier of the connection of the form
Reference< XConnection > xConnection( getConnection( i_rRowSet ), UNO_QUERY_THROW );
- Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection, sal_True, i_rContext.getUNOContext() ), UNO_SET_THROW );
+ Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection, sal_True, i_rContext ), UNO_SET_THROW );
// create a number formatter for it
- xNumberFormatter.set( NumberFormatter::create(i_rContext.getUNOContext()), UNO_QUERY_THROW );
+ xNumberFormatter.set( NumberFormatter::create( i_rContext ), UNO_QUERY_THROW );
xNumberFormatter->attachNumberFormatsSupplier( xSupplier );
}
catch( const Exception& )
@@ -215,11 +215,11 @@ namespace dbtools
//= FormattedColumnValue
//====================================================================
//--------------------------------------------------------------------
- FormattedColumnValue::FormattedColumnValue( const ::comphelper::ComponentContext& i_rContext,
+ FormattedColumnValue::FormattedColumnValue( const Reference< XComponentContext >& _rxContext,
const Reference< XRowSet >& _rxRowSet, const Reference< XPropertySet >& i_rColumn )
:m_pData( new FormattedColumnValue_Data )
{
- lcl_initColumnDataValue_nothrow( i_rContext, *m_pData, _rxRowSet, i_rColumn );
+ lcl_initColumnDataValue_nothrow( _rxContext, *m_pData, _rxRowSet, i_rColumn );
}
//--------------------------------------------------------------------
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 6c40bb8f3d00..6458cf046c89 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -65,7 +65,7 @@ class ODriverEnumeration : public ::cppu::WeakImplHelper1< XEnumeration >
{
friend class OSDBCDriverManager;
- DECLARE_STL_VECTOR( SdbcDriver, DriverArray );
+ DECLARE_STL_VECTOR( Reference< XDriver >, DriverArray );
DriverArray m_aDrivers;
ConstDriverArrayIterator m_aPos;
// order matters!
@@ -127,9 +127,9 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
};
/// an STL functor which extracts a SdbcDriver from a DriverAccess
- struct ExtractDriverFromAccess : public ::std::unary_function< DriverAccess, SdbcDriver >
+ struct ExtractDriverFromAccess : public ::std::unary_function< DriverAccess, Reference<XDriver> >
{
- SdbcDriver operator()( const DriverAccess& _rAccess ) const
+ Reference<XDriver> operator()( const DriverAccess& _rAccess ) const
{
return _rAccess.xDriver;
}
@@ -142,16 +142,16 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
ExtractAfterLoad() : ExtractAfterLoad_BASE( ExtractDriverFromAccess(), EnsureDriver() ) { }
};
- struct ExtractDriverFromCollectionElement : public ::std::unary_function< DriverCollection::value_type, SdbcDriver >
+ struct ExtractDriverFromCollectionElement : public ::std::unary_function< DriverCollection::value_type, Reference<XDriver> >
{
- SdbcDriver operator()( const DriverCollection::value_type& _rElement ) const
+ Reference<XDriver> operator()( const DriverCollection::value_type& _rElement ) const
{
return _rElement.second;
}
};
// predicate for checking whether or not a driver accepts a given URL
- class AcceptsURL : public ::std::unary_function< SdbcDriver, bool >
+ class AcceptsURL : public ::std::unary_function< Reference<XDriver>, bool >
{
protected:
const OUString& m_rURL;
@@ -161,7 +161,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
AcceptsURL( const OUString& _rURL ) : m_rURL( _rURL ) { }
//.................................................................
- bool operator()( const SdbcDriver& _rDriver ) const
+ bool operator()( const Reference<XDriver>& _rDriver ) const
{
// ask the driver
if ( _rDriver.is() && _rDriver->acceptsURL( m_rURL ) )
@@ -172,7 +172,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
}
};
- static sal_Int32 lcl_getDriverPrecedence( const ::comphelper::ComponentContext& _rContext, Sequence< OUString >& _rPrecedence )
+ static sal_Int32 lcl_getDriverPrecedence( const Reference<XComponentContext>& _rContext, Sequence< OUString >& _rPrecedence )
{
_rPrecedence.realloc( 0 );
try
@@ -185,8 +185,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
// create a configuration provider
Reference< XMultiServiceFactory > xConfigurationProvider(
- com::sun::star::configuration::theDefaultProvider::get(
- _rContext.getUNOContext() ) );
+ com::sun::star::configuration::theDefaultProvider::get( _rContext ) );
// one argument for creating the node access: the path to the configuration node
Sequence< Any > aCreationArgs(1);
@@ -242,9 +241,9 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
//==========================================================================
//--------------------------------------------------------------------------
OSDBCDriverManager::OSDBCDriverManager( const Reference< XComponentContext >& _rxContext )
- :m_aContext( _rxContext )
+ :m_xContext( _rxContext )
,m_aEventLogger( _rxContext, "org.openoffice.logging.sdbc.DriverManager" )
- ,m_aDriverConfig(m_aContext.getUNOContext())
+ ,m_aDriverConfig(m_xContext)
,m_nLoginTimeout(0)
{
// bootstrap all objects supporting the .sdb.Driver service
@@ -261,7 +260,7 @@ OSDBCDriverManager::~OSDBCDriverManager()
void OSDBCDriverManager::bootstrapDrivers()
{
- Reference< XContentEnumerationAccess > xEnumAccess( m_aContext.getLegacyServiceFactory(), UNO_QUERY );
+ Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY );
Reference< XEnumeration > xEnumDrivers;
if (xEnumAccess.is())
xEnumDrivers = xEnumAccess->createContentEnumeration(SERVICE_SDBC_DRIVER);
@@ -288,7 +287,7 @@ void OSDBCDriverManager::bootstrapDrivers()
{ // yes -> no need to load the driver immediately (load it later when needed)
aDriverDescriptor.sImplementationName = xSI->getImplementationName();
aDriverDescriptor.xComponentFactory = xFactory;
- aDriverDescriptor.xUNOContext = m_aContext.getUNOContext();
+ aDriverDescriptor.xUNOContext = m_xContext;
bValidDescriptor = sal_True;
m_aEventLogger.log( LogLevel::CONFIG,
@@ -299,7 +298,7 @@ void OSDBCDriverManager::bootstrapDrivers()
else
{
// no -> create the driver
- Reference< XDriver > xDriver( xFactory->createInstanceWithContext( m_aContext.getUNOContext() ), UNO_QUERY );
+ Reference< XDriver > xDriver( xFactory->createInstanceWithContext( m_xContext ), UNO_QUERY );
OSL_ENSURE( xDriver.is(), "OSDBCDriverManager::bootstrapDrivers: a driver which is no driver?!" );
if ( xDriver.is() )
@@ -341,7 +340,7 @@ void OSDBCDriverManager::initializeDriverPrecedence()
{
// get the precedence of the drivers from the configuration
Sequence< OUString > aDriverOrder;
- if ( 0 == lcl_getDriverPrecedence( m_aContext, aDriverOrder ) )
+ if ( 0 == lcl_getDriverPrecedence( m_xContext, aDriverOrder ) )
// nothing to do
return;
diff --git a/connectivity/source/manager/mdrivermanager.hxx b/connectivity/source/manager/mdrivermanager.hxx
index 8fae89d3d718..be1e2586e9c3 100644
--- a/connectivity/source/manager/mdrivermanager.hxx
+++ b/connectivity/source/manager/mdrivermanager.hxx
@@ -31,7 +31,6 @@
#include <cppuhelper/implbase3.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/logging.hxx>
-#include <comphelper/componentcontext.hxx>
#include <osl/mutex.hxx>
#include "connectivity/DriversConfig.hxx"
@@ -41,17 +40,14 @@ namespace drivermanager
//======================================================================
//= various
//======================================================================
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > SdbcDriver;
- DECLARE_STL_USTRINGACCESS_MAP( SdbcDriver, DriverCollection );
+ DECLARE_STL_USTRINGACCESS_MAP( css::uno::Reference< css::sdbc::XDriver >, DriverCollection );
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > DriverFactory;
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > UNOContext;
struct DriverAccess
{
- OUString sImplementationName; /// the implementation name of the driver
- DriverFactory xComponentFactory; /// the factory to create the driver component (if not already done so)
- UNOContext xUNOContext; /// ensure UNO context propagation
- SdbcDriver xDriver; /// the driver itself
+ OUString sImplementationName; /// the implementation name of the driver
+ css::uno::Reference< css::sdbc::XDriver > xDriver; /// the driver itself
+ css::uno::Reference< css::lang::XSingleComponentFactory > xComponentFactory; /// the factory to create the driver component (if not already done so)
+ css::uno::Reference<css::uno::XComponentContext> xUNOContext; /// ensure UNO context propagation
};
//==========================================================================
@@ -67,7 +63,7 @@ namespace drivermanager
friend class ODriverEnumeration;
::osl::Mutex m_aMutex;
- ::comphelper::ComponentContext m_aContext;
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
::comphelper::EventLogger m_aEventLogger;
DECLARE_STL_VECTOR(DriverAccess, DriverAccessArray);
@@ -75,7 +71,7 @@ namespace drivermanager
// for drivers registered at runtime (not bootstrapped) we don't require an XServiceInfo interface,
// so we have to remember their impl-name in another way
- DECLARE_STL_USTRINGACCESS_MAP(SdbcDriver, DriverCollection);
+ DECLARE_STL_USTRINGACCESS_MAP(css::uno::Reference< css::sdbc::XDriver >, DriverCollection);
DriverCollection m_aDriversRT;
::connectivity::DriversConfig m_aDriverConfig;
diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx
index 29d000423ed0..acaa5a934754 100644
--- a/connectivity/source/simpledbt/dbtfactory.cxx
+++ b/connectivity/source/simpledbt/dbtfactory.cxx
@@ -85,10 +85,11 @@ namespace connectivity
//----------------------------------------------------------------
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue( const ::comphelper::ComponentContext& _rContext,
+ ::std::auto_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, const Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn )
{
- ::std::auto_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rContext, _rxRowSet, _rxColumn ) );
+ ::std::auto_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rxContext, _rxRowSet, _rxColumn ) );
return pValue;
}
SAL_WNODEPRECATED_DECLARATIONS_POP
diff --git a/connectivity/source/simpledbt/dbtfactory.hxx b/connectivity/source/simpledbt/dbtfactory.hxx
index 40005ecbdd9f..6dee4c83f385 100644
--- a/connectivity/source/simpledbt/dbtfactory.hxx
+++ b/connectivity/source/simpledbt/dbtfactory.hxx
@@ -44,7 +44,7 @@ namespace connectivity
// IDataAccessToolsFactory
virtual ::rtl::Reference< simple::ISQLParser > createSQLParser(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const IParseContext* _pContext
) const;
@@ -55,7 +55,7 @@ namespace connectivity
virtual ::rtl::Reference< simple::IDataAccessTools > getDataAccessTools();
virtual ::std::auto_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue(
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
);
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index a27798dab01b..0802f0ae4d61 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -26,7 +26,6 @@
#include <svl/filenotation.hxx>
#include <sfx2/docfilt.hxx>
#include <vcl/msgbox.hxx>
-#include <comphelper/componentcontext.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
//.........................................................................
@@ -56,7 +55,7 @@ namespace abp
,m_aNameLabel ( this, ModuleRes( FT_NAME_EXPL ) )
,m_aName ( this, ModuleRes( ET_DATASOURCENAME ) )
,m_aDuplicateNameError ( this, ModuleRes( FT_DUPLICATENAME ) )
- ,m_aLocationController( ::comphelper::ComponentContext( _pParent->getORB() ), m_aLocation, m_aBrowse )
+ ,m_aLocationController( _pParent->getORB(), m_aLocation, m_aBrowse )
{
FreeResource();
diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx
index 58abbf8d6d42..9c162ee3f23b 100644
--- a/extensions/source/logging/consolehandler.cxx
+++ b/extensions/source/logging/consolehandler.cxx
@@ -30,8 +30,6 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -73,7 +71,6 @@ namespace logging
,public ConsoleHandler_Base
{
private:
- ::comphelper::ComponentContext m_aContext;
LogHandlerHelper m_aHandlerHelper;
sal_Int32 m_nThreshold;
@@ -124,7 +121,6 @@ namespace logging
//--------------------------------------------------------------------
ConsoleHandler::ConsoleHandler( const Reference< XComponentContext >& _rxContext )
:ConsoleHandler_Base( m_aMutex )
- ,m_aContext( _rxContext )
,m_aHandlerHelper( _rxContext, m_aMutex, rBHelper )
,m_nThreshold( LogLevel::SEVERE )
{
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index 16d28106f661..c65624f49217 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -28,8 +28,6 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustrbuf.hxx>
@@ -65,7 +63,7 @@ namespace logging
static Reference< XInterface > Create( const Reference< XComponentContext >& context );
protected:
- CsvFormatter( const Reference< XComponentContext >& context );
+ CsvFormatter();
virtual ~CsvFormatter();
// XCsvLogFormatter
@@ -92,7 +90,6 @@ namespace logging
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
private:
- ::comphelper::ComponentContext m_aContext;
::sal_Bool m_LogEventNo;
::sal_Bool m_LogThread;
::sal_Bool m_LogTimestamp;
@@ -156,9 +153,8 @@ namespace
//= CsvFormatter - implementation
namespace logging
{
- CsvFormatter::CsvFormatter( const Reference< XComponentContext >& context )
- :m_aContext( context ),
- m_LogEventNo(true),
+ CsvFormatter::CsvFormatter()
+ :m_LogEventNo(true),
m_LogThread(true),
m_LogTimestamp(true),
m_LogSource(false),
@@ -349,9 +345,9 @@ namespace logging
return aServiceNames;
}
- Reference< XInterface > CsvFormatter::Create( const Reference< XComponentContext >& context )
+ Reference< XInterface > CsvFormatter::Create( const Reference< XComponentContext >& )
{
- return *( new CsvFormatter( context ) );
+ return *( new CsvFormatter );
}
void createRegistryInfo_CsvFormatter()
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index f4df55a03a80..93a4e71a007b 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -32,8 +32,6 @@
#include <tools/diagnose_ex.h>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -90,7 +88,7 @@ namespace logging
};
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_xContext;
LogHandlerHelper m_aHandlerHelper;
OUString m_sFileURL;
::std::auto_ptr< ::osl::File > m_pFile;
@@ -151,7 +149,7 @@ namespace logging
//--------------------------------------------------------------------
FileHandler::FileHandler( const Reference< XComponentContext >& _rxContext )
:FileHandler_Base( m_aMutex )
- ,m_aContext( _rxContext )
+ ,m_xContext( _rxContext )
,m_aHandlerHelper( _rxContext, m_aMutex, rBHelper )
,m_sFileURL( )
,m_pFile( )
@@ -229,7 +227,7 @@ namespace logging
{
try
{
- Reference< XStringSubstitution > xStringSubst(PathSubstitution::create(m_aContext.getUNOContext()));
+ Reference< XStringSubstitution > xStringSubst(PathSubstitution::create(m_xContext));
_inout_rURL = xStringSubst->substituteVariables( _inout_rURL, true );
}
catch( const Exception& )
diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx
index dc82f16ba00d..bf678f3a59e9 100644
--- a/extensions/source/logging/logger.cxx
+++ b/extensions/source/logging/logger.cxx
@@ -28,8 +28,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/logging/XLoggerPool.hpp>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -89,7 +87,6 @@ namespace logging
,public EventLogger_Base
{
private:
- ::comphelper::ComponentContext m_aContext;
::cppu::OInterfaceContainerHelper m_aHandlers;
oslInterlockedCount m_nEventNumber;
@@ -145,7 +142,7 @@ namespace logging
private:
::osl::Mutex m_aMutex;
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_xContext;
ImplPool m_aImpl;
public:
@@ -172,15 +169,14 @@ namespace logging
//====================================================================
//--------------------------------------------------------------------
EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const OUString& _rName )
- :m_aContext( _rxContext )
- ,m_aHandlers( m_aMutex )
+ :m_aHandlers( m_aMutex )
,m_nEventNumber( 0 )
,m_nLogLevel( LogLevel::OFF )
,m_sName( _rName )
{
osl_atomic_increment( &m_refCount );
{
- initializeLoggerFromConfiguration( m_aContext, this );
+ initializeLoggerFromConfiguration( _rxContext, this );
}
osl_atomic_decrement( &m_refCount );
}
@@ -306,7 +302,7 @@ namespace logging
//====================================================================
//--------------------------------------------------------------------
LoggerPool::LoggerPool( const Reference< XComponentContext >& _rxContext )
- :m_aContext( _rxContext )
+ :m_xContext( _rxContext )
{
}
@@ -364,7 +360,7 @@ namespace logging
if ( !xLogger.is() )
{
// never requested before, or already dead
- xLogger = new EventLogger( m_aContext.getUNOContext(), _rName );
+ xLogger = new EventLogger( m_xContext, _rName );
rLogger = xLogger;
}
diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx
index dae01ef2f96c..8bef4db3a7dd 100644
--- a/extensions/source/logging/loggerconfig.cxx
+++ b/extensions/source/logging/loggerconfig.cxx
@@ -37,8 +37,6 @@
#include <osl/process.h>
#include <rtl/ustrbuf.hxx>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/component_context.hxx>
#include <vector>
@@ -174,7 +172,7 @@ namespace logging
//----------------------------------------------------------------
Reference< XInterface > lcl_createInstanceFromSetting_throw(
- const ::comphelper::ComponentContext& _rContext,
+ const Reference<XComponentContext>& _rContext,
const Reference< XLogger >& _rxLogger,
const Reference< XNameAccess >& _rxLoggerSettings,
const sal_Char* _pServiceNameAsciiNodeName,
@@ -219,11 +217,13 @@ namespace logging
{
Sequence< Any > aConstructionArgs(1);
aConstructionArgs[0] <<= aSettings;
- bSuccess = _rContext.createComponentWithArguments( sServiceName, aConstructionArgs, xInstance );
+ xInstance = _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(sServiceName, aConstructionArgs, _rContext);
+ bSuccess = xInstance.is();
}
else
{
- bSuccess = _rContext.createComponent( sServiceName, xInstance );
+ xInstance = _rContext->getServiceManager()->createInstanceWithContext(sServiceName, _rContext);
+ bSuccess = xInstance.is();
}
if ( !bSuccess )
@@ -235,7 +235,7 @@ namespace logging
}
//--------------------------------------------------------------------
- void initializeLoggerFromConfiguration( const ::comphelper::ComponentContext& _rContext, const Reference< XLogger >& _rxLogger )
+ void initializeLoggerFromConfiguration( const Reference<XComponentContext>& _rContext, const Reference< XLogger >& _rxLogger )
{
try
{
@@ -243,8 +243,7 @@ namespace logging
throw NullPointerException();
Reference< XMultiServiceFactory > xConfigProvider(
- com::sun::star::configuration::theDefaultProvider::get(
- _rContext.getUNOContext()));
+ com::sun::star::configuration::theDefaultProvider::get(_rContext));
// write access to the "Settings" node (which includes settings for all loggers)
Sequence< Any > aArguments(1);
diff --git a/extensions/source/logging/loggerconfig.hxx b/extensions/source/logging/loggerconfig.hxx
index 3697ac3dbbdd..5b7c9085db64 100644
--- a/extensions/source/logging/loggerconfig.hxx
+++ b/extensions/source/logging/loggerconfig.hxx
@@ -21,11 +21,7 @@
#define EXTENSIONS_LOGGERCONFIG_HXX
#include <com/sun/star/logging/XLogger.hpp>
-
-namespace comphelper
-{
- class ComponentContext;
-}
+#include <com/sun/star/uno/XComponentContext.hpp>
//........................................................................
namespace logging
@@ -44,7 +40,7 @@ namespace logging
run, be moved to the logger implementation - not sure if it's the best place.
*/
void initializeLoggerFromConfiguration(
- const ::comphelper::ComponentContext& _rContext,
+ const css::uno::Reference<css::uno::XComponentContext>& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::logging::XLogger >& _rxLogger
);
diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx
index 7ce48752cc85..35b01a6970fd 100644
--- a/extensions/source/logging/plaintextformatter.cxx
+++ b/extensions/source/logging/plaintextformatter.cxx
@@ -26,8 +26,6 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustrbuf.hxx>
@@ -56,11 +54,8 @@ namespace logging
> PlainTextFormatter_Base;
class PlainTextFormatter : public PlainTextFormatter_Base
{
- private:
- ::comphelper::ComponentContext m_aContext;
-
protected:
- PlainTextFormatter( const Reference< XComponentContext >& _rxContext );
+ PlainTextFormatter();
virtual ~PlainTextFormatter();
// XLogFormatter
@@ -84,8 +79,7 @@ namespace logging
//= PlainTextFormatter - implementation
//====================================================================
//--------------------------------------------------------------------
- PlainTextFormatter::PlainTextFormatter( const Reference< XComponentContext >& _rxContext )
- :m_aContext( _rxContext )
+ PlainTextFormatter::PlainTextFormatter()
{
}
@@ -196,9 +190,9 @@ namespace logging
}
//--------------------------------------------------------------------
- Reference< XInterface > PlainTextFormatter::Create( const Reference< XComponentContext >& _rxContext )
+ Reference< XInterface > PlainTextFormatter::Create( const Reference< XComponentContext >& )
{
- return *( new PlainTextFormatter( _rxContext ) );
+ return *( new PlainTextFormatter );
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx
index 7fb4906752b4..c5346473d0b4 100644
--- a/extensions/source/propctrlr/defaultforminspection.cxx
+++ b/extensions/source/propctrlr/defaultforminspection.cxx
@@ -59,8 +59,8 @@ namespace pcr
//= DefaultFormComponentInspectorModel
//====================================================================
//--------------------------------------------------------------------
- DefaultFormComponentInspectorModel::DefaultFormComponentInspectorModel( const Reference< XComponentContext >& _rxContext, bool _bUseFormFormComponentHandlers )
- :ImplInspectorModel( _rxContext )
+ DefaultFormComponentInspectorModel::DefaultFormComponentInspectorModel( bool _bUseFormFormComponentHandlers )
+ :ImplInspectorModel()
,m_bUseFormComponentHandlers( _bUseFormFormComponentHandlers )
,m_bConstructed( false )
,m_pInfoService( new OPropertyInfoService )
@@ -99,9 +99,9 @@ namespace pcr
}
//------------------------------------------------------------------------
- Reference< XInterface > SAL_CALL DefaultFormComponentInspectorModel::Create( const Reference< XComponentContext >& _rxContext )
+ Reference< XInterface > SAL_CALL DefaultFormComponentInspectorModel::Create( const Reference< XComponentContext >& )
{
- return *new DefaultFormComponentInspectorModel( _rxContext );
+ return *new DefaultFormComponentInspectorModel();
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/defaultforminspection.hxx b/extensions/source/propctrlr/defaultforminspection.hxx
index 543de989a440..f167be67aa4e 100644
--- a/extensions/source/propctrlr/defaultforminspection.hxx
+++ b/extensions/source/propctrlr/defaultforminspection.hxx
@@ -66,7 +66,7 @@ namespace pcr
Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
public:
- DefaultFormComponentInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, bool _bUseFormFormComponentHandlers = true );
+ DefaultFormComponentInspectorModel( bool _bUseFormFormComponentHandlers = true );
protected:
// Service constructors
diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx
index 695159f15667..72ddb86a8fd7 100644
--- a/extensions/source/propctrlr/defaulthelpprovider.cxx
+++ b/extensions/source/propctrlr/defaulthelpprovider.cxx
@@ -61,9 +61,8 @@ namespace pcr
//= DefaultHelpProvider
//====================================================================
//--------------------------------------------------------------------
- DefaultHelpProvider::DefaultHelpProvider( const Reference< XComponentContext >& _rxContext )
- :m_aContext( _rxContext )
- ,m_bConstructed( false )
+ DefaultHelpProvider::DefaultHelpProvider()
+ :m_bConstructed( false )
{
}
@@ -87,9 +86,9 @@ namespace pcr
}
//------------------------------------------------------------------------
- Reference< XInterface > SAL_CALL DefaultHelpProvider::Create( const Reference< XComponentContext >& _rxContext )
+ Reference< XInterface > SAL_CALL DefaultHelpProvider::Create( const Reference< XComponentContext >& )
{
- return *new DefaultHelpProvider( _rxContext );
+ return *new DefaultHelpProvider;
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/defaulthelpprovider.hxx b/extensions/source/propctrlr/defaulthelpprovider.hxx
index 3d8ee8060d63..8994593ae25d 100644
--- a/extensions/source/propctrlr/defaulthelpprovider.hxx
+++ b/extensions/source/propctrlr/defaulthelpprovider.hxx
@@ -23,9 +23,9 @@
#include <com/sun/star/inspection/XPropertyControlObserver.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/inspection/XObjectInspectorUI.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <comphelper/componentcontext.hxx>
class Window;
@@ -43,13 +43,12 @@ namespace pcr
class DefaultHelpProvider : public DefaultHelpProvider_Base
{
private:
- ::comphelper::ComponentContext m_aContext;
bool m_bConstructed;
::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >
m_xInspectorUI;
public:
- DefaultHelpProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
+ DefaultHelpProvider();
// XServiceInfo - static versions
static OUString getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx
index 732c639aab5f..3a9c9ba19534 100644
--- a/extensions/source/propctrlr/formcontroller.cxx
+++ b/extensions/source/propctrlr/formcontroller.cxx
@@ -82,7 +82,7 @@ namespace pcr
osl_atomic_increment( &m_refCount );
{
Reference< XObjectInspectorModel > xModel(
- *(new DefaultFormComponentInspectorModel( _rxContext, _bUseFormFormComponentHandlers )),
+ *(new DefaultFormComponentInspectorModel( _bUseFormFormComponentHandlers )),
UNO_QUERY_THROW
);
setInspectorModel( xModel );
diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx
index d8ebe0780ec0..5c6f21ebd316 100644
--- a/extensions/source/propctrlr/inspectormodelbase.cxx
+++ b/extensions/source/propctrlr/inspectormodelbase.cxx
@@ -156,9 +156,8 @@ namespace pcr
//====================================================================
//= ImplInspectorModel
//====================================================================
- ImplInspectorModel::ImplInspectorModel( const Reference< XComponentContext >& _rxContext )
+ ImplInspectorModel::ImplInspectorModel()
:ImplInspectorModel_PBase( GetBroadcastHelper() )
- ,m_aContext( _rxContext )
,m_pProperties( new InspectorModelProperties( m_aMutex ) )
{
}
diff --git a/extensions/source/propctrlr/inspectormodelbase.hxx b/extensions/source/propctrlr/inspectormodelbase.hxx
index bc12d78a7069..86a8caca7d2b 100644
--- a/extensions/source/propctrlr/inspectormodelbase.hxx
+++ b/extensions/source/propctrlr/inspectormodelbase.hxx
@@ -23,12 +23,12 @@
#include <com/sun/star/inspection/XObjectInspectorModel.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/propshlp.hxx>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <memory>
@@ -54,14 +54,13 @@ namespace pcr
,public ImplInspectorModel_PBase
{
protected:
- ::comphelper::ComponentContext m_aContext;
::std::auto_ptr< InspectorModelProperties > m_pProperties;
protected:
~ImplInspectorModel();
public:
- ImplInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
+ ImplInspectorModel();
DECLARE_XINTERFACE()
DECLARE_XTYPEPROVIDER()
diff --git a/extensions/source/propctrlr/objectinspectormodel.cxx b/extensions/source/propctrlr/objectinspectormodel.cxx
index edd9f883f3cd..d9868d397dc4 100644
--- a/extensions/source/propctrlr/objectinspectormodel.cxx
+++ b/extensions/source/propctrlr/objectinspectormodel.cxx
@@ -59,7 +59,7 @@ namespace pcr
Sequence< Any > m_aFactories;
public:
- ObjectInspectorModel( const Reference< XComponentContext >& _rxContext );
+ ObjectInspectorModel();
// XObjectInspectorModel
virtual Sequence< Any > SAL_CALL getHandlerFactories() throw (RuntimeException);
@@ -93,8 +93,8 @@ namespace pcr
//====================================================================
//= ObjectInspectorModel
//====================================================================
- ObjectInspectorModel::ObjectInspectorModel( const Reference< XComponentContext >& _rxContext )
- :ImplInspectorModel( _rxContext )
+ ObjectInspectorModel::ObjectInspectorModel()
+ :ImplInspectorModel()
{
}
@@ -181,7 +181,7 @@ namespace pcr
//--------------------------------------------------------------------
Reference< XInterface > SAL_CALL ObjectInspectorModel::Create(const Reference< XComponentContext >& _rxContext )
{
- return *( new ObjectInspectorModel( _rxContext ) );
+ return *( new ObjectInspectorModel() );
}
//--------------------------------------------------------------------
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index b28d93577339..33c28e30bbdb 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -628,7 +628,7 @@ void OComboBoxModel::loadData( bool _bForce )
if ( !xDataField.is() )
return;
- ::dbtools::FormattedColumnValue aValueFormatter( getContext(), xForm, xDataField );
+ ::dbtools::FormattedColumnValue aValueFormatter( getContext().getUNOContext(), xForm, xDataField );
// Fill Lists
sal_Int16 i = 0;
@@ -684,7 +684,7 @@ void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
{
Reference<XPropertySet> xField = getField();
if ( xField.is() )
- m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
+ m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= m_aDesignModeStringItems;
// Only load data if a ListSource was supplied
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index e1556f33fb7a..2a1113ca8374 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -611,7 +611,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
Reference< XPropertySet > xField = getField();
if ( xField.is() )
{
- m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
+ m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
if ( m_pValueFormatter->getKeyType() != NumberFormat::SCIENTIFIC )
{
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index fe31087b12f0..29f698199d0d 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -877,7 +877,7 @@ namespace frm
if ( !xDataField.is() )
return;
- ::dbtools::FormattedColumnValue aValueFormatter( getContext(), m_xCursor, xDataField );
+ ::dbtools::FormattedColumnValue aValueFormatter( getContext().getUNOContext(), m_xCursor, xDataField );
// Get the field of BoundColumn of the ResultSet
m_nBoundColumnType = DataType::SQLNULL;
diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx
index 67335d0905e3..2d24d5f65a5f 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -189,7 +189,7 @@ void OPatternModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
if ( !xField.is() )
return;
- m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
+ m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
}
//------------------------------------------------------------------------------
diff --git a/include/connectivity/dbmetadata.hxx b/include/connectivity/dbmetadata.hxx
index 565854ba7ed8..06fcc62f548d 100644
--- a/include/connectivity/dbmetadata.hxx
+++ b/include/connectivity/dbmetadata.hxx
@@ -21,15 +21,11 @@
#define CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX
#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
#include "connectivity/dbtoolsdllapi.hxx"
-namespace comphelper
-{
- class ComponentContext;
-}
-
//........................................................................
namespace dbtools
{
@@ -170,7 +166,7 @@ namespace dbtools
the component context we operate in. Might be needed to create the
css.sdbc.DriverManager instance.
*/
- bool supportsUserAdministration( const ::comphelper::ComponentContext& _rContext ) const;
+ bool supportsUserAdministration( const css::uno::Reference<css::uno::XComponentContext>& _rContext ) const;
/** determines whether in the application UI, empty table folders (aka catalogs/schemas) should be displayed
*/
diff --git a/include/connectivity/formattedcolumnvalue.hxx b/include/connectivity/formattedcolumnvalue.hxx
index fe5c4dbfff52..79e422804351 100644
--- a/include/connectivity/formattedcolumnvalue.hxx
+++ b/include/connectivity/formattedcolumnvalue.hxx
@@ -20,10 +20,11 @@
#ifndef CONNECTIVITY_FORMATTEDCOLUMNVALUE_HXX
#define CONNECTIVITY_FORMATTEDCOLUMNVALUE_HXX
-#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sdb/XColumn.hpp>
#include <com/sun/star/sdb/XColumnUpdate.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <boost/noncopyable.hpp>
@@ -31,8 +32,6 @@
#include <memory>
#include "connectivity/dbtoolsdllapi.hxx"
-namespace comphelper { class ComponentContext; }
-
//........................................................................
namespace dbtools
{
@@ -60,7 +59,7 @@ namespace dbtools
examining its <code>ActiveConnection</code>.
*/
FormattedColumnValue(
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
);
diff --git a/include/connectivity/virtualdbtools.hxx b/include/connectivity/virtualdbtools.hxx
index 9083016fa621..10d32b3f00a7 100644
--- a/include/connectivity/virtualdbtools.hxx
+++ b/include/connectivity/virtualdbtools.hxx
@@ -76,10 +76,6 @@ namespace dbtools {
class FormattedColumnValue;
}
-namespace comphelper {
- class ComponentContext;
-}
-
//========================================================================
//= entry into this library
//========================================================================
@@ -336,7 +332,7 @@ namespace connectivity
public:
/// creates a simple version of the class OSQLParser
virtual ::rtl::Reference< ISQLParser > createSQLParser(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const IParseContext* _pContext
) const = 0;
@@ -350,7 +346,7 @@ namespace connectivity
virtual ::rtl::Reference< IDataAccessTools > getDataAccessTools() = 0;
virtual ::std::auto_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue(
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
) = 0;
diff --git a/include/svx/databaselocationinput.hxx b/include/svx/databaselocationinput.hxx
index 6acb2194a810..451e3744417c 100644
--- a/include/svx/databaselocationinput.hxx
+++ b/include/svx/databaselocationinput.hxx
@@ -21,11 +21,11 @@
#define SVX_DATABASELOCATIONINPUT_HXX
#include "svx/svxdllapi.h"
+#include "com/sun/star/uno/XComponentContext.hpp"
class PushButton;
class String;
namespace svt { class OFileURLControl; }
-namespace comphelper { class ComponentContext; }
#include <memory>
@@ -50,7 +50,7 @@ namespace svx
{
public:
DatabaseLocationInputController(
- const ::comphelper::ComponentContext& _rContext,
+ const css::uno::Reference<css::uno::XComponentContext>& _rContext,
::svt::OFileURLControl& _rLocationInput,
PushButton& _rBrowseButton
);
diff --git a/include/svx/dbtoolsclient.hxx b/include/svx/dbtoolsclient.hxx
index c1afd4690509..e927a27af7b2 100644
--- a/include/svx/dbtoolsclient.hxx
+++ b/include/svx/dbtoolsclient.hxx
@@ -188,7 +188,7 @@ namespace svxform
// ------------------------------------------------
::std::auto_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue(
- const ::comphelper::ComponentContext& _rContext,
+ const css::uno::Reference<css::uno::XComponentContext>& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
);
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 22b4716829d8..71fb78094dd6 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1762,9 +1762,9 @@ OUString DbCheckBox::GetFormatText(const Reference< XColumn >& /*_rxField*/, con
//==============================================================================
//= DbPatternField
//------------------------------------------------------------------------------
-DbPatternField::DbPatternField( DbGridColumn& _rColumn, const ::comphelper::ComponentContext& _rContext )
+DbPatternField::DbPatternField( DbGridColumn& _rColumn, const Reference<XComponentContext>& _rContext )
:DbCellControl( _rColumn )
- ,m_aContext( _rContext )
+ ,m_xContext( _rContext )
{
doPropertyListening( FM_PROP_LITERALMASK );
doPropertyListening( FM_PROP_EDITMASK );
@@ -1835,7 +1835,7 @@ OUString DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::X
{
DBToolsObjectFactory aFactory;
rpFormatter = aFactory.createFormattedColumnValue(
- m_aContext, getCursor(), Reference< XPropertySet >( _rxField, UNO_QUERY ) );
+ m_xContext, getCursor(), Reference< XPropertySet >( _rxField, UNO_QUERY ) );
OSL_ENSURE( rpFormatter.get(), "DbPatternField::Init: no value formatter!" );
}
else
@@ -2738,7 +2738,7 @@ sal_Bool DbListBox::commitControl()
DBG_NAME(DbFilterField);
/*************************************************************************/
-DbFilterField::DbFilterField(const Reference< ::com::sun::star::uno::XComponentContext >& rxContext,DbGridColumn& _rColumn)
+DbFilterField::DbFilterField(const Reference< XComponentContext >& rxContext,DbGridColumn& _rColumn)
:DbCellControl(_rColumn)
,OSQLParserClient(rxContext)
,m_nControlClass(::com::sun::star::form::FormComponentType::TEXTFIELD)
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 1fb0127e80a0..351084169a8b 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <rtl/ustrbuf.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -44,6 +43,7 @@ namespace svx
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::uno::Exception;
@@ -57,7 +57,7 @@ namespace svx
{
public:
DatabaseLocationInputController_Impl(
- const ::comphelper::ComponentContext& _rContext,
+ const Reference<XComponentContext>& _rContext,
::svt::OFileURLControl& _rLocationInput,
PushButton& _rBrowseButton
);
@@ -76,7 +76,7 @@ namespace svx
DECL_LINK( OnControlAction, VclWindowEvent* );
private:
- const ::comphelper::ComponentContext m_aContext;
+ const Reference<XComponentContext> m_xContext;
::svt::OFileURLControl& m_rLocationInput;
PushButton& m_rBrowseButton;
Sequence< OUString > m_aFilterExtensions;
@@ -85,9 +85,9 @@ namespace svx
};
//--------------------------------------------------------------------
- DatabaseLocationInputController_Impl::DatabaseLocationInputController_Impl( const ::comphelper::ComponentContext& _rContext,
+ DatabaseLocationInputController_Impl::DatabaseLocationInputController_Impl( const Reference<XComponentContext>& _rContext,
::svt::OFileURLControl& _rLocationInput, PushButton& _rBrowseButton )
- :m_aContext( _rContext )
+ :m_xContext( _rContext )
,m_rLocationInput( _rLocationInput )
,m_rBrowseButton( _rBrowseButton )
,m_aFilterExtensions()
@@ -161,7 +161,7 @@ namespace svx
// get the name of the default filter for database documents
::utl::OConfigurationTreeRoot aConfig(
::utl::OConfigurationTreeRoot::createWithComponentContext(
- m_aContext.getUNOContext(),
+ m_xContext,
OUString( "/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument" )
) );
OUString sDatabaseFilter;
@@ -169,14 +169,14 @@ namespace svx
// get the type this filter is responsible for
Reference< XNameAccess > xFilterFactory(
- m_aContext.createComponent( "com.sun.star.document.FilterFactory" ),
+ m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", m_xContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aFilterProperties( xFilterFactory->getByName( sDatabaseFilter ) );
OUString sDocumentType = aFilterProperties.getOrDefault( "Type", OUString() );
// get the extension(s) for this type
Reference< XNameAccess > xTypeDetection(
- m_aContext.createComponent( "com.sun.star.document.TypeDetection" ),
+ m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", m_xContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aTypeProperties( xTypeDetection->getByName( sDocumentType ) );
@@ -267,7 +267,7 @@ namespace svx
//= DatabaseLocationInputController
//====================================================================
//--------------------------------------------------------------------
- DatabaseLocationInputController::DatabaseLocationInputController( const ::comphelper::ComponentContext& _rContext,
+ DatabaseLocationInputController::DatabaseLocationInputController( const Reference<XComponentContext>& _rContext,
::svt::OFileURLControl& _rLocationInput, PushButton& _rBrowseButton )
:m_pImpl( new DatabaseLocationInputController_Impl( _rContext, _rLocationInput, _rBrowseButton ) )
{
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index e28da50ab4b3..f1a31da37a69 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -331,7 +331,7 @@ namespace svxform
//----------------------------------------------------------------
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< ::dbtools::FormattedColumnValue > DBToolsObjectFactory::createFormattedColumnValue(
- const ::comphelper::ComponentContext& _rContext, const Reference< XRowSet >& _rxRowSet, const Reference< XPropertySet >& _rxColumn )
+ const Reference<XComponentContext>& _rContext, const Reference< XRowSet >& _rxRowSet, const Reference< XPropertySet >& _rxColumn )
{
::std::auto_ptr< ::dbtools::FormattedColumnValue > pValue;
if ( ensureLoaded() )
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index ad911595d042..566851ca9487 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -41,7 +41,6 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <comphelper/propmultiplex.hxx>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -198,7 +197,7 @@ private:
//==================================================================
// DbCellControl, liefert die Daten fuer einen CellController
-// wird in der Regel nur für komplexe Controls wie z.B ComboBoxen
+// wird in der Regel nur f\FCr komplexe Controls wie z.B ComboBoxen
// benoetigt
//==================================================================
class DbCellControl
@@ -532,7 +531,7 @@ class DbPatternField : public DbCellControl
{
public:
TYPEINFO();
- DbPatternField( DbGridColumn& _rColumn, const ::comphelper::ComponentContext& _rContext );
+ DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
virtual void Init( Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
virtual OUString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
@@ -553,7 +552,7 @@ private:
::std::auto_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
::std::auto_ptr< ::dbtools::FormattedColumnValue > m_pPaintFormatter;
SAL_WNODEPRECATED_DECLARATIONS_POP
- ::comphelper::ComponentContext m_aContext;
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
};
//==================================================================