Tag: cws_src680_kaddrbook User: ebischoff Date: 05/09/01 13:06:25 Modified: /dba/connectivity/source/drivers/kab/ KDriver.cxx
Log: Code cleanup File Changes: Directory: /dba/connectivity/source/drivers/kab/ ================================================ File [changed]: KDriver.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KDriver.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +5 -42 -------------------- --- KDriver.cxx 29 Aug 2005 08:43:50 -0000 1.1.2.1 +++ KDriver.cxx 1 Sep 2005 20:06:23 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KDriver.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:50 $ + * last change: $Author: ebischoff $ $Date: 2005/09/01 20:06:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,6 +99,7 @@ // set language rtl_Locale *pProcessLocale; osl_getProcessLocale(&pProcessLocale); + // sal_Unicode and QChar are (currently) both 16 bits characters QString aLanguage( (const QChar *) pProcessLocale->Language->buffer, (int) pProcessLocale->Language->length); @@ -180,13 +181,13 @@ sal_Bool SAL_CALL KabDriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { - // here we have to look if we support this url format + // here we have to look whether we support this URL format return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:address:kab:"), 16)); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL KabDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { - // if you have somthing special to say, return it here :-) + // if you have something special to say, return it here :-) return Sequence< DriverPropertyInfo >(); } // -------------------------------------------------------------------------------- @@ -215,44 +216,6 @@ ) throw( ::com::sun::star::uno::Exception ) { return *(new KabDriver(_rxFactory)); -} - -void release( - oslInterlockedCount& _refCount, - ::cppu::OBroadcastHelper& rBHelper, - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, - ::com::sun::star::lang::XComponent* _pObject) -{ - if (osl_decrementInterlockedCount( &_refCount ) == 0) - { - osl_incrementInterlockedCount( &_refCount ); - - if (!rBHelper.bDisposed && !rBHelper.bInDispose) - { - // remember the parent - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xParent; - { - ::osl::MutexGuard aGuard( rBHelper.rMutex ); - xParent = _xInterface; - _xInterface = NULL; - } - - // First dispose - _pObject->dispose(); - - // only the alive ref holds the object - OSL_ASSERT( _refCount == 1 ); - - // release the parent in the ~ - if (xParent.is()) - { - ::osl::MutexGuard aGuard( rBHelper.rMutex ); - _xInterface = xParent; - } - } - } - else - osl_incrementInterlockedCount( &_refCount ); } void checkDisposed(sal_Bool _bThrow) throw ( DisposedException ) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
