diff options
Diffstat (limited to 'connectivity/source/drivers/hsqldb')
30 files changed, 183 insertions, 175 deletions
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 48ae5dbdb9a3..2dda469c1fb8 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,6 @@ // ------------------------------------------------------------------------- using namespace connectivity; using namespace connectivity::hsqldb; -//using namespace connectivity::sdbcx; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; @@ -164,3 +164,4 @@ Sequence< Type > SAL_CALL OHCatalog::getTypes( ) throw(RuntimeException) // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index be9bf65b3f69..798afeaf20bf 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,8 +83,10 @@ void OHSQLColumn::construct() Sequence< ::rtl::OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Column"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Column")); return aSupported; } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index a786eac84398..3f4ca4baea93 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -218,7 +219,7 @@ namespace connectivity { namespace hsqldb } // ------------------------------------------------------------------- - Reference< XGraphic > SAL_CALL OHsqlConnection::getTableIcon( const ::rtl::OUString& _TableName, ::sal_Int32 _ColorMode ) throw (RuntimeException) + Reference< XGraphic > SAL_CALL OHsqlConnection::getTableIcon( const ::rtl::OUString& _TableName, ::sal_Int32 /*_ColorMode*/ ) throw (RuntimeException) { MethodGuard aGuard( *this ); @@ -226,7 +227,7 @@ namespace connectivity { namespace hsqldb if ( !impl_isTextTable_nothrow( _TableName ) ) return NULL; - return impl_getTextTableIcon_nothrow( _ColorMode ); + return impl_getTextTableIcon_nothrow(); } // ------------------------------------------------------------------- @@ -280,44 +281,6 @@ namespace connectivity { namespace hsqldb } //TODO: resource -#if 0 - // ------------------------------------------------------------------- - Reference< XExecutableDialog > OHsqlConnection::impl_createLinkedTableEditor_throw( const Reference< XDatabaseDocumentUI >& _rxDocumentUI, const ::rtl::OUString& _rTableName ) - { - OSL_PRECOND( _rxDocumentUI.is(), "OHsqlConnection::impl_createLinkedTableEditor_throw: illegal document UI!" ); - Reference< XExecutableDialog > xDialog; - try - { - ::comphelper::ComponentContext aContext( m_xORB ); - Sequence< Any > aArguments(3); - aArguments[0] <<= NamedValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TableContainer" ) ), - makeAny( impl_getTableContainer_throw() ) - ); - aArguments[1] <<= NamedValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TableName" ) ), - makeAny( _rTableName ) - ); - aArguments[2] <<= NamedValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ) ), - makeAny( _rxDocumentUI->getApplicationMainWindow() ) - ); - - aContext.createComponentWithArguments( "com.sun.star.sdb.hsql.LinkedTableEditor", aArguments, xDialog ); - if ( !xDialog.is() ) - throw ServiceNotRegisteredException( ::rtl::OUString::createFromAscii( "com.sun.star.sdb.hsql.LinkedTableEditor" ), *this ); - } - catch( const RuntimeException& ) { throw; } - catch( const Exception& ) - { - ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceString(STR_NO_TABLE_EDITOR_DIALOG)); - throw WrappedTargetException( sError ,*this, ::cppu::getCaughtException() ); - } - return xDialog; - } -#endif - // ------------------------------------------------------------------- void OHsqlConnection::impl_checkExistingTable_throw( const ::rtl::OUString& _rTableName ) { @@ -372,7 +335,7 @@ namespace connectivity { namespace hsqldb { Reference< XRow > xValueAccess( xTableHsqlType, UNO_QUERY_THROW ); ::rtl::OUString sTableType = xValueAccess->getString( 1 ); - bIsTextTable = sTableType.equalsAscii( "TEXT" ); + bIsTextTable = sTableType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TEXT" ) ); } } catch( const Exception& ) @@ -384,7 +347,7 @@ namespace connectivity { namespace hsqldb } // ------------------------------------------------------------------- - Reference< XGraphic > OHsqlConnection::impl_getTextTableIcon_nothrow( ::sal_Int32 _ColorMode ) + Reference< XGraphic > OHsqlConnection::impl_getTextTableIcon_nothrow() { Reference< XGraphic > xGraphic; try @@ -396,13 +359,12 @@ namespace connectivity { namespace hsqldb // assemble the image URL ::rtl::OUStringBuffer aImageURL; - aImageURL.appendAscii( "private:graphicrepository/" ); // load the graphic from the global graphic repository - aImageURL.appendAscii( "database/" ); // the relative path within the images.zip - if ( _ColorMode == GraphicColorMode::NORMAL ) - aImageURL.appendAscii( LINKED_TEXT_TABLE_IMAGE_RESOURCE ); - else - aImageURL.appendAscii( LINKED_TEXT_TABLE_IMAGE_RESOURCE_HC ); - // the name of the graphic to use + // load the graphic from the global graphic repository + aImageURL.appendAscii( "private:graphicrepository/" ); + // the relative path within the images.zip + aImageURL.appendAscii( "database/" ); + aImageURL.appendAscii( LINKED_TEXT_TABLE_IMAGE_RESOURCE ); + // the name of the graphic to use ::rtl::OUString sImageURL( aImageURL.makeStringAndClear() ); // ask the provider to obtain a graphic @@ -420,3 +382,5 @@ namespace connectivity { namespace hsqldb } } } // namespace connectivity::hsqldb + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 3760b914cc1d..fcb3408a3c52 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,6 +58,8 @@ #include "resource/hsqldb_res.hrc" #include "resource/sharedresources.hxx" +#include <o3tl/compat_functional.hxx> + //........................................................................ namespace connectivity { @@ -191,11 +194,11 @@ namespace connectivity for (;pIter != pEnd; ++pIter) { - if ( pIter->Name.equalsAscii("Storage") ) + if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Storage")) ) { xStorage.set(pIter->Value,UNO_QUERY); } - else if ( pIter->Name.equalsAscii("URL") ) + else if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) ) { pIter->Value >>= sURL; } @@ -495,14 +498,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.sdbcx.comp.hsqldb.Driver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.Driver")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 2 ); aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); - aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver"); + aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); return aSNS; } //------------------------------------------------------------------ @@ -590,9 +593,9 @@ namespace connectivity if ( xStorage.is() ) { ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage); - TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1( + TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey) - ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >()))); + ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >()))); if ( i != m_aConnections.end() ) shutdownConnection(i); } @@ -642,9 +645,9 @@ namespace connectivity ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage); if ( sKey.getLength() ) { - TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1( + TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey) - ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >()))); + ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >()))); OSL_ENSURE( i != m_aConnections.end(), "ODriverDelegator::preCommit: they're committing a storage which I do not know!" ); if ( i != m_aConnections.end() ) { @@ -669,7 +672,7 @@ namespace connectivity } catch(Exception&) { - OSL_ENSURE( false, "ODriverDelegator::preCommit: caught an exception!" ); + OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" ); } } } @@ -820,7 +823,7 @@ namespace connectivity // second round, this time without matching the country return lcl_getCollationForLocale( _rLocaleString, true ); - OSL_ENSURE( false, "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); + OSL_FAIL( "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); return "Latin1_General"; } @@ -832,7 +835,7 @@ namespace connectivity { //......................................................... Reference< XMultiServiceFactory > xConfigProvider( - _rxORB->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + _rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ), UNO_QUERY ); OSL_ENSURE( xConfigProvider.is(), "lcl_getSystemLocale: could not create the config provider!" ); @@ -844,13 +847,13 @@ namespace connectivity // arguments for creating the config access Sequence< Any > aArguments(2); // the path to the node to open - ::rtl::OUString sNodePath = ::rtl::OUString::createFromAscii ("/org.openoffice.Setup/L10N" ); - aArguments[0] <<= PropertyValue( ::rtl::OUString::createFromAscii( "nodepath"), 0, + ::rtl::OUString sNodePath(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/L10N" )); + aArguments[0] <<= PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), 0, makeAny( sNodePath ), PropertyState_DIRECT_VALUE ); // the depth: -1 means unlimited aArguments[1] <<= PropertyValue( - ::rtl::OUString::createFromAscii( "depth"), 0, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, makeAny( (sal_Int32)-1 ), PropertyState_DIRECT_VALUE ); @@ -858,7 +861,7 @@ namespace connectivity // create the access Reference< XPropertySet > xNode( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArguments ), UNO_QUERY ); OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" ); @@ -870,7 +873,7 @@ namespace connectivity } catch( const Exception& ) { - OSL_ENSURE( sal_False, "lcl_getSystemLocale: caught an exception!" ); + OSL_FAIL( "lcl_getSystemLocale: caught an exception!" ); } if ( !sLocaleString.getLength() ) { @@ -908,7 +911,7 @@ namespace connectivity } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ODriverDelegator::onConnectedNewDatabase: caught an exception!" ); + OSL_FAIL( "ODriverDelegator::onConnectedNewDatabase: caught an exception!" ); } } @@ -918,3 +921,4 @@ namespace connectivity } // namespace connectivity //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HStorage.hxx b/connectivity/source/drivers/hsqldb/HStorage.hxx index 5dd8b4288b69..cd7e94b44bf0 100644 --- a/connectivity/source/drivers/hsqldb/HStorage.hxx +++ b/connectivity/source/drivers/hsqldb/HStorage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,4 @@ namespace connectivity // ....................................................................... #endif // CONNECTIVITY_HSQLDB_STORAGE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index e7fab6acb6c0..b102481b4fe3 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,9 +90,9 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor { xFlush->flush(); } - catch(Exception&) + catch(const Exception&) { - OSL_ENSURE( false, "NativeStorageAccess::close: caught an exception while flushing!" ); + OSL_FAIL( "NativeStorageAccess::close: caught an exception while flushing!" ); } #ifdef HSQLDB_DBG { @@ -170,7 +171,7 @@ jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, { nBytesRead = xIn->readBytes(aData,1); } - catch(Exception& e) + catch(const Exception& e) { StorageContainer::throwJavaException(e,env); return -1; @@ -248,7 +249,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js { nBytesRead = xIn->readBytes(aData, len); } - catch(Exception& e) + catch(const Exception& e) { StorageContainer::throwJavaException(e,env); return -1; @@ -316,7 +317,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor { nBytesRead = xIn->readBytes(aData, 4); } - catch(Exception& e) + catch(const Exception& e) { StorageContainer::throwJavaException(e,env); return -1; @@ -442,7 +443,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst if (JNI_FALSE != env->ExceptionCheck()) { env->ExceptionClear(); - OSL_ENSURE(0,"ExceptionClear"); + OSL_FAIL("ExceptionClear"); } OSL_ENSURE(buf,"buf is NULL"); if ( buf && len > 0 && len <= env->GetArrayLength(buffer)) @@ -463,9 +464,9 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst "No OutputStream"); } } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception caught! : write [BII)V"); + OSL_FAIL("Exception caught! : write [BII)V"); StorageContainer::throwJavaException(e,env); } } @@ -522,9 +523,9 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j "No OutputStream"); } } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : writeBytes(aData);"); + OSL_FAIL("Exception caught! : writeBytes(aData);"); StorageContainer::throwJavaException(e,env); } } @@ -549,3 +550,5 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor write_to_storage_stream( env, obj_this, name, key, v ); #endif } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 91626906a906..9edd67bdc4f0 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,6 +37,8 @@ #include "diagnose_ex.h" #include <osl/thread.h> +#include <o3tl/compat_functional.hxx> + //........................................................................ namespace connectivity { @@ -76,21 +79,19 @@ namespace connectivity { ::comphelper::disposeComponent(m_xOutputStream); } - catch(DisposedException&) + catch(const DisposedException&) { } - catch(const Exception& e) + catch(const Exception&) { - OSL_UNUSED( e ); - OSL_ENSURE(0,"Could not dispose OutputStream"); + OSL_FAIL("Could not dispose OutputStream"); } m_xOutputStream.clear(); } } - catch(Exception& ex) + catch(const Exception&) { - OSL_UNUSED( ex ); - OSL_ENSURE(0,"Exception catched!"); + OSL_FAIL("Exception caught!"); } } // ----------------------------------------------------------------------------- @@ -155,7 +156,7 @@ namespace connectivity if (JNI_FALSE != env->ExceptionCheck()) { env->ExceptionClear(); - OSL_ENSURE(0,"ExceptionClear"); + OSL_FAIL("ExceptionClear"); } ::rtl::OUString aStr; if ( jstr ) @@ -172,7 +173,7 @@ namespace connectivity if (JNI_FALSE != env->ExceptionCheck()) { env->ExceptionClear(); - OSL_ENSURE(0,"ExceptionClear"); + OSL_FAIL("ExceptionClear"); } return aStr; } @@ -184,9 +185,9 @@ namespace connectivity TStorages& rMap = lcl_getStorageMap(); // check if the storage is already in our map TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage) - ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>()))) + ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>()))) ); if ( aFind == rMap.end() ) { @@ -215,9 +216,9 @@ namespace connectivity TStorages& rMap = lcl_getStorageMap(); // check if the storage is already in our map TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage) - ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>()))) + ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>()))) ); if ( aFind != rMap.end() ) sKey = aFind->first; @@ -242,7 +243,7 @@ namespace connectivity xTrans->commit(); } } - catch(Exception&) + catch(const Exception&) { } rMap.erase(aFind); @@ -278,7 +279,7 @@ namespace connectivity { pHelper.reset(new StreamHelper(aStoragePair.first.first->openStreamElement(sName,_nMode))); } - catch(Exception& ) + catch(const Exception&) { ::rtl::OUString sStrippedName = removeOldURLPrefix(sOrgName); @@ -289,7 +290,7 @@ namespace connectivity { bIsStream = aStoragePair.first.first->isStreamElement(sStrippedName); } - catch(Exception& ) + catch(const Exception&) { bIsStream = sal_False; } @@ -300,7 +301,7 @@ namespace connectivity } aFind->second.second.insert(TStreamMap::value_type(sName,pHelper)); } - catch(Exception& e) + catch(const Exception& e) { #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage( "[HSQLDB-SDBC] caught an exception while opening a stream\n" ); @@ -310,7 +311,7 @@ namespace connectivity if ( _nMode < 16 ) sMessage += "0"; sMessage += ::rtl::OString::valueOf( _nMode, 16 ).toAsciiUpperCase(); - OSL_ENSURE( false, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif StorageContainer::throwJavaException(e,env); } @@ -360,3 +361,5 @@ namespace connectivity } // namespace connectivity //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index fdf16c8b975a..90ced7e5066c 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -326,7 +327,7 @@ void OHSQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) // ----------------------------------------------------------------------------- ::rtl::OUString OHSQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " )); const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); @@ -339,7 +340,7 @@ void OHSQLTable::executeStatement(const ::rtl::OUString& _rStatement ) { ::rtl::OUString sSQL = _rStatement; if(sSQL.lastIndexOf(',') == (sSQL.getLength()-1)) - sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString::createFromAscii(")")); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) @@ -425,3 +426,4 @@ Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeExcep } // ------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 3013d2838fb0..d055a87f2cbb 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,14 +140,14 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); sal_Bool bIsView; - if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString::createFromAscii("VIEW")))) // here we have a view - aSql += ::rtl::OUString::createFromAscii("VIEW "); + if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))))) // here we have a view + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW ")); else - aSql += ::rtl::OUString::createFromAscii("TABLE "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE ")); ::rtl::OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); @@ -198,3 +199,4 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) } // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx index 52d53fa99227..739132cf9035 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,5 @@ throw( RuntimeException ) //........................................................................ } // namespace connectivity //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx index 9bec7c02d57f..b8af49d66dc8 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ #define CONNECTIVITY_HSQLDB_TERMINATELISTENER_HXX #include <cppuhelper/compbase1.hxx> -#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/frame/XTerminateListener.hpp> -#endif //........................................................................ namespace connectivity @@ -64,3 +63,5 @@ namespace connectivity } // namespace connectivity //........................................................................ #endif // CONNECTIVITY_HSQLDB_TERMINATELISTENER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx b/connectivity/source/drivers/hsqldb/HTools.cxx index c5e31e5ef1a4..f3849359f80f 100644 --- a/connectivity/source/drivers/hsqldb/HTools.cxx +++ b/connectivity/source/drivers/hsqldb/HTools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ namespace connectivity { namespace hsqldb //........................................................................ } } // namespace connectivity::hsqldb //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index 90f914e77307..a433ed0c34a3 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -130,16 +131,16 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, if ( xRes.is() ) { - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); - static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); - static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); + static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( "SELECT" )); + static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( "INSERT" )); + static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( "UPDATE" )); + static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( "DELETE" )); + static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( "READ" )); + static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( "CREATE" )); + static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( "ALTER" )); + static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( "REFERENCE" )); + static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( "DROP" )); + static const ::rtl::OUString sYes( RTL_CONSTASCII_USTRINGPARAM( "YES" )); nRightsWithGrant = nRights = 0; @@ -238,12 +239,12 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("GRANT "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" TO "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TO ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -268,12 +269,12 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_I if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("REVOKE "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE ")); sGrant += sPrivs; - sGrant += ::rtl::OUString::createFromAscii(" ON "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ON ")); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString::createFromAscii(" FROM "); + sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -289,11 +290,11 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); ::rtl::OUString sAlterPwd; - sAlterPwd = ::rtl::OUString::createFromAscii("SET PASSWORD FOR "); + sAlterPwd = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET PASSWORD FOR ")); sAlterPwd += m_Name; - sAlterPwd += ::rtl::OUString::createFromAscii("@\"%\" = PASSWORD('") ; + sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("@\"%\" = PASSWORD('")) ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString::createFromAscii("')") ; + sAlterPwd += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("')")) ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -308,44 +309,45 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, { ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString::createFromAscii("INSERT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT")); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("DELETE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE")); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("UPDATE"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE")); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("ALTER"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER")); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("SELECT"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(sPrivs.getLength()) - sPrivs += ::rtl::OUString::createFromAscii(","); - sPrivs += ::rtl::OUString::createFromAscii("REFERENCES"); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES")); } return sPrivs; } // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 151528457ac0..8cf6f649db0b 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ using namespace connectivity; using namespace connectivity::hsqldb; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -80,18 +80,18 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " )); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) - + ::rtl::OUString::createFromAscii(" @\"%\" "); + + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" @\"%\" ")); ::rtl::OUString sPassword; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( sPassword.getLength() ) { - aSql += ::rtl::OUString::createFromAscii(" IDENTIFIED BY '"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '")); aSql += sPassword; - aSql += ::rtl::OUString::createFromAscii("'"); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'")); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); @@ -106,7 +106,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName) { { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "REVOKE ALL ON * FROM " )); ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); @@ -118,3 +118,5 @@ void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName) } // ------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index 229e9c9218d9..86f0ddfcca46 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -211,3 +212,5 @@ namespace connectivity { namespace hsqldb //........................................................................ } } // namespace connectivity::hsqldb //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index d604947e016e..edc01233dc65 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,7 +119,7 @@ void HViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" )); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -141,13 +142,13 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " )); ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString::createFromAscii(" AS "); + aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" AS ")); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; @@ -167,3 +168,5 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) } } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index ea0d452f1d05..bac05be8b0a6 100644 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,9 +87,7 @@ struct ProviderRequest }; //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) @@ -123,3 +122,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx index a95ee058d4b2..8a719ee3f638 100644 --- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx +++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,22 +76,22 @@ SAL_DLLPUBLIC_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Storag { aStoragePair.first.first->renameElement(sOldName,StorageContainer::removeURLPrefix(sName,aStoragePair.first.second)); } - catch(Exception&) + catch(const Exception&) { } } } - catch(NoSuchElementException&) + catch(const NoSuchElementException&) { } return aStoragePair.first.first->isStreamElement(StorageContainer::removeURLPrefix(sName,aStoragePair.first.second)); } - catch(NoSuchElementException&) + catch(const NoSuchElementException&) { } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement"); + OSL_FAIL("Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement"); if (JNI_FALSE != env->ExceptionCheck()) env->ExceptionClear(); ::rtl::OString cstr( ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_JAVA_UTF8 ) ); @@ -122,14 +123,14 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil { aStoragePair.first.first->removeElement(StorageContainer::removeURLPrefix(StorageContainer::jstring2ustring(env,name),aStoragePair.first.second)); } - catch(NoSuchElementException&) + catch(const NoSuchElementException&) { if (JNI_FALSE != env->ExceptionCheck()) env->ExceptionClear(); } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement"); + OSL_FAIL("Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement"); StorageContainer::throwJavaException(e,env); } } @@ -167,14 +168,16 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil } #endif } - catch(NoSuchElementException&) + catch(const NoSuchElementException&) { } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement"); + OSL_FAIL("Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement"); StorageContainer::throwJavaException(e,env); } } } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index 99ac75290d94..3fb691d5524a 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -182,15 +183,15 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNa } while (tmpLongVal > 0); } - catch(Exception& ) + catch(const Exception&) { } return n - tmpLongVal; } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : skip();"); + OSL_FAIL("Exception caught! : skip();"); StorageContainer::throwJavaException(e,env); } } @@ -231,9 +232,9 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat #endif return nAvailable; } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception caught! : available();"); + OSL_FAIL("Exception caught! : available();"); StorageContainer::throwJavaException(e,env); } } @@ -275,9 +276,9 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat { nBytesRead = xIn->readBytes(aData,nLen); } - catch(Exception& e) + catch(const Exception& e) { - OSL_ENSURE(0,"Exception catched! : skip();"); + OSL_FAIL("Exception caught! : skip();"); StorageContainer::throwJavaException(e,env); } @@ -304,3 +305,5 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat return nBytesRead; } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index ec7428d14fef..8bae08b4bf30 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -212,8 +213,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb } catch(Exception&) { - OSL_ENSURE( false, "StorageNativeOutputStream::sync: could not flush output stream!" ); + OSL_FAIL( "StorageNativeOutputStream::sync: could not flush output stream!" ); } } } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx index 8ac77d5be4c2..a80350eef30c 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.cxx +++ b/connectivity/source/drivers/hsqldb/accesslog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,5 @@ namespace connectivity { namespace hsqldb } } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/accesslog.hxx b/connectivity/source/drivers/hsqldb/accesslog.hxx index 524394a8b885..d29e67c2aa37 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.hxx +++ b/connectivity/source/drivers/hsqldb/accesslog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,3 +144,5 @@ namespace connectivity { namespace hsqldb #endif #endif // CONNECTIVITY_HSQLDB_ACCESSLOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/exports.dxp b/connectivity/source/drivers/hsqldb/exports.dxp index 3efc73741d24..3efc73741d24 100644..100755 --- a/connectivity/source/drivers/hsqldb/exports.dxp +++ b/connectivity/source/drivers/hsqldb/exports.dxp diff --git a/connectivity/source/drivers/hsqldb/hsqldb.component b/connectivity/source/drivers/hsqldb/hsqldb.component index eb8ae477e749..eb8ae477e749 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.component +++ b/connectivity/source/drivers/hsqldb/hsqldb.component diff --git a/connectivity/source/drivers/hsqldb/hsqldb.map b/connectivity/source/drivers/hsqldb/hsqldb.map index b611aba02d5b..b611aba02d5b 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.map +++ b/connectivity/source/drivers/hsqldb/hsqldb.map diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xcu b/connectivity/source/drivers/hsqldb/hsqldb.xcu index f97b5e357179..f97b5e357179 100755..100644 --- a/connectivity/source/drivers/hsqldb/hsqldb.xcu +++ b/connectivity/source/drivers/hsqldb/hsqldb.xcu diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xml b/connectivity/source/drivers/hsqldb/hsqldb.xml index 720e9e30dbd4..c456c253777d 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.xml +++ b/connectivity/source/drivers/hsqldb/hsqldb.xml @@ -16,11 +16,9 @@ <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> - <project-build-dependency>vos</project-build-dependency> <runtime-module-dependency>cppuhelper</runtime-module-dependency> <runtime-module-dependency>cppu</runtime-module-dependency> <runtime-module-dependency>sal</runtime-module-dependency> - <runtime-module-dependency>vos</runtime-module-dependency> <runtime-module-dependency>dbtools</runtime-module-dependency> <runtime-module-dependency>comphelper</runtime-module-dependency> </module-description> diff --git a/connectivity/source/drivers/hsqldb/hsqlui.hrc b/connectivity/source/drivers/hsqldb/hsqlui.hrc index fe20ec5eaf21..2f25d5a8c198 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqlui.hrc +++ b/connectivity/source/drivers/hsqldb/hsqlui.hrc @@ -29,7 +29,6 @@ #define CONNECTIVITY_HSQLUI_HRC #define LINKED_TEXT_TABLE_IMAGE_RESOURCE "linked_text_table.png" -#define LINKED_TEXT_TABLE_IMAGE_RESOURCE_HC "linked_text_table_hc.png" #endif // CONNECTIVITY_HSQLUI_HRC diff --git a/connectivity/source/drivers/hsqldb/hsqlui.src b/connectivity/source/drivers/hsqldb/hsqlui.src index a2886c1a18cf..913f366429ea 100644 --- a/connectivity/source/drivers/hsqldb/hsqlui.src +++ b/connectivity/source/drivers/hsqldb/hsqlui.src @@ -32,7 +32,7 @@ /* Note: The resource file built here (hsqldb.res, finally) is *not* included in the final OOo installation. Instead, it is only built to ensure that - the two images below are included in the application-wide image repository + the image below is included in the application-wide image repository (images.zip). This way, they can be accessed at runtime, but without the indirection via a resource file - the GraphicProvider service supports a "private:imagerepository/*" protocol meanwhile, which allows this. @@ -46,8 +46,3 @@ Image 1000 { ImageBitmap = Bitmap { File = LINKED_TEXT_TABLE_IMAGE_RESOURCE; }; }; - -Image 1001 -{ - ImageBitmap = Bitmap { File = LINKED_TEXT_TABLE_IMAGE_RESOURCE_HC; }; -}; diff --git a/connectivity/source/drivers/hsqldb/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk index d0e22fde8970..6e400696faa0 100644..100755 --- a/connectivity/source/drivers/hsqldb/makefile.mk +++ b/connectivity/source/drivers/hsqldb/makefile.mk @@ -56,7 +56,7 @@ RES1FILELIST=\ $(SRS)$/$(TARGET).srs RESLIB1NAME=$(TARGET) -RESLIB1IMAGES=$(SOLARSRC)$/$(RSCDEFIMG)$/database +RESLIB1IMAGES=$(SOLARDEFIMG)$/database RESLIB1SRSFILES=$(RES1FILELIST) # Note that the resource file built here is currently *not* included |