connectivity/source/commontools/TTableHelper.cxx | 8 ++-- connectivity/source/drivers/evoab2/NConnection.cxx | 25 ------------ connectivity/source/drivers/firebird/Services.cxx | 23 ----------- connectivity/source/drivers/hsqldb/HConnection.cxx | 27 ------------- connectivity/source/drivers/mysql/Yservices.cxx | 41 --------------------- connectivity/source/drivers/odbc/ORealDriver.cxx | 1 connectivity/source/inc/odbc/OFunctions.hxx | 2 - 7 files changed, 6 insertions(+), 121 deletions(-)
New commits: commit d4b8fe32f5763cd3c768aa939178c099b0bf7a19 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Apr 11 17:16:52 2014 +0200 Clean up function declarations and some unused functions Change-Id: I4c63cd304908ce0e8ae3f9938d7323225dd314a5 diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 14454ab..be7e9a1 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <boost/noncopyable.hpp> #include "connectivity/TTableHelper.hxx" #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> @@ -50,13 +53,12 @@ namespace { /// helper class for column property change events which holds the OComponentDefinition weak typedef ::cppu::WeakImplHelper1 < XContainerListener > OTableContainerListener_BASE; -class OTableContainerListener : public OTableContainerListener_BASE +class OTableContainerListener: + public OTableContainerListener_BASE, private boost::noncopyable { OTableHelper* m_pComponent; ::std::map< OUString,bool> m_aRefNames; - OTableContainerListener(const OTableContainerListener&); - void operator =(const OTableContainerListener&); protected: virtual ~OTableContainerListener(){} public: diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index fd522c0..67204db 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -40,31 +40,6 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; -OUString implGetExceptionMsg( Exception& e, const OUString& aExceptionType_ ) -{ - OUString aExceptionType = aExceptionType_; - if( aExceptionType.isEmpty() ) - aExceptionType = "Unknown"; - - OUString aTypeLine( "\nType: " ); - aTypeLine += aExceptionType; - - OUString aMessageLine( "\nMessage: " ); - aMessageLine += e.Message; - - OUString aMsg(aTypeLine); - aMsg += aMessageLine; - return aMsg; -} - - // Exception type unknown -OUString implGetExceptionMsg( Exception& e ) -{ - OUString aMsg = implGetExceptionMsg( e, OUString() ); - return aMsg; -} - - OEvoabConnection::OEvoabConnection( OEvoabDriver& _rDriver ) :OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this ) ,m_rDriver(_rDriver) diff --git a/connectivity/source/drivers/firebird/Services.cxx b/connectivity/source/drivers/firebird/Services.cxx index 883ff7b..25fb67e 100644 --- a/connectivity/source/drivers/firebird/Services.cxx +++ b/connectivity/source/drivers/firebird/Services.cxx @@ -40,29 +40,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); - - -// The required C-Api must be provided! -// It contains of 3 special functions that have to be exported. - - - -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName = "/" + aServiceImplName + "/UNO/SERVICES"; - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FIREBIRD::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - - struct ProviderRequest { Reference< XSingleServiceFactory > xRet; diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index aa2bc4a..70fc252 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -83,33 +83,6 @@ namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode; namespace connectivity { namespace hsqldb { - - // = FlushListeners - - typedef ::comphelper::OListenerContainerBase< XFlushListener, EventObject > FlushListeners_Base; - class FlushListeners : public FlushListeners_Base - { - public: - FlushListeners( ::osl::Mutex& _rMutex ) :FlushListeners_Base( _rMutex ) { } - - protected: - virtual bool implTypedNotify( - const Reference< XFlushListener >& _rxListener, - const EventObject& _rEvent - ) SAL_THROW( ( Exception ) ) SAL_OVERRIDE; - }; - - - bool FlushListeners::implTypedNotify( const Reference< XFlushListener >& _rxListener, const EventObject& _rEvent ) SAL_THROW( ( Exception ) ) - { - _rxListener->flushed( _rEvent ); - return true; // continue notifying the other listeners, if any - } - - - // = OHsqlConnection - - void SAL_CALL OHsqlConnection::disposing(void) { m_aFlushListeners.disposeAndClear( EventObject( *this ) ); diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index 9504187..04a5da0 100644 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -35,47 +35,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); - -struct ProviderRequest -{ - Reference< XSingleServiceFactory > xRet; - Reference< XMultiServiceFactory > const xServiceManager; - OUString const sImplementationName; - - ProviderRequest( - void* pServiceManager, - sal_Char const* pImplementationName - ) - : xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager)) - , sImplementationName(OUString::createFromAscii(pImplementationName)) - { - } - - inline - sal_Bool CREATE_PROVIDER( - const OUString& Implname, - const Sequence< OUString > & Services, - ::cppu::ComponentInstantiation Factory, - createFactoryFunc creator - ) - { - if (!xRet.is() && (Implname == sImplementationName)) - { - try - { - xRet = creator( xServiceManager, sImplementationName,Factory, Services,0); - } - catch(...) - { - } - } - return xRet.is(); - } - - void* getProvider() const { return xRet.get(); } -}; - - extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index 3576ecb..30d7bfd 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -25,7 +25,6 @@ namespace connectivity { - sal_Bool LoadFunctions(oslModule pODBCso); sal_Bool LoadLibrary_ODBC3(OUString &_rPath); // extern declaration of the function pointer extern T3SQLAllocHandle pODBC3SQLAllocHandle; diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx index 239869f..c6424f6 100644 --- a/connectivity/source/inc/odbc/OFunctions.hxx +++ b/connectivity/source/inc/odbc/OFunctions.hxx @@ -28,7 +28,7 @@ namespace connectivity { // sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True); -// sal_Bool LoadLibrary_ODBC3(OUString &_rPath); +sal_Bool LoadLibrary_ODBC3(OUString &_rPath); // sal_Bool LoadLibrary_ADABAS(OUString &_rPath); // Connecting to a data source _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits