diff options
-rw-r--r-- | connectivity/source/drivers/mork/MResultSet.cxx | 12 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MResultSet.hxx | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 5fdf9186240e..ff5351a9701f 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -109,7 +109,7 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne ,m_nNewRow(0) ,m_nUpdatedRow(0) ,m_RowStates(0) - ,m_bIsReadOnly(-1) + ,m_bIsReadOnly(TRISTATE_INDET) { //m_aQuery.setMaxNrOfReturns(pStmt->getOwnConnection()->getMaxResultRecords()); } @@ -683,7 +683,7 @@ void OResultSet::getFastPropertyValue( break; case PROPERTY_ID_ISBOOKMARKABLE: const_cast< OResultSet* >( this )->determineReadOnly(); - rValue <<= !m_bIsReadOnly; + rValue <<= (m_bIsReadOnly == TRISTATE_FALSE); break; } } @@ -1070,7 +1070,7 @@ void OResultSet::fillRowData() // If the query is a 0=1 then set Row count to 0 and return if ( m_bIsAlwaysFalseQuery ) { - m_bIsReadOnly = 1; + m_bIsReadOnly = TRISTATE_TRUE; return; } @@ -1837,14 +1837,14 @@ bool OResultSet::determineReadOnly() { // OSL_FAIL( "OResultSet::determineReadOnly( ) not implemented" ); - if (m_bIsReadOnly == -1) + if (m_bIsReadOnly == TRISTATE_INDET) { - m_bIsReadOnly = sal_True; + m_bIsReadOnly = TRISTATE_TRUE; // OConnection* xConnection = static_cast<OConnection*>(m_pStatement->getConnection().get()); // m_bIsReadOnly = !m_aQueryHelper.isWritable(xConnection) || m_bIsAlwaysFalseQuery; } - return m_bIsReadOnly != 0; + return m_bIsReadOnly != TRISTATE_FALSE; } void OResultSet::setTable(OTable* _rTable) diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx index d4c930baf1b4..e35fa7927837 100644 --- a/connectivity/source/drivers/mork/MResultSet.hxx +++ b/connectivity/source/drivers/mork/MResultSet.hxx @@ -33,6 +33,7 @@ #include <com/sun/star/sdbc/XRowUpdate.hpp> #include <cppuhelper/compbase12.hxx> #include <comphelper/proparrhlp.hxx> +#include <tools/gen.hxx> #include "MStatement.hxx" #include "MQueryHelper.hxx" #include <connectivity/CommonTools.hxx> @@ -241,7 +242,7 @@ protected: sal_Int32 m_nNewRow; //inserted row sal_Int32 m_nUpdatedRow; //updated row sal_Int32 m_RowStates; - sal_Int32 m_bIsReadOnly; + TriState m_bIsReadOnly; inline void resetParameters() { m_nParamIndex = 0; } ::rtl::Reference<connectivity::OSQLColumns> m_xColumns; // this are the select columns |