Tag: cws_dev300_dba31b User: oj Date: 2008-08-20 11:29:35+0000 Modified: dba/connectivity/source/commontools/dbmetadata.cxx dba/connectivity/source/drivers/adabas/BPreparedStatement.cxx dba/connectivity/source/drivers/adabas/BStatement.cxx dba/connectivity/source/drivers/adabas/BUser.cxx dba/connectivity/source/drivers/ado/Aolevariant.cxx dba/connectivity/source/drivers/dbase/DResultSet.cxx dba/connectivity/source/drivers/hsqldb/HConnection.cxx dba/connectivity/source/drivers/hsqldb/HUser.cxx dba/connectivity/source/drivers/kab/KDriver.cxx dba/connectivity/source/drivers/macab/MacabResultSet.cxx dba/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx dba/connectivity/source/drivers/macab/MacabStatement.cxx dba/connectivity/source/drivers/macab/macabutilities.hxx dba/connectivity/source/drivers/mozab/MDriver.cxx dba/connectivity/source/drivers/mozab/MResultSet.cxx dba/connectivity/source/drivers/mysql/YUser.cxx dba/connectivity/source/drivers/odbc/OPreparedStatement.cxx dba/connectivity/source/drivers/odbc/OStatement.cxx dba/connectivity/source/inc/resource/ado_res.hrc dba/connectivity/source/inc/resource/common_res.hrc dba/connectivity/source/inc/resource/hsqldb_res.hrc dba/connectivity/source/inc/resource/kab_res.hrc dba/connectivity/source/inc/resource/mozab_res.hrc dba/connectivity/source/resource/conn_shared_res.src dba/connectivity/source/sdbcx/VCollection.cxx
Log: #i53067# localize str File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbmetadata.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbmetadata.cxx?r1=1.10&r2=1.10.22.1 Delta lines: +9 -3 ------------------- --- dbmetadata.cxx 2008-06-25 11:40:50+0000 1.10 +++ dbmetadata.cxx 2008-08-20 11:29:29+0000 1.10.22.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dbmetadata.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.22.1 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,8 @@ #include <connectivity/dbmetadata.hxx> #include <connectivity/dbexception.hxx> +#include "resource/common_res.hrc" +#include "resource/sharedresources.hxx" /** === begin UNO includes === **/ #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -104,7 +106,11 @@ static void lcl_checkConnected( const DatabaseMetaData_Impl& _metaDataImpl ) { if ( !_metaDataImpl.xConnection.is() || !_metaDataImpl.xConnectionMetaData.is() ) - throwSQLException( "not connected", SQL_CONNECTION_DOES_NOT_EXIST, NULL ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_NO_CONNECTION_GIVEN)); + throwSQLException( sError, SQL_CONNECTION_DOES_NOT_EXIST, NULL ); + } } //................................................................ Directory: /dba/connectivity/source/drivers/adabas/ =================================================== File [changed]: BPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/adabas/BPreparedStatement.cxx?r1=1.9&r2=1.9.56.1 Delta lines: +4 -4 ------------------- --- BPreparedStatement.cxx 2008-04-10 08:12:48+0000 1.9 +++ BPreparedStatement.cxx 2008-08-20 11:29:29+0000 1.9.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: BPreparedStatement.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.56.1 $ * * This file is part of OpenOffice.org. * @@ -67,12 +67,12 @@ // ----------------------------------------------------------------------------- void OAdabasPreparedStatement::setResultSetConcurrency(sal_Int32 /*_par0*/) { - ::dbtools::throwFeatureNotImplementedException( "non-standard result set concurrencies: ", *this ); + ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetConcurrency", *this ); } // ----------------------------------------------------------------------------- void OAdabasPreparedStatement::setResultSetType(sal_Int32 /*_par0*/) { - ::dbtools::throwFeatureNotImplementedException( "non-standard result set types: ", *this ); + ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetType", *this ); } // ----------------------------------------------------------------------------- File [changed]: BStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/adabas/BStatement.cxx?r1=1.9&r2=1.9.56.1 Delta lines: +4 -4 ------------------- --- BStatement.cxx 2008-04-10 08:13:48+0000 1.9 +++ BStatement.cxx 2008-08-20 11:29:29+0000 1.9.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: BStatement.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.56.1 $ * * This file is part of OpenOffice.org. * @@ -63,12 +63,12 @@ // ----------------------------------------------------------------------------- void OAdabasStatement::setResultSetConcurrency(sal_Int32 /*_par0*/) { - ::dbtools::throwFeatureNotImplementedException( "non-standard result set concurrencies: ", *this ); + ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetConcurrency", *this ); } // ----------------------------------------------------------------------------- void OAdabasStatement::setResultSetType(sal_Int32 /*_par0*/) { - ::dbtools::throwFeatureNotImplementedException( "non-standard result set types: ", *this ); + ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetType", *this ); } // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OAdabasStatement::execute( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) File [changed]: BUser.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/adabas/BUser.cxx?r1=1.17&r2=1.17.56.1 Delta lines: +5 -4 ------------------- --- BUser.cxx 2008-04-10 08:15:40+0000 1.17 +++ BUser.cxx 2008-08-20 11:29:29+0000 1.17.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: BUser.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.56.1 $ * * This file is part of OpenOffice.org. * @@ -39,6 +39,7 @@ #include "connectivity/dbexception.hxx" #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/PrivilegeObject.hpp> +#include "resource/adabas_res.hrc" using namespace connectivity::adabas; using namespace ::com::sun::star::uno; @@ -202,7 +203,7 @@ void SAL_CALL OAdabasUser::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not granted: Only table privileges can be granted", "01007", *this ); + m_pConnection->throwGenericSQLException(STR_PRIVILEGE_NOT_GRANTED,*this); ::osl::MutexGuard aGuard(m_aMutex); ::rtl::OUString sPrivs = getPrivilegeString(objPrivileges); @@ -227,7 +228,7 @@ void SAL_CALL OAdabasUser::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not revoked: Only table privileges can be revoked", "01006", *this ); + m_pConnection->throwGenericSQLException(STR_PRIVILEGE_NOT_REVOKED,*this); ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); Directory: /dba/connectivity/source/drivers/ado/ ================================================ File [changed]: Aolevariant.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/Aolevariant.cxx?r1=1.15&r2=1.15.56.1 Delta lines: +7 -3 ------------------- --- Aolevariant.cxx 2008-04-10 08:26:28+0000 1.15 +++ Aolevariant.cxx 2008-08-20 11:29:30+0000 1.15.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Aolevariant.cxx,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.56.1 $ * * This file is part of OpenOffice.org. * @@ -37,6 +37,8 @@ #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/DateTime.hpp> #include "diagnose_ex.h" +#include "resource/sharedresources.hxx" +#include "resource/ado_res.hrc" using namespace connectivity::ado; OLEString::OLEString() @@ -437,8 +439,10 @@ 0, vartype ) ) ) { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_TYPE_NOT_CONVERT)); throw ::com::sun::star::sdbc::SQLException( - ::rtl::OUString::createFromAscii( "Could not convert type!" ), + sError, NULL, ::rtl::OUString::createFromAscii( "S1000" ), 1000, Directory: /dba/connectivity/source/drivers/dbase/ ================================================== File [changed]: DResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/dbase/DResultSet.cxx?r1=1.25.56.1&r2=1.25.56.2 Delta lines: +7 -2 ------------------- --- DResultSet.cxx 2008-08-15 08:32:45+0000 1.25.56.1 +++ DResultSet.cxx 2008-08-20 11:29:30+0000 1.25.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DResultSet.cxx,v $ - * $Revision: 1.25.56.1 $ + * $Revision: 1.25.56.2 $ * * This file is part of OpenOffice.org. * @@ -39,6 +39,7 @@ #include "dbase/DCode.hxx" #include <comphelper/types.hxx> #include <connectivity/dbexception.hxx> +#include "resource/dbase_res.hrc" using namespace ::comphelper; @@ -135,7 +136,11 @@ { sal_Int32 nFirst(0),nSecond(0),nResult(0); if ( !( lhs >>= nFirst ) || !( rhs >>= nSecond ) ) - ::dbtools::throwSQLException( "XRowLocate::compareBookmarks: Invalid bookmark value", "HY111", *this ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sMessage = aResources.getResourceString(STR_INVALID_BOOKMARK); + ::dbtools::throwGenericSQLException(sMessage ,*this); + } // if ( !( lhs >>= nFirst ) || !( rhs >>= nSecond ) ) // have a look at CompareBookmark // we can't use the names there because we already have defines with the same name from the parser Directory: /dba/connectivity/source/drivers/hsqldb/ =================================================== File [changed]: HConnection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HConnection.cxx?r1=1.11.56.1&r2=1.11.56.2 Delta lines: +7 -3 ------------------- --- HConnection.cxx 2008-08-20 07:27:29+0000 1.11.56.1 +++ HConnection.cxx 2008-08-20 11:29:30+0000 1.11.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: HConnection.cxx,v $ - * $Revision: 1.11.56.1 $ + * $Revision: 1.11.56.2 $ * * This file is part of OpenOffice.org. * @@ -242,12 +242,16 @@ return NULL; if ( !_DocumentUI.is() ) + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_NO_DOCUMENTUI)); throw IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The provided DocumentUI is not allowed to be NULL." ) ), + sError, *this, 0 ); - // TODO: resource + } // if ( !_DocumentUI.is() ) + // Reference< XExecutableDialog > xEditor = impl_createLinkedTableEditor_throw( _DocumentUI, _TableName ); // return xEditor.get(); File [changed]: HUser.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HUser.cxx?r1=1.6&r2=1.6.56.1 Delta lines: +14 -4 -------------------- --- HUser.cxx 2008-04-10 09:18:26+0000 1.6 +++ HUser.cxx 2008-08-20 11:29:30+0000 1.6.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: HUser.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.56.1 $ * * This file is part of OpenOffice.org. * @@ -38,6 +38,7 @@ #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/PrivilegeObject.hpp> #include "TConnection.hxx" +#include "resource/hsqldb_res.hrc" using namespace connectivity; using namespace connectivity::hsqldb; @@ -232,7 +233,12 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not granted: Only table privileges can be granted", "01007", *this ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_GRANTED)); + ::dbtools::throwGenericSQLException(sError,*this); + } // if ( objType != PrivilegeObject::TABLE ) + ::osl::MutexGuard aGuard(m_aMutex); @@ -258,7 +264,11 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not revoked: Only table privileges can be revoked", "01006", *this ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_REVOKED)); + ::dbtools::throwGenericSQLException(sError,*this); + } // if ( objType != PrivilegeObject::TABLE ) ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); 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.10.56.1&r2=1.10.56.2 Delta lines: +9 -10 -------------------- --- KDriver.cxx 2008-08-15 08:32:47+0000 1.10.56.1 +++ KDriver.cxx 2008-08-20 11:29:30+0000 1.10.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: KDriver.cxx,v $ - * $Revision: 1.10.56.1 $ + * $Revision: 1.10.56.2 $ * * This file is part of OpenOffice.org. * @@ -250,21 +250,20 @@ // -------------------------------------------------------------------------------- void KabImplModule::impl_throwKdeTooNewException() { - ::rtl::OUStringBuffer aMessage; - aMessage.appendAscii( "The found KDE version is too new. Only KDE up to version " ); - aMessage.append( (sal_Int32)MAX_KDE_VERSION_MAJOR ); - aMessage.append( (sal_Unicode)'.' ); - aMessage.append( (sal_Int32)MAX_KDE_VERSION_MINOR ); - aMessage.appendAscii( " is known to work with this product.\n" ); + ::connectivity::SharedResources aResources; SQLException aError; - aError.Message = aMessage.makeStringAndClear(); + aError.Message = aResources.getResourceStringWithSubstitution( + STR_KDE_VERSION_TOO_NEW, + "$major$",::rtl::OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MAJOR), + "$minor$",::rtl::OUString::valueOf((sal_Int32)MIN_KDE_VERSION_MINOR) + ); aError.SQLState = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) ); aError.ErrorCode = 0; SQLContext aDetails; - aMessage.appendAscii( "If you are sure that your KDE version works, " ); - aMessage.appendAscii( "you might execute the following Basic macro to disable this version check:\n\n" ); + ::rtl::OUStringBuffer aMessage; + aMessage.append( aResources.getResourceString(STR_KDE_VERSION_TOO_NEW_WORK_AROUND) ); aMessage.appendAscii( "Sub disableKDEMaxVersionCheck\n" ); aMessage.appendAscii( " BasicLibraries.LoadLibrary( \"Tools\" )\n" ); Directory: /dba/connectivity/source/drivers/macab/ ================================================== File [changed]: MacabResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/macab/MacabResultSet.cxx?r1=1.3.56.1&r2=1.3.56.2 Delta lines: +9 -4 ------------------- --- MacabResultSet.cxx 2008-08-20 07:27:30+0000 1.3.56.1 +++ MacabResultSet.cxx 2008-08-20 11:29:30+0000 1.3.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MacabResultSet.cxx,v $ - * $Revision: 1.3.56.1 $ + * $Revision: 1.3.56.2 $ * * This file is part of OpenOffice.org. * @@ -43,6 +43,8 @@ #include <com/sun/star/sdbcx/CompareBookmark.hpp> #include "TConnection.hxx" #include <connectivity/dbexception.hxx> +#include "resource/sharedresources.hxx" +#include "resource/macab_res.hrc" using namespace connectivity::macab; using namespace cppu; @@ -201,9 +203,12 @@ columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i))) return i; - ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("Invalid column name: ") + columnName, - NULL); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + STR_NO_ELEMENT_NAME, + "$name$", columnName + ) ); + ::dbtools::throwGenericSQLException(sError , *this); // Unreachable: OSL_ASSERT(false); return 0; File [changed]: MacabResultSetMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx?r1=1.3&r2=1.3.56.1 Delta lines: +6 -19 -------------------- --- MacabResultSetMetaData.cxx 2008-04-10 09:55:52+0000 1.3 +++ MacabResultSetMetaData.cxx 2008-08-20 11:29:31+0000 1.3.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MacabResultSetMetaData.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.56.1 $ * * This file is part of OpenOffice.org. * @@ -65,10 +65,7 @@ // In case, somehow, we don't have anything with the name m_sTableName if(aRecords == NULL) { - ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No Such Table!"), - NULL); - return; + impl_throwError(STR_NO_TABLE); } aHeader = aRecords->getHeader(); @@ -102,10 +99,7 @@ // In case, somehow, we don't have anything with the name m_sTableName if(aRecords == NULL) { - ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No Such Table!"), - NULL); - return -1; + impl_throwError(STR_NO_TABLE); } aHeader = aRecords->getHeader(); @@ -113,11 +107,7 @@ if(aField == NULL) { - ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No column at location: ") + - ::rtl::OUString::valueOf(column), - NULL); - + ::dbtools::throwInvalidIndexException(*this,Any()); return -1; } @@ -150,10 +140,7 @@ // In case, somehow, we don't have anything with the name m_sTableName if(aRecords == NULL) { - ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No Such Table!"), - NULL); - return ::rtl::OUString(); + impl_throwError(STR_NO_TABLE); } aHeader = aRecords->getHeader(); File [changed]: MacabStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/macab/MacabStatement.cxx?r1=1.3.56.1&r2=1.3.56.2 Delta lines: +8 -8 ------------------- --- MacabStatement.cxx 2008-08-15 08:32:48+0000 1.3.56.1 +++ MacabStatement.cxx 2008-08-20 11:29:31+0000 1.3.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MacabStatement.cxx,v $ - * $Revision: 1.3.56.1 $ + * $Revision: 1.3.56.2 $ * * This file is part of OpenOffice.org. * @@ -62,7 +62,7 @@ namespace { - void lcl_throwError(sal_uInt16 _nErrorId) + void impl_throwError(sal_uInt16 _nErrorId) { ::connectivity::SharedResources aResources; const ::rtl::OUString sError( aResources.getResourceString(_nErrorId) ); @@ -95,12 +95,12 @@ // ----------------------------------------------------------------------------- void MacabCommonStatement::resetParameters() const throw(::com::sun::star::sdbc::SQLException) { - lcl_throwError(STR_PARA_ONLY_PREPARED); + impl_throwError(STR_PARA_ONLY_PREPARED); } // ----------------------------------------------------------------------------- void MacabCommonStatement::getNextParameter(::rtl::OUString &) const throw(::com::sun::star::sdbc::SQLException) { - lcl_throwError(STR_PARA_ONLY_PREPARED); + impl_throwError(STR_PARA_ONLY_PREPARED); } // ----------------------------------------------------------------------------- MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pParseNode) const throw(SQLException) @@ -241,7 +241,7 @@ } } } - lcl_throwError(STR_QUERY_TOO_COMPLEX); + impl_throwError(STR_QUERY_TOO_COMPLEX); // Unreachable: OSL_ASSERT(false); return 0; @@ -289,7 +289,7 @@ } } } - lcl_throwError(STR_QUERY_TOO_COMPLEX); + impl_throwError(STR_QUERY_TOO_COMPLEX); // Unreachable: OSL_ASSERT(false); return 0; @@ -450,7 +450,7 @@ // In case, somehow, we don't have anything with the name m_sTableName if(aRecords == NULL) { - lcl_throwError(STR_NO_TABLE); + impl_throwError(STR_NO_TABLE); } else { @@ -472,7 +472,7 @@ // To be continued: UPDATE // DELETE // etc... - lcl_throwError(STR_QUERY_TOO_COMPLEX); + impl_throwError(STR_QUERY_TOO_COMPLEX); } m_xResultSet = Reference<XResultSet>(pResult); File [changed]: macabutilities.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/macab/macabutilities.hxx?r1=1.3&r2=1.3.56.1 Delta lines: +3 -2 ------------------- --- macabutilities.hxx 2008-04-10 09:59:10+0000 1.3 +++ macabutilities.hxx 2008-08-20 11:29:31+0000 1.3.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: macabutilities.hxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.56.1 $ * * This file is part of OpenOffice.org. * @@ -145,6 +145,7 @@ return dataType; } + void impl_throwError(sal_uInt16 _nErrorId); } } Directory: /dba/connectivity/source/drivers/mozab/ ================================================== File [changed]: MDriver.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MDriver.cxx?r1=1.19.56.1&r2=1.19.56.2 Delta lines: +8 -4 ------------------- --- MDriver.cxx 2008-08-15 08:32:48+0000 1.19.56.1 +++ MDriver.cxx 2008-08-20 11:29:31+0000 1.19.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MDriver.cxx,v $ - * $Revision: 1.19.56.1 $ + * $Revision: 1.19.56.2 $ * * This file is part of OpenOffice.org. * @@ -156,9 +156,13 @@ } else { - ::rtl::OUString sMsg = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Could not load the library ")); - sMsg += ::rtl::OUString::createFromAscii(SAL_MODULENAME( "mozabdrv2" )); - ::dbtools::throwGenericSQLException(sMsg,*this); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + STR_COULD_NOT_LOAD_LIB, + "$libname$", ::rtl::OUString::createFromAscii( SAL_MODULENAME( "mozabdrv2" ) ) + ) ); + + ::dbtools::throwGenericSQLException(sError,*this); } return xCon; File [changed]: MResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MResultSet.cxx?r1=1.33.22.2&r2=1.33.22.3 Delta lines: +3 -3 ------------------- --- MResultSet.cxx 2008-08-20 07:27:31+0000 1.33.22.2 +++ MResultSet.cxx 2008-08-20 11:29:31+0000 1.33.22.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: MResultSet.cxx,v $ - * $Revision: 1.33.22.2 $ + * $Revision: 1.33.22.3 $ * * This file is part of OpenOffice.org. * @@ -1179,7 +1179,7 @@ } } - ::dbtools::throwSQLException( "Invalid bookmark value", "HY111", *this ); + m_pStatement->getOwnConnection()->throwGenericSQLException(STR_INVALID_BOOKMARK,*this); return 0; } @@ -1633,7 +1633,7 @@ sal_Int32 nResult=0; if ( !( lhs >>= nFirst ) || !( rhs >>= nSecond ) ) - ::dbtools::throwSQLException( "XRowLocate::compareBookmarks: Invalid bookmark value", "HY111", *this ); + m_pStatement->getOwnConnection()->throwGenericSQLException(STR_INVALID_BOOKMARK,*this); if(nFirst < nSecond) nResult = -1; Directory: /dba/connectivity/source/drivers/mysql/ ================================================== File [changed]: YUser.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YUser.cxx?r1=1.6&r2=1.6.56.1 Delta lines: +13 -4 -------------------- --- YUser.cxx 2008-04-10 10:24:01+0000 1.6 +++ YUser.cxx 2008-08-20 11:29:31+0000 1.6.56.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: YUser.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.56.1 $ * * This file is part of OpenOffice.org. * @@ -38,6 +38,7 @@ #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/PrivilegeObject.hpp> #include "TConnection.hxx" +#include "resource/common_res.hrc" using namespace connectivity; using namespace connectivity::mysql; @@ -232,7 +233,11 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not granted: Only table privileges can be granted", "01007", *this ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_GRANTED)); + ::dbtools::throwGenericSQLException(sError,*this); + } // if ( objType != PrivilegeObject::TABLE ) ::osl::MutexGuard aGuard(m_aMutex); @@ -258,7 +263,11 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) - ::dbtools::throwSQLException( "Privilege not revoked: Only table privileges can be revoked", "01006", *this ); + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_REVOKED)); + ::dbtools::throwGenericSQLException(sError,*this); + } ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); Directory: /dba/connectivity/source/drivers/odbc/ ================================================= File [changed]: OPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OPreparedStatement.cxx?r1=1.49.56.1&r2=1.49.56.2 Delta lines: +15 -16 --------------------- --- OPreparedStatement.cxx 2008-08-15 08:32:49+0000 1.49.56.1 +++ OPreparedStatement.cxx 2008-08-20 11:29:31+0000 1.49.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OPreparedStatement.cxx,v $ - * $Revision: 1.49.56.1 $ + * $Revision: 1.49.56.2 $ * * This file is part of OpenOffice.org. * @@ -772,9 +772,9 @@ Reference< XInputStream> inputStream = boundParams[index - 1].getInputStream (); if ( !inputStream.is() ) { - throw SQLException (::rtl::OUString::createFromAscii("InputStream was not set."), - *this, - ::rtl::OUString(),0,Any()); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_NO_INPUTSTREAM)); + throw SQLException (sError, *this,::rtl::OUString(),0,Any()); } sal_Int32 inputStreamLen = boundParams[index - 1].getInputStreamLen (); sal_Int32 inputStreamType = boundParams[index - 1].getStreamType (); @@ -800,9 +800,9 @@ if (inputStreamLen != 0) { - throw SQLException (::rtl::OUString::createFromAscii("End of InputStream reached before satisfying length specified when InputStream was set"), - *this, - ::rtl::OUString(),0,Any()); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_INPUTSTREAM_WRONG_LEN)); + throw SQLException (sError, *this,::rtl::OUString(),0,Any()); } endOfStream = sal_True; break; @@ -1002,14 +1002,13 @@ { if( !_parameterIndex || _parameterIndex > numParams) { - ::rtl::OUString s_sParameterError = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("You tried to set a parameter at position ")); - s_sParameterError += ::rtl::OUString::valueOf(_parameterIndex); - s_sParameterError += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" but there is/are only ")); - s_sParameterError += ::rtl::OUString::valueOf((sal_Int32)numParams); - s_sParameterError += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" parameter(s) allowed.")); - s_sParameterError += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" One reason may be that the property \"ParameterNameSubstitution\" is not set to TRUE in the data source.")); - static ::rtl::OUString sStatus = ::rtl::OUString::createFromAscii("07009"); - SQLException aNext(s_sParameterError,*this,sStatus,0,Any()); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution(STR_WRONG_PARAM_INDEX, + "$pos$", ::rtl::OUString::valueOf(_parameterIndex), + "$count$", ::rtl::OUString::valueOf((sal_Int32)numParams) + )); + SQLException aNext(sError,*this, ::rtl::OUString(),0,Any()); + ::dbtools::throwInvalidIndexException(*this,makeAny(aNext)); } } File [changed]: OStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OStatement.cxx?r1=1.40.56.1&r2=1.40.56.2 Delta lines: +4 -3 ------------------- --- OStatement.cxx 2008-08-15 08:32:49+0000 1.40.56.1 +++ OStatement.cxx 2008-08-20 11:29:31+0000 1.40.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: OStatement.cxx,v $ - * $Revision: 1.40.56.1 $ + * $Revision: 1.40.56.2 $ * * This file is part of OpenOffice.org. * @@ -550,8 +550,9 @@ // No update count was produced (a ResultSet was). Raise // an exception - throw new SQLException (::rtl::OUString::createFromAscii("No row count was produced"),*this, - ::rtl::OUString(),0,Any()); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceString(STR_NO_ROWCOUNT)); + throw SQLException (sError, *this,::rtl::OUString(),0,Any()); } return numRows; Directory: /dba/connectivity/source/inc/resource/ ================================================= File [changed]: ado_res.hrc Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/resource/ado_res.hrc?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +3 -2 ------------------- --- ado_res.hrc 2008-08-15 08:33:36+0000 1.1.2.1 +++ ado_res.hrc 2008-08-20 11:29:32+0000 1.1.2.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ado_res.hrc,v $ - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -45,6 +45,7 @@ #define STR_INVALID_USER_DESCRIPTOR_ERROR ( STR_ADO_BASE + 6 ) #define STR_INVALID_VIEW_DESCRIPTOR_ERROR ( STR_ADO_BASE + 7 ) #define STR_VIEW_NO_COMMAND_ERROR ( STR_ADO_BASE + 8 ) +#define STR_TYPE_NOT_CONVERT ( STR_ADO_BASE + 9 ) #endif // CONNECTIVITY_RESOURCE_ADO_HRC File [changed]: common_res.hrc Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/resource/common_res.hrc?r1=1.3.56.2&r2=1.3.56.3 Delta lines: +9 -1 ------------------- --- common_res.hrc 2008-08-20 07:27:56+0000 1.3.56.2 +++ common_res.hrc 2008-08-20 11:29:32+0000 1.3.56.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: common_res.hrc,v $ - * $Revision: 1.3.56.2 $ + * $Revision: 1.3.56.3 $ * * This file is part of OpenOffice.org. * @@ -69,5 +69,13 @@ #define STR_UNSUPPORTED_FEATURE ( STR_COMMON_BASE + 28 ) #define STR_UNKNOWN_COLUMN_NAME ( STR_COMMON_BASE + 29 ) #define STR_INVALID_PARA_COUNT ( STR_COMMON_BASE + 30 ) +#define STR_PRIVILEGE_NOT_GRANTED ( STR_COMMON_BASE + 31 ) +#define STR_PRIVILEGE_NOT_REVOKED ( STR_COMMON_BASE + 32 ) +#define STR_INVALID_BOOKMARK ( STR_COMMON_BASE + 33 ) +#define STR_NO_ELEMENT_NAME ( STR_COMMON_BASE + 34 ) +#define STR_NO_INPUTSTREAM ( STR_COMMON_BASE + 35 ) +#define STR_INPUTSTREAM_WRONG_LEN ( STR_COMMON_BASE + 36 ) +#define STR_WRONG_PARAM_INDEX ( STR_COMMON_BASE + 37 ) +#define STR_NO_CONNECTION_GIVEN ( STR_COMMON_BASE + 38 ) #endif // CONNECTIVITY_RESOURCE_COMMON_HRC File [changed]: hsqldb_res.hrc Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/resource/hsqldb_res.hrc?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +2 -1 ------------------- --- hsqldb_res.hrc 2008-08-20 07:27:56+0000 1.1.2.2 +++ hsqldb_res.hrc 2008-08-20 11:29:32+0000 1.1.2.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hsqldb_res.hrc,v $ - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * * This file is part of OpenOffice.org. * @@ -43,6 +43,7 @@ #define STR_NO_TABLE_CONTAINER ( STR_HSQLDB_BASE + 2 ) #define STR_NO_TABLE_EDITOR_DIALOG ( STR_HSQLDB_BASE + 3 ) #define STR_NO_TABLENAME ( STR_HSQLDB_BASE + 4 ) +#define STR_NO_DOCUMENTUI ( STR_HSQLDB_BASE + 5 ) #endif // CONNECTIVITY_RESOURCE_HSQLDB_HRC File [changed]: kab_res.hrc Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/resource/kab_res.hrc?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +4 -2 ------------------- --- kab_res.hrc 2008-08-15 08:34:22+0000 1.1.2.1 +++ kab_res.hrc 2008-08-20 11:29:32+0000 1.1.2.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: kab_res.hrc,v $ - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -39,6 +39,8 @@ #define STR_NO_KDE_INST ( STR_KAB_BASE + 0 ) #define STR_KDE_VERSION_TOO_OLD ( STR_KAB_BASE + 1 ) +#define STR_KDE_VERSION_TOO_NEW ( STR_KAB_BASE + 2 ) +#define STR_KDE_VERSION_TOO_NEW_WORK_AROUND ( STR_KAB_BASE + 3 ) #endif // CONNECTIVITY_RESOURCE_KAB_HRC File [changed]: mozab_res.hrc Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/resource/mozab_res.hrc?r1=1.3.56.2&r2=1.3.56.3 Delta lines: +2 -2 ------------------- --- mozab_res.hrc 2008-08-20 07:27:56+0000 1.3.56.2 +++ mozab_res.hrc 2008-08-20 11:29:32+0000 1.3.56.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mozab_res.hrc,v $ - * $Revision: 1.3.56.2 $ + * $Revision: 1.3.56.3 $ * * This file is part of OpenOffice.org. * @@ -69,7 +69,7 @@ #define STR_QUERY_AT_LEAST_ONE_TABLES ( STR_MOZAB_BASE + 27 ) #define STR_NO_COUNT_SUPPORT ( STR_MOZAB_BASE + 28 ) #define STR_STMT_TYPE_NOT_SUPPORTED ( STR_MOZAB_BASE + 29 ) - +#define STR_COULD_NOT_LOAD_LIB ( STR_MOZAB_BASE + 30 ) #endif // CONNECTIVITY_RESOURCE_MOZAB_HRC Directory: /dba/connectivity/source/resource/ ============================================= File [changed]: conn_shared_res.src Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/resource/conn_shared_res.src?r1=1.9.30.1&r2=1.9.30.2 Delta lines: +94 -3 -------------------- --- conn_shared_res.src 2008-08-15 08:32:51+0000 1.9.30.1 +++ conn_shared_res.src 2008-08-20 11:29:32+0000 1.9.30.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: conn_shared_res.src,v $ - * $Revision: 1.9.30.1 $ + * $Revision: 1.9.30.2 $ * * This file is part of OpenOffice.org. * @@ -122,7 +122,43 @@ // ============================================================================ // = common strings // ============================================================================ +String STR_NO_CONNECTION_GIVEN +{ + Text [ en-US ] = "It doesn't exist a connection to the database."; +}; +String STR_WRONG_PARAM_INDEX +{ + Text [ en-US ] = "You tried to set a parameter at position '$pos$' but there is/are only '$count$' parameter(s) allowed. One reason may be that the property \"ParameterNameSubstitution\" is not set to TRUE in the data source."; +}; +String STR_INPUTSTREAM_WRONG_LEN +{ + Text [ en-US ] = "End of InputStream reached before satisfying length specified when InputStream was set."; +}; +String STR_NO_INPUTSTREAM +{ + Text [ en-US ] = "The input stream was not set."; +}; +String STR_NO_ELEMENT_NAME +{ + Text [ en-US ] = "There is no element named '$name$'."; +}; +String STR_INVALID_BOOKMARK +{ + Text [ en-US ] = "Invalid bookmark value"; +}; +String STR_PRIVILEGE_NOT_GRANTED +{ + Text [ en-US ] = "Privilege not granted: Only table privileges can be granted."; +}; +String STR_PRIVILEGE_NOT_REVOKED +{ + Text [ en-US ] = "Privilege not revoked: Only table privileges can be revoked."; +}; +String STR_UNKNOWN_COLUMN_NAME +{ + Text [ en-US ] = "The column name '$columnname$' is unknown."; +}; String STR_ERRORMSG_SEQUENCE { Text [ en-US ] = "Function sequence error."; @@ -219,6 +255,11 @@ // = the mozab driver's resource strings // ============================================================================ +String STR_COULD_NOT_LOAD_LIB +{ + Text [ en-US ] = "The library '$libname$' could not be loaded."; +}; + String STR_COULD_NOT_LOAD_FILE { Text [ en-US ] = "The file $filename$ could not be loaded."; @@ -278,10 +319,21 @@ Text [ en-US ] = "The query can not be executed. It needs at least one table."; }; +String STR_NO_COUNT_SUPPORT +{ + Text [ en-US ] = "The driver does not support the 'COUNT' function."; +}; +String STR_STMT_TYPE_NOT_SUPPORTED +{ + Text [ en-US ] = "This statement type not supported by this database driver."; +}; // ============================================================================ // = the ado driver's resource strings // ============================================================================ - +String STR_TYPE_NOT_CONVERT +{ + Text [ en-US ] = "The type could not be converted."; +}; String STR_INVALID_COLUMN_DESCRIPTOR_ERROR { Text [ en-US ] = "Could not append column: invalid column descriptor."; @@ -459,6 +511,12 @@ { Text [ en-US ] = "The count of the given parameter values doesn't match the parameters."; }; +String STR_NO_VALID_FILE_URL +{ + Text [ en-US ] = "The URL '$URL$' is not valid. A connection can not be created."; +}; + + String STR_NO_CLASSNAME { Text [ en-US ] = "The driver class '$classname$' could not be loaded."; @@ -500,6 +558,14 @@ { Text [ en-US ] = "KDE version $major$.$minor$ or higher is required to access the KDE Address Book."; }; +String STR_KDE_VERSION_TOO_NEW +{ + Text [ en-US ] = "The found KDE version is too new. Only KDE up to version $major$.$minor$ is known to work with this product.\n"; +}; +String STR_KDE_VERSION_TOO_NEW_WORK_AROUND +{ + Text [ en-US ] = "If you are sure that your KDE version works, you might execute the following Basic macro to disable this version check:\n\n"; +}; String STR_PARA_ONLY_PREPARED { Text [ en-US ] = "Parameters can appear only in prepared statements."; @@ -511,6 +577,11 @@ Text [ en-US ] = "No such table!"; }; +String STR_NO_MAC_OS_FOUND +{ + Text [ en-US ] = "No suitable Mac OS installation was found."; +}; + // ADABAS D String STR_NO_DISK_SPACE { @@ -525,6 +596,10 @@ { Text [ en-US ] = "The current database need to be converted. Please insert control user and password."; }; +String STR_USER_NO_DELETE +{ + Text [ en-US ] = "This user couldn't be deleted. Otherwise the database stays in a inconsistent state."; +}; // hsqldb String STR_NO_STROAGE { @@ -534,3 +609,19 @@ { Text [ en-US ] = "The given URL contains no valid local file system path. Please check the location of your database file."; }; \ No newline at end of file +String STR_NO_TABLE_CONTAINER +{ + Text [ en-US ] = "An error occured while obtaining the connection's table container."; +}; +String STR_NO_TABLE_EDITOR_DIALOG +{ + Text [ en-US ] = "An error occured while creating the table editor dialog."; +}; +String STR_NO_TABLENAME +{ + Text [ en-US ] = "There is no table named '$tablename$'."; +}; +String STR_NO_DOCUMENTUI +{ + Text [ en-US ] = "The provided DocumentUI is not allowed to be NULL."; +}; Directory: /dba/connectivity/source/sdbcx/ ========================================== File [changed]: VCollection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/sdbcx/VCollection.cxx?r1=1.43.56.1&r2=1.43.56.2 Delta lines: +7 -7 ------------------- --- VCollection.cxx 2008-08-20 07:28:04+0000 1.43.56.1 +++ VCollection.cxx 2008-08-20 11:29:32+0000 1.43.56.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VCollection.cxx,v $ - * $Revision: 1.43.56.1 $ + * $Revision: 1.43.56.2 $ * * This file is part of OpenOffice.org. * @@ -334,12 +334,12 @@ if ( !m_pElements->exists(aName) ) { - ::rtl::OUStringBuffer aMessage; - aMessage.appendAscii( "There is no element named '" ); - aMessage.append( aName ); - aMessage.appendAscii( "'." ); - // TODO: resource - throw NoSuchElementException( aMessage.makeStringAndClear(), static_cast< XTypeProvider* >( this ) ); + ::connectivity::SharedResources aResources; + const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + STR_NO_ELEMENT_NAME, + "$name$", aName + ) ); + throw NoSuchElementException( sError, static_cast< XTypeProvider* >( this ) ); } return makeAny(getObject(m_pElements->findColumn(aName))); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
