diff options
Diffstat (limited to 'dbaccess/source/core')
-rw-r--r-- | dbaccess/source/core/api/BookmarkSet.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/CacheSet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 34 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 24 | ||||
-rw-r--r-- | dbaccess/source/core/api/TableDeco.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/table.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/tablecontainer.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasecontext.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentdefinition.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/inc/core_resource.hxx | 3 |
16 files changed, 67 insertions, 70 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx index 5bdabccf53e3..3b5f5f79801d 100644 --- a/dbaccess/source/core/api/BookmarkSet.cxx +++ b/dbaccess/source/core/api/BookmarkSet.cxx @@ -76,7 +76,7 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne { Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY); if(!xUpdRow.is()) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); Reference<XResultSetUpdate> xUpd(m_xRowLocate,UNO_QUERY); if(xUpd.is()) @@ -93,14 +93,14 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne (*_rInsertRow->get().begin()) = m_xRowLocate->getBookmark(); } else - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); } void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& /*_xTable*/ ) { Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY); if(!xUpdRow.is()) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); sal_Int32 i = 1; connectivity::ORowVector< ORowSetValue > ::Vector::const_iterator aOrgIter = _rOriginalRow->get().begin()+1; @@ -116,7 +116,7 @@ void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowS if(xUpd.is()) xUpd->updateRow(); else - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this ); } void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index abc79e6b8aab..8e6f5c9837b5 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -290,7 +290,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR } else ::dbtools::throwSQLException( - DBACORE_RESSTRING( RID_STR_NO_UPDATE_MISSING_CONDITION ), StandardSQLState::GENERAL_ERROR, *this ); + DBA_RES( RID_STR_NO_UPDATE_MISSING_CONDITION ), StandardSQLState::GENERAL_ERROR, *this ); // now create end execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(aSql.makeStringAndClear())); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 068c758f04cc..04ab330a3ba3 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -525,7 +525,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow aSql.setLength(aSql.getLength()-1); } else - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); if(!sKeyCondition.isEmpty() || !sIndexCondition.isEmpty()) { @@ -545,7 +545,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow aSql.setLength(aSql.getLength()-5); // remove the last AND } else - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); // now create end execute the prepared statement executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),"",aIndexColumnPositions); @@ -647,7 +647,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi } } if ( !bModified ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); aSql[aSql.getLength() - 1] = ')'; aValues[aValues.getLength() - 1] = ')'; diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 8c6ed505544e..79c2a05d4f59 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -209,10 +209,10 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow } if( aSql.empty() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); if( aKeyConditions.empty() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); @@ -276,7 +276,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn } } if ( aParameter.empty() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); TSQLStatements::iterator aSqlIter = aSql.begin(); diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 9e6a7b5569f5..c78d8c961481 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -998,7 +998,7 @@ void SAL_CALL ORowSet::updateRow( ) } else if ( !m_bAfterLast ) // the update went wrong { - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_UPDATE_FAILED ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_UPDATE_FAILED ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); } } } @@ -1011,15 +1011,15 @@ void SAL_CALL ORowSet::deleteRow( ) checkCache(); if ( m_bBeforeFirst || m_bAfterLast ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_BEFORE_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_DELETE_BEFORE_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); if ( m_bNew ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_INSERT_ROW ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_DELETE_INSERT_ROW ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_RESULT_IS_READONLY ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); if ( ( m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_PRIVILEGE ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_DELETE_PRIVILEGE ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); if ( rowDeleted() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); // this call position the cache indirect Any aBookmarkToDelete( m_aBookmark ); @@ -1185,7 +1185,7 @@ void SAL_CALL ORowSet::moveToInsertRow( ) ::osl::ResettableMutexGuard aGuard( *m_pMutex ); checkPositioningAllowed(); if ( ( m_pCache->m_nPrivileges & Privilege::INSERT ) != Privilege::INSERT ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_INSERT_PRIVILEGE ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_INSERT_PRIVILEGE ), StandardSQLState::GENERAL_ERROR, *this ); if ( notifyAllListenersCursorBeforeMove( aGuard ) ) { @@ -1283,7 +1283,7 @@ void SAL_CALL ORowSet::moveToCurrentRow( ) // m_bModified should be true. Also, as soon as somebody calls moveToInsertRow, // our current row should not be deleted anymore. So, we should not have survived the above // check "if ( !m_pCache->m_bNew && !m_bModified )" - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); if ( notifyAllListenersCursorBeforeMove( aGuard ) ) { @@ -1656,7 +1656,7 @@ void ORowSet::impl_ensureStatement_throw() m_xStatement = m_xActiveConnection->prepareStatement( sCommandToExecute ); if ( !m_xStatement.is() ) { - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INTERNAL_ERROR ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_INTERNAL_ERROR ), StandardSQLState::GENERAL_ERROR, *this ); } Reference< XPropertySet > xStatementProps( m_xStatement, UNO_QUERY_THROW ); @@ -2004,7 +2004,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi if(xColumn.is()) xColumn->getPropertyValue(PROPERTY_NAME) >>= sColumnLabel; else - sColumnLabel = DBACORE_RESSTRING( RID_STR_EXPRESSION1 ); + sColumnLabel = DBA_RES( RID_STR_EXPRESSION1 ); } pColumn->setName(sColumnLabel); aNames.push_back(sColumnLabel); @@ -2374,7 +2374,7 @@ bool ORowSet::impl_buildActiveCommand_throw() } else { - OUString sMessage( DBACORE_RESSTRING( RID_STR_TABLE_DOES_NOT_EXIST ) ); + OUString sMessage( DBA_RES( RID_STR_TABLE_DOES_NOT_EXIST ) ); throwGenericSQLException(sMessage.replaceAll( "$table$", m_aCommand ),*this); } } @@ -2419,7 +2419,7 @@ bool ORowSet::impl_buildActiveCommand_throw() } else { - OUString sMessage( DBACORE_RESSTRING( RID_STR_QUERY_DOES_NOT_EXIST ) ); + OUString sMessage( DBA_RES( RID_STR_QUERY_DOES_NOT_EXIST ) ); throwGenericSQLException(sMessage.replaceAll( "$table$", m_aCommand ),*this); } } @@ -2436,7 +2436,7 @@ bool ORowSet::impl_buildActiveCommand_throw() m_aActiveCommand = sCommand; if ( m_aActiveCommand.isEmpty() && !bDoEscapeProcessing ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_SQL_COMMAND ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_SQL_COMMAND ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this ); return bDoEscapeProcessing; } @@ -2732,16 +2732,16 @@ void ORowSet::checkUpdateConditions(sal_Int32 columnIndex) { checkCache(); if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), StandardSQLState::GENERAL_ERROR, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_RESULT_IS_READONLY ), StandardSQLState::GENERAL_ERROR, *this ); if ( rowDeleted() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *this ); if ( m_aCurrentRow.isNull() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_CURSOR_STATE ), StandardSQLState::INVALID_CURSOR_STATE, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_INVALID_CURSOR_STATE ), StandardSQLState::INVALID_CURSOR_STATE, *this ); if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), StandardSQLState::INVALID_DESCRIPTOR_INDEX, *this ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_INVALID_INDEX ), StandardSQLState::INVALID_DESCRIPTOR_INDEX, *this ); } void SAL_CALL ORowSet::refreshRow( ) diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index d90ad84af330..9ab1c9c66509 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -201,7 +201,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) if ( m_bBeforeFirst || m_bAfterLast ) { SAL_WARN("dbaccess", "ORowSetBase::getValue: Illegal call here (we're before first or after last)!"); - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); } if ( impl_rowDeleted() ) @@ -327,7 +327,7 @@ Reference< css::io::XInputStream > SAL_CALL ORowSetBase::getBinaryStream( sal_In if ( m_bBeforeFirst || m_bAfterLast ) { SAL_WARN("dbaccess", "ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!"); - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); } if ( impl_rowDeleted() ) @@ -397,10 +397,10 @@ Any SAL_CALL ORowSetBase::getBookmark( ) checkCache(); if ( m_bBeforeFirst || m_bAfterLast ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); if ( impl_rowDeleted() ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); + ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_BOOKMARK_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf ); OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::getBookmark: bookmark has no value!" ); return m_aBookmark; diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 9c347c488d54..58e059f71713 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1138,7 +1138,7 @@ sal_Int32 ORowSetCache::getRow( ) bool ORowSetCache::absolute( sal_Int32 row ) { if(!row ) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_ABS_ZERO),nullptr,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_ABS_ZERO),nullptr,SQLSTATE_GENERAL,1000,Any() ); if(row < 0) { @@ -1201,7 +1201,7 @@ bool ORowSetCache::relative( sal_Int32 rows ) nNewPosition = m_nRowCount + 1 + rows; else if ( m_bBeforeFirst || ( m_bRowCountFinal && m_bAfterLast ) ) - throw SQLException( DBACORE_RESSTRING( RID_STR_NO_RELATIVE ), nullptr, SQLSTATE_GENERAL, 1000, Any() ); + throw SQLException( DBA_RES( RID_STR_NO_RELATIVE ), nullptr, SQLSTATE_GENERAL, 1000, Any() ); if ( nNewPosition ) { bErg = absolute( nNewPosition ); @@ -1250,7 +1250,7 @@ bool ORowSetCache::previous( ) void ORowSetCache::refreshRow( ) { if(isAfterLast()) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_REFESH_AFTERLAST),nullptr,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_REFESH_AFTERLAST),nullptr,SQLSTATE_GENERAL,1000,Any() ); OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(),"refreshRow() called for invalid row!"); m_xCacheSet->refreshRow(); m_xCacheSet->fillValueRow(*m_aMatrixIter,m_nPosition); @@ -1274,7 +1274,7 @@ bool ORowSetCache::rowInserted( ) bool ORowSetCache::insertRow(std::vector< Any >& o_aBookmarks) { if ( !m_bNew || !m_aInsertRow->is() ) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_MOVETOINSERTROW_CALLED),nullptr,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_MOVETOINSERTROW_CALLED),nullptr,SQLSTATE_GENERAL,1000,Any() ); m_xCacheSet->insertRow(*m_aInsertRow,m_aUpdateTable); @@ -1330,7 +1330,7 @@ void ORowSetCache::cancelRowModification() void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,std::vector< Any >& o_aBookmarks ) { if(isAfterLast() || isBeforeFirst()) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_UPDATEROW),nullptr,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_UPDATEROW),nullptr,SQLSTATE_GENERAL,1000,Any() ); Any aBookmark = ((*_rUpdateRow)->get())[0].makeAny(); OSL_ENSURE(aBookmark.hasValue(),"Bookmark must have a value!"); @@ -1361,7 +1361,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,std::vector< bool ORowSetCache::deleteRow( ) { if(isAfterLast() || isBeforeFirst()) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_DELETEROW),nullptr,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_DELETEROW),nullptr,SQLSTATE_GENERAL,1000,Any() ); m_xCacheSet->deleteRow(*m_aMatrixIter,m_aUpdateTable); if ( !m_xCacheSet->rowDeleted() ) diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 9f4f17e34b6a..95d417b61e8d 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -135,7 +135,7 @@ namespace _rIterator.setParseTree( pOldNode ); // and now really ... SQLException aError1( _rOriginatingCommand, _rxContext, getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 1000, Any() ); - throw SQLException( DBACORE_RESSTRING( RID_STR_ONLY_QUERY ), _rxContext, + throw SQLException( DBA_RES( RID_STR_ONLY_QUERY ), _rxContext, getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 1000, makeAny( aError1 ) ); } @@ -365,7 +365,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const OUString& Command,sa } else { - OUString sMessage( DBACORE_RESSTRING( RID_STR_TABLE_DOES_NOT_EXIST ) ); + OUString sMessage( DBA_RES( RID_STR_TABLE_DOES_NOT_EXIST ) ); throwGenericSQLException(sMessage.replaceAll( "$table$", Command ),*this); } break; @@ -380,7 +380,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const OUString& Command,sa } else { - OUString sMessage( DBACORE_RESSTRING( RID_STR_QUERY_DOES_NOT_EXIST ) ); + OUString sMessage( DBA_RES( RID_STR_QUERY_DOES_NOT_EXIST ) ); throwGenericSQLException(sMessage.replaceAll( "$table$", Command ),*this); } @@ -447,9 +447,9 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc || !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME) ) { - OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP)); + OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP)); SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); + throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); } OUString aName, aNewName; @@ -460,7 +460,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc m_aCurrentColumns[SelectColumns] && !m_aCurrentColumns[SelectColumns]->hasByName(aName) ) { - OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_MUST_VISIBLE)); + OUString sError(DBA_RES(RID_STR_COLUMN_MUST_VISIBLE)); throw SQLException(sError.replaceAll("%name", aName),*this,SQLSTATE_GENERAL,1000,Any() ); } @@ -517,9 +517,9 @@ OUString OSingleSelectQueryComposer::impl_getColumnNameOrderBy_throw(const Refer || !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME) ) { - OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP)); + OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP)); SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); + throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); } OUString aName; @@ -538,7 +538,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnNameOrderBy_throw(const Refer // Is that supported? if ( !m_xMetaData->supportsOrderByUnrelated() ) { - OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_MUST_VISIBLE)); + OUString sError(DBA_RES(RID_STR_COLUMN_MUST_VISIBLE)); throw SQLException(sError.replaceAll("%name", aName),*this,SQLSTATE_GENERAL,1000,Any() ); } @@ -1537,13 +1537,13 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert || !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_VALUE) || !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME) || !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE)) - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() ); sal_Int32 nType = 0; column->getPropertyValue(PROPERTY_TYPE) >>= nType; sal_Int32 nSearchable = dbtools::getSearchColumnFlag(m_xConnection,nType); if(nSearchable == ColumnSearch::NONE) - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_SEARCHABLE),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_SEARCHABLE),*this,SQLSTATE_GENERAL,1000,Any() ); ::osl::MutexGuard aGuard( m_aMutex ); @@ -1648,7 +1648,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert aSQL.append( "\'" ); } else - throw SQLException(DBACORE_RESSTRING(RID_STR_NOT_SEQUENCE_INT8),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NOT_SEQUENCE_INT8),*this,SQLSTATE_GENERAL,1000,Any() ); } break; case DataType::BIT: diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index e3ecc4113cd0..02e83ef1b336 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -394,7 +394,7 @@ void SAL_CALL ODBTableDecorator::rename( const OUString& _rNewName ) xRename->rename(_rNewName); } else // not supported - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); } // XAlterTable, @@ -408,7 +408,7 @@ void SAL_CALL ODBTableDecorator::alterColumnByName( const OUString& _rName, cons xAlter->alterColumnByName(_rName,_rxDescriptor); } else - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_ALTER_BY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_COLUMN_ALTER_BY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); if(m_pColumns) m_pColumns->refresh(); } @@ -425,7 +425,7 @@ void SAL_CALL ODBTableDecorator::alterColumnByIndex( sal_Int32 _nIndex, const Re m_pColumns->refresh(); } else // not supported - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_ALTER_BY_INDEX),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_COLUMN_ALTER_BY_INDEX),*this,SQLSTATE_GENERAL,1000,Any() ); } Reference< XNameAccess> ODBTableDecorator::getIndexes() diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index b5b70ba23ede..f426b9d992cd 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -281,7 +281,7 @@ void SAL_CALL ODBTable::rename( const OUString& _rNewName ) ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(connectivity::sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed); if ( !getRenameService().is() ) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); Reference<XPropertySet> xTable(this); getRenameService()->rename(xTable,_rNewName); @@ -294,10 +294,10 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(connectivity::sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed); if ( !getAlterService().is() ) - throw SQLException(DBACORE_RESSTRING(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); if ( !m_pColumns->hasByName(_rName) ) - throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() ); + throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() ); Reference<XPropertySet> xTable(this); getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor); diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 6d6a5ab9c8de..fee4f5fa2cee 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -265,7 +265,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer OUString aName = getString(descriptor->getPropertyValue(PROPERTY_NAME)); if(m_xMasterContainer.is() && m_xMasterContainer->hasByName(aName)) { - OUString sMessage(DBACORE_RESSTRING(RID_STR_TABLE_IS_FILTERED)); + OUString sMessage(DBA_RES(RID_STR_TABLE_IS_FILTERED)); throw SQLException(sMessage.replaceAll("$name$", aName),static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)),SQLSTATE_GENERAL,1000,Any()); } diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 33267c063358..accc80ac7e56 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -780,7 +780,7 @@ void OConnection::impl_checkTableQueryNames_nothrow() { if ( aSortedTableNames.find( *pQueryName ) != aSortedTableNames.end() ) { - OUString sConflictWarning( DBACORE_RESSTRING( RID_STR_CONFLICTING_NAMES ) ); + OUString sConflictWarning( DBA_RES( RID_STR_CONFLICTING_NAMES ) ); m_aWarnings.appendWarning( sConflictWarning, "01SB0", *this ); } } diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 6bf904125df9..a29f9971e73a 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -334,7 +334,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa ) { // #i40463# #i39187# - OUString sErrorMessage( DBACORE_RESSTRING( RID_STR_FILE_DOES_NOT_EXIST ) ); + OUString sErrorMessage( DBA_RES( RID_STR_FILE_DOES_NOT_EXIST ) ); ::svt::OFileNotation aTransformer( _sURL ); SQLException aError; @@ -438,7 +438,7 @@ void ODatabaseContext::registerObject(const OUString& _rName, const Reference< X OUString sURL = xModel->getURL(); if ( sURL.isEmpty() ) - throw IllegalArgumentException( DBACORE_RESSTRING( RID_STR_DATASOURCE_NOT_STORED ), *this, 2 ); + throw IllegalArgumentException( DBA_RES( RID_STR_DATASOURCE_NOT_STORED ), *this, 2 ); registerDatabaseLocation( _rName, sURL ); diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 3c1a828f5bba..c56f67b90f18 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -676,11 +676,11 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString if ( !xReturn.is() ) { - OUString sMessage = DBACORE_RESSTRING( nExceptionMessageId ) + OUString sMessage = DBA_RES(nExceptionMessageId) .replaceAll("$name$", m_pImpl->m_sConnectURL); SQLContext aContext; - aContext.Message = DBACORE_RESSTRING(RID_STR_CONNECTION_REQUEST). + aContext.Message = DBA_RES(RID_STR_CONNECTION_REQUEST). replaceFirst("$name$", m_pImpl->m_sConnectURL); throwGenericSQLException( sMessage, static_cast< XDataSource* >( this ), makeAny( aContext ) ); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index c23e95853a7a..2ea984863578 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -1227,9 +1227,9 @@ bool ODocumentDefinition::save(bool _bApprove) if ( aRequest.Name.isEmpty() ) { if ( m_bForm ) - aRequest.Name = DBACORE_RESSTRING( RID_STR_FORM ); + aRequest.Name = DBA_RES( RID_STR_FORM ); else - aRequest.Name = DBACORE_RESSTRING( RID_STR_REPORT ); + aRequest.Name = DBA_RES( RID_STR_REPORT ); aRequest.Name = ::dbtools::createUniqueName(xName,aRequest.Name); } @@ -1586,7 +1586,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ if ( !xEnumDrivers.is() || !xEnumDrivers->hasMoreElements() ) { css::io::WrongFormatException aWFE; - aWFE.Message = DBACORE_RESSTRING( RID_STR_MISSING_EXTENSION ); + aWFE.Message = DBA_RES( RID_STR_MISSING_EXTENSION ); throw aWFE; } } @@ -2059,9 +2059,9 @@ void ODocumentDefinition::updateDocumentTitle() if ( sName.isEmpty() ) { if ( m_bForm ) - sName = DBACORE_RESSTRING( RID_STR_FORM ); + sName = DBA_RES( RID_STR_FORM ); else - sName = DBACORE_RESSTRING( RID_STR_REPORT ); + sName = DBA_RES( RID_STR_REPORT ); Reference< XUntitledNumbers > xUntitledProvider(m_pImpl->m_pDataSource->getModel_noCreate(), UNO_QUERY ); if ( xUntitledProvider.is() ) sName += OUString::number( xUntitledProvider->leaseNumber(getComponent()) ); diff --git a/dbaccess/source/core/inc/core_resource.hxx b/dbaccess/source/core/inc/core_resource.hxx index e09f96847050..3c6a7eb229e9 100644 --- a/dbaccess/source/core/inc/core_resource.hxx +++ b/dbaccess/source/core/inc/core_resource.hxx @@ -31,9 +31,6 @@ namespace dbaccess #define DBA_RES( id ) ResourceManager::loadString( id ) #define DBA_RES_PARAM( id, ascii, replace ) ResourceManager::loadString( id, ascii, replace ) -#define DBACORE_RESSTRING( id ) DBA_RES( id ) - // (compatibility) - // ResourceManager // handling resources within the DBA-Core library class ResourceManager |