summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/firebird')
-rw-r--r--connectivity/source/drivers/firebird/Blob.cxx10
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx18
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx16
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx2
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx14
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Util.hxx4
7 files changed, 34 insertions, 34 deletions
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 8ed9fc4a8ac7..9cbc0a1b6d03 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -67,7 +67,7 @@ void Blob::ensureBlobIsOpened()
nullptr);
if (aErr)
- evaluateStatusVector(m_statusVector, "isc_open_blob2", *this);
+ evaluateStatusVector(m_statusVector, u"isc_open_blob2", *this);
m_bBlobOpened = true;
m_nBlobPosition = 0;
@@ -90,7 +90,7 @@ void Blob::ensureBlobIsOpened()
aResultBuffer);
if (aErr)
- evaluateStatusVector(m_statusVector, "isc_blob_info", *this);
+ evaluateStatusVector(m_statusVector, u"isc_blob_info", *this);
char* pIt = aResultBuffer;
while( *pIt != isc_info_end ) // info is in clusters
@@ -141,7 +141,7 @@ bool Blob::readOneSegment(uno::Sequence< sal_Int8 >& rDataOut)
if (aRet && aRet != isc_segstr_eof && IndicatesError(m_statusVector))
{
- OUString sError(StatusVectorToString(m_statusVector, "isc_get_segment"));
+ OUString sError(StatusVectorToString(m_statusVector, u"isc_get_segment"));
throw IOException(sError, *this);
}
m_nBlobPosition += nActualSize;
@@ -160,7 +160,7 @@ void Blob::closeBlob()
aErr = isc_close_blob(m_statusVector,
&m_blobHandle);
if (aErr)
- evaluateStatusVector(m_statusVector, "isc_close_blob", *this);
+ evaluateStatusVector(m_statusVector, u"isc_close_blob", *this);
m_bBlobOpened = false;
#if SAL_TYPES_SIZEOFPOINTER == 8
@@ -299,7 +299,7 @@ sal_Int32 SAL_CALL Blob::readBytes(uno::Sequence< sal_Int8 >& rDataOut,
reinterpret_cast<char*>(rDataOut.getArray()) + nTotalBytesRead);
if (aErr && IndicatesError(m_statusVector))
{
- OUString sError(StatusVectorToString(m_statusVector, "isc_get_segment"));
+ OUString sError(StatusVectorToString(m_statusVector, u"isc_get_segment"));
throw IOException(sError, *this);
}
nTotalBytesRead += nBytesRead;
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 05c24e9f73be..6ec8940cd8a4 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -274,7 +274,7 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
0);
if (aErr)
{
- evaluateStatusVector(status, "isc_create_database", *this);
+ evaluateStatusVector(status, u"isc_create_database", *this);
}
}
else
@@ -292,7 +292,7 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >&
dpbBuffer.c_str());
if (aErr)
{
- evaluateStatusVector(status, "isc_attach_database", *this);
+ evaluateStatusVector(status, u"isc_attach_database", *this);
}
}
@@ -490,7 +490,7 @@ void Connection::setupTransaction()
aTPB);
evaluateStatusVector(status_vector,
- "isc_start_transaction",
+ u"isc_start_transaction",
*this);
}
@@ -516,7 +516,7 @@ void SAL_CALL Connection::commit()
disposeStatements();
isc_commit_transaction(status_vector, &m_aTransactionHandle);
evaluateStatusVector(status_vector,
- "isc_commit_transaction",
+ u"isc_commit_transaction",
*this);
}
}
@@ -569,7 +569,7 @@ isc_svc_handle Connection::attachServiceManager()
aSPBBuffer))
{
evaluateStatusVector(aStatusVector,
- "isc_service_attach",
+ u"isc_service_attach",
*this);
}
@@ -583,7 +583,7 @@ void Connection::detachServiceManager(isc_svc_handle aServiceHandle)
&aServiceHandle))
{
evaluateStatusVector(aStatusVector,
- "isc_service_detach",
+ u"isc_service_detach",
*this);
}
}
@@ -642,7 +642,7 @@ void Connection::runBackupService(const short nAction)
aRequest.getLength(),
aRequest.getStr()))
{
- evaluateStatusVector(aStatusVector, "isc_service_start", *this);
+ evaluateStatusVector(aStatusVector, u"isc_service_start", *this);
}
char aInfoSPB = isc_info_svc_line;
@@ -658,7 +658,7 @@ void Connection::runBackupService(const short nAction)
sizeof(aResults),
aResults))
{
- evaluateStatusVector(aStatusVector, "isc_service_query", *this);
+ evaluateStatusVector(aStatusVector, u"isc_service_query", *this);
}
detachServiceManager(aServiceHandle);
@@ -911,7 +911,7 @@ void Connection::disposing()
{
if (isc_detach_database(status, &m_aDBHandle))
{
- evaluateStatusVector(status, "isc_detach_database", *this);
+ evaluateStatusVector(status, u"isc_detach_database", *this);
}
}
// TODO: write to storage again?
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 56fa1827bdad..3f7859d1dba7 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -307,7 +307,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
// Do not throw error. Trying to close a closed cursor is not a
// critical mistake.
OUString sErrMsg = StatusVectorToString(m_statusVector,
- "isc_dsql_free_statement: close cursor");
+ u"isc_dsql_free_statement: close cursor");
SAL_WARN("connectivity.firebird", sErrMsg);
}
}
@@ -320,7 +320,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
if (aErr)
{
SAL_WARN("connectivity.firebird", "isc_dsql_execute failed" );
- evaluateStatusVector(m_statusVector, "isc_dsql_execute", *this);
+ evaluateStatusVector(m_statusVector, u"isc_dsql_execute", *this);
}
m_xResultSet = new OResultSet(m_pConnection.get(),
@@ -565,7 +565,7 @@ void OPreparedStatement::openBlobForWriting(isc_blob_handle& rBlobHandle, ISC_QU
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "setBlob failed on " + m_sSqlStatement,
+ OUString("setBlob failed on " + m_sSqlStatement),
*this);
assert(false);
}
@@ -580,7 +580,7 @@ void OPreparedStatement::closeBlobAfterWriting(isc_blob_handle& rBlobHandle)
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_close_blob failed",
+ u"isc_close_blob failed",
*this);
assert(false);
}
@@ -632,7 +632,7 @@ void SAL_CALL OPreparedStatement::setClob(sal_Int32 nParameterIndex, const Refer
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_put_segment failed",
+ u"isc_put_segment failed",
*this);
assert(false);
}
@@ -670,7 +670,7 @@ void OPreparedStatement::setClob( sal_Int32 nParameterIndex, const OUString& rSt
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_put_segment failed",
+ u"isc_put_segment failed",
*this);
assert(false);
}
@@ -722,7 +722,7 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_put_segment failed",
+ u"isc_put_segment failed",
*this);
assert(false);
}
@@ -890,7 +890,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_put_segment failed",
+ u"isc_put_segment failed",
*this);
assert(false);
}
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 7ae77c607e0d..975d5c13ce97 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -144,7 +144,7 @@ sal_Bool SAL_CALL OResultSet::next()
{
SAL_WARN("connectivity.firebird", "Error when fetching data");
// Throws sql exception as appropriate
- evaluateStatusVector(m_statusVector, "isc_dsql_fetch", *this);
+ evaluateStatusVector(m_statusVector, u"isc_dsql_fetch", *this);
return false;
}
}
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 1d7d5ef32bdf..3f44dcd3587b 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -78,7 +78,7 @@ void OStatementCommonBase::freeStatementHandle()
&m_aStatementHandle,
DSQL_drop);
evaluateStatusVector(m_statusVector,
- "isc_dsql_free_statement",
+ u"isc_dsql_free_statement",
*this);
}
}
@@ -146,7 +146,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_dsql_allocate_statement",
+ u"isc_dsql_allocate_statement",
*this);
}
else
@@ -162,7 +162,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_dsql_prepare",
+ u"isc_dsql_prepare",
*this);
}
else
@@ -176,7 +176,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
{
// TODO: free statement handle, etc.?
evaluateStatusVector(m_statusVector,
- "isc_dsql_describe",
+ u"isc_dsql_describe",
*this);
}
else
@@ -199,7 +199,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(std::u16string_view sql,
if (aErr)
{
evaluateStatusVector(m_statusVector,
- "isc_dsql_describe",
+ u"isc_dsql_describe",
*this);
}
else
@@ -379,7 +379,7 @@ short OStatementCommonBase::getSqlInfoItem(char aInfoItem)
}
evaluateStatusVector(aStatusVector,
- "isc_dsq_sql_info",
+ u"isc_dsq_sql_info",
*this);
return 0;
}
@@ -411,7 +411,7 @@ sal_Int32 OStatementCommonBase::getStatementChangeCount()
if (aErr)
{
evaluateStatusVector(aStatusVector,
- "isc_dsq_sql_info",
+ u"isc_dsq_sql_info",
*this);
return 0;
}
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 82d69a123c97..3bf3cfbc4d82 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -31,7 +31,7 @@ OUString firebird::sanitizeIdentifier(const OUString& rIdentifier)
}
OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
- const OUString& rCause)
+ std::u16string_view rCause)
{
OUStringBuffer buf;
const ISC_STATUS* pStatus = reinterpret_cast<const ISC_STATUS*>(&rStatusVector);
@@ -59,7 +59,7 @@ OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
}
void firebird::evaluateStatusVector(const ISC_STATUS_ARRAY& rStatusVector,
- const OUString& rCause,
+ std::u16string_view rCause,
const uno::Reference< XInterface >& _rxContext)
{
if (IndicatesError(rStatusVector))
diff --git a/connectivity/source/drivers/firebird/Util.hxx b/connectivity/source/drivers/firebird/Util.hxx
index efb222f3ff22..0724410165a2 100644
--- a/connectivity/source/drivers/firebird/Util.hxx
+++ b/connectivity/source/drivers/firebird/Util.hxx
@@ -95,7 +95,7 @@ public:
}
OUString StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector,
- const OUString& rCause);
+ std::u16string_view rCause);
/**
* Evaluate a firebird status vector and throw exceptions as necessary.
@@ -104,7 +104,7 @@ public:
* @throws css::sdbc::SQLException
*/
void evaluateStatusVector(const ISC_STATUS_ARRAY& rStatusVector,
- const OUString& aCause,
+ std::u16string_view aCause,
const css::uno::Reference< css::uno::XInterface >& _rxContext);
/**