summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/flat
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-21 16:22:38 +0200
committerNoel Grandin <noel@peralex.com>2013-05-22 15:20:03 +0200
commit7298a2b0c721004b09a0fd3c7e287d655f42286b (patch)
treef897e317791f3946845e8cea6145ac2683de5993 /connectivity/source/drivers/flat
parent8c249489120c9ef0a25436d16c38cbe3756adff1 (diff)
fdo#46808, Convert XMultiServiceFactory to XComponentContext
Change-Id: I3a74d4edaa3ff3c2498c3db2720b0e4e5305c2e4
Diffstat (limited to 'connectivity/source/drivers/flat')
-rw-r--r--connectivity/source/drivers/flat/EDriver.cxx3
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx8
2 files changed, 5 insertions, 6 deletions
diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx
index d83e435216b7..c9b5fac684a4 100644
--- a/connectivity/source/drivers/flat/EDriver.cxx
+++ b/connectivity/source/drivers/flat/EDriver.cxx
@@ -24,6 +24,7 @@
#include <comphelper/sequence.hxx>
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
+#include "comphelper/processfactory.hxx"
using namespace connectivity::flat;
@@ -51,7 +52,7 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::flat::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new ODriver(_rxFactory));
+ return *(new ODriver( comphelper::getComponentContext(_rxFactory) ));
}
// --------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index f777e636dee8..a6b5a67d9ce2 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -124,7 +124,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
m_aScales.assign(nFieldCount+1,-1);
const sal_Bool bCase = m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers();
- CharClass aCharClass( comphelper::getComponentContext(pConnection->getDriver()->getFactory()), LanguageTag( _aLocale));
+ CharClass aCharClass( pConnection->getDriver()->getComponentContext(), LanguageTag( _aLocale));
// read description
const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
@@ -435,10 +435,8 @@ void OFlatTable::construct()
SvtSysLocale aLocale;
::com::sun::star::lang::Locale aAppLocale(aLocale.GetLanguageTag().getLocale());
- Reference< XNumberFormatsSupplier > xSupplier = NumberFormatsSupplier::createWithLocale( getComponentContext(m_pConnection->getDriver()->getFactory()), aAppLocale );
- m_xNumberFormatter = Reference< XNumberFormatter >( NumberFormatter::create(
- comphelper::getComponentContext(m_pConnection->getDriver()->getFactory())),
- UNO_QUERY_THROW);
+ Reference< XNumberFormatsSupplier > xSupplier = NumberFormatsSupplier::createWithLocale( m_pConnection->getDriver()->getComponentContext(), aAppLocale );
+ m_xNumberFormatter.set( NumberFormatter::create( m_pConnection->getDriver()->getComponentContext()), UNO_QUERY_THROW);
m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier);
Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY);
xProp->getPropertyValue(OUString("NullDate")) >>= m_aNullDate;