From 9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- connectivity/source/drivers/calc/Cservices.cxx | 52 ------------------------- connectivity/source/drivers/calc/calc.component | 35 +++++++++++++++++ connectivity/source/drivers/calc/exports.dxp | 1 - connectivity/source/drivers/calc/makefile.mk | 8 ++++ 4 files changed, 43 insertions(+), 53 deletions(-) create mode 100644 connectivity/source/drivers/calc/calc.component (limited to 'connectivity/source/drivers/calc') diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index b172d9d4cf88..5f0338b55aae 100644 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -29,13 +29,11 @@ #include "precompiled_connectivity.hxx" #include "calc/CDriver.hxx" #include -#include using namespace connectivity::calc; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -48,31 +46,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// -// Die vorgeschriebene C-Api muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString::createFromAscii("/"); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; icreateKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -122,31 +95,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/connectivity/source/drivers/calc/calc.component b/connectivity/source/drivers/calc/calc.component new file mode 100644 index 000000000000..be949f70de14 --- /dev/null +++ b/connectivity/source/drivers/calc/calc.component @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/connectivity/source/drivers/calc/exports.dxp b/connectivity/source/drivers/calc/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/connectivity/source/drivers/calc/exports.dxp +++ b/connectivity/source/drivers/calc/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/calc/makefile.mk b/connectivity/source/drivers/calc/makefile.mk index 8e193524aa45..a7393b3c8e82 100644 --- a/connectivity/source/drivers/calc/makefile.mk +++ b/connectivity/source/drivers/calc/makefile.mk @@ -94,3 +94,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/calc.component + +$(MISC)/calc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + calc.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt calc.component -- cgit From b54d82d27d8e486a8a6a251f314b60bc79ecaa73 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 25 Nov 2010 12:43:46 +0100 Subject: dba34b: #i111143# use supports supportsMixedCaseQuotedIdentifiers instead of storesMixedCaseQuotedIdentifiers --- connectivity/source/drivers/calc/CTable.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'connectivity/source/drivers/calc') diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index a4e5f35825f5..20214c18af75 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -470,8 +470,8 @@ void OCalcTable::fillColumns() String aStrFieldName; aStrFieldName.AssignAscii("Column"); ::rtl::OUString aTypeName; - ::comphelper::UStringMixEqual aCase(m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); - const sal_Bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + ::comphelper::UStringMixEqual aCase(m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + const sal_Bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); for (sal_Int32 i = 0; i < m_nDataCols; i++) { -- cgit From 9e2d73aef6b5c15794936a849ead050ca3d205e3 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 7 Jan 2011 18:04:22 +0100 Subject: removetooltypes: #i112600# remove tooltypes --- connectivity/source/drivers/calc/CTable.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'connectivity/source/drivers/calc') diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index a4e5f35825f5..3c9017e1c792 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -829,12 +829,12 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::fetchRow" ); // read the bookmark - BOOL bIsCurRecordDeleted = sal_False; + sal_Bool bIsCurRecordDeleted = sal_False; _rRow->setDeleted(bIsCurRecordDeleted); *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; // fields -- cgit