Kaydet (Commit) 2b9d0597 authored tarafından Ocke Janssen's avatar Ocke Janssen

last changed

üst f5a7239b
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: RowSet.cxx,v $ * $RCSfile: RowSet.cxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: fs $ $Date: 2000-10-05 09:33:39 $ * last change: $Author: oj $ $Date: 2000-10-05 14:52:16 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -1644,11 +1644,13 @@ Reference< XConnection > ORowSet::calcConnection() throw( SQLException, Runtime ...@@ -1644,11 +1644,13 @@ Reference< XConnection > ORowSet::calcConnection() throw( SQLException, Runtime
{ {
#ifdef DEBUG #ifdef DEBUG
Reference<XDriverManager> xMan(m_xServiceManager->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdbc.DriverManager")),UNO_QUERY); Reference<XDriverManager> xMan(m_xServiceManager->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdbc.DriverManager")),UNO_QUERY);
Sequence<PropertyValue> aInfo(1); Sequence<PropertyValue> aInfo(2);
aInfo[0].Name = ::rtl::OUString::createFromAscii("CharSet"); aInfo[0].Name = ::rtl::OUString::createFromAscii("CharSet");
aInfo[0].Value <<= RTL_TEXTENCODING_IBM_850; aInfo[0].Value <<= RTL_TEXTENCODING_IBM_850;
aInfo[1].Name = ::rtl::OUString::createFromAscii("Extension");
aInfo[1].Value <<= ::rtl::OUString::createFromAscii("txt");
m_xActiveConnection = xMan->getConnectionWithInfo(::rtl::OUString::createFromAscii("sdbc:dbase:file:///G|/Office50/user/database/biblio/biblio.dbf"),aInfo); m_xActiveConnection = xMan->getConnectionWithInfo(::rtl::OUString::createFromAscii("sdbc:flat:file:///G|/Office50/user/database/"),aInfo);
if(!m_xActiveConnection.is()) if(!m_xActiveConnection.is())
#endif #endif
throw SQLException(); throw SQLException();
...@@ -2355,6 +2357,9 @@ sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) ...@@ -2355,6 +2357,9 @@ sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId )
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.4 2000/10/05 09:33:39 fs
using comphelper::OPropertyContainer instead of connectivity::OSimplePropertyContainer
Revision 1.3 2000/10/04 13:34:40 oj Revision 1.3 2000/10/04 13:34:40 oj
some changes for deleteRow and updateRow some changes for deleteRow and updateRow
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: RowSetCache.cxx,v $ * $RCSfile: RowSetCache.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: oj $ $Date: 2000-10-04 13:34:40 $ * last change: $Author: oj $ $Date: 2000-10-05 14:52:16 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -184,7 +184,11 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, ...@@ -184,7 +184,11 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
if(xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE))) if(xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISBOOKMARKABLE) && any2bool(xProp->getPropertyValue(PROPERTY_ISBOOKMARKABLE)))
{ {
m_pCacheSet = new OBookmarkSet(_xRs,_pIterator); m_pCacheSet = new OBookmarkSet(_xRs,_pIterator);
m_nPrivileges = Privilege::SELECT | Privilege::INSERT | Privilege::DELETE | Privilege::UPDATE;
// check privileges
m_nPrivileges = Privilege::SELECT;
if(Reference<XResultSetUpdate>(_xRs,UNO_QUERY).is())
m_nPrivileges |= Privilege::INSERT | Privilege::DELETE | Privilege::UPDATE;
} }
else else
{ {
...@@ -196,7 +200,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, ...@@ -196,7 +200,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
else else
{ {
m_pCacheSet = new OKeySet(_xRs,_pIterator); m_pCacheSet = new OKeySet(_xRs,_pIterator);
m_nPrivileges = Privilege::SELECT | Privilege::INSERT | Privilege::DELETE | Privilege::UPDATE; // check privileges
m_nPrivileges = Privilege::SELECT;
if(Reference<XResultSetUpdate>(_xRs,UNO_QUERY).is())
m_nPrivileges |= Privilege::INSERT | Privilege::DELETE | Privilege::UPDATE;
} }
} }
...@@ -964,8 +971,10 @@ sal_Bool ORowSetCache::moveWindow() ...@@ -964,8 +971,10 @@ sal_Bool ORowSetCache::moveWindow()
{ {
if(!m_bRowCountFinal) if(!m_bRowCountFinal)
{ {
m_pCacheSet->previous(); // because we stand after the last row if(m_pCacheSet->previous()) // because we stand after the last row
m_nRowCount = m_pCacheSet->getRow();// + 1 removed m_nRowCount = m_pCacheSet->getRow();// + 1 removed
else
m_nRowCount = 0;
m_bRowCountFinal = sal_True; m_bRowCountFinal = sal_True;
} }
} }
...@@ -1076,10 +1085,10 @@ sal_Bool SAL_CALL ORowSetCache::last( ) throw(SQLException, RuntimeException) ...@@ -1076,10 +1085,10 @@ sal_Bool SAL_CALL ORowSetCache::last( ) throw(SQLException, RuntimeException)
m_nRowCount = m_nPosition = m_pCacheSet->getRow(); // not + 1 m_nRowCount = m_nPosition = m_pCacheSet->getRow(); // not + 1
} }
m_bLast = sal_True; m_bLast = sal_True;
m_nPosition = m_pCacheSet->getRow();
moveWindow(); moveWindow();
// we have to repositioning because moveWindow can modify the cache // we have to repositioning because moveWindow can modify the cache
m_pCacheSet->last(); m_pCacheSet->last();
m_nPosition = m_pCacheSet->getRow();
if(m_nPosition > m_nFetchSize) if(m_nPosition > m_nFetchSize)
m_aMatrixIter = m_pMatrix->end() -1; m_aMatrixIter = m_pMatrix->end() -1;
else else
...@@ -1418,6 +1427,9 @@ void SAL_CALL ORowSetCache::clearWarnings( ) throw(SQLException, RuntimeExcepti ...@@ -1418,6 +1427,9 @@ void SAL_CALL ORowSetCache::clearWarnings( ) throw(SQLException, RuntimeExcepti
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.3 2000/10/04 13:34:40 oj
some changes for deleteRow and updateRow
Revision 1.2 2000/09/29 15:20:51 oj Revision 1.2 2000/09/29 15:20:51 oj
rowset impl rowset impl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment