summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2000-10-17 08:15:19 +0000
committerOcke Janssen <oj@openoffice.org>2000-10-17 08:15:19 +0000
commita5228a8f434a6a5fadb87384a66041bc1964b037 (patch)
tree2ce197d8b851facb14333b2319931cf38f4c979e
parent1e7414338e828d9d27cbd228a09c5b7087fefd2d (diff)
class renamed
-rw-r--r--connectivity/source/drivers/dbase/DConnection.cxx6
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx20
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx57
-rw-r--r--connectivity/source/drivers/flat/ECatalog.cxx7
-rw-r--r--connectivity/source/drivers/flat/EConnection.cxx11
-rw-r--r--connectivity/source/drivers/flat/makefile.mk13
6 files changed, 67 insertions, 47 deletions
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx
index ecf8b8efb4b3..fcaae386a191 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DConnection.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2000-10-06 14:51:31 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:15:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -159,8 +159,8 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con
throw DisposedException();
ODbasePreparedStatement* pStmt = new ODbasePreparedStatement(this,m_aTypeInfo);
- pStmt->construct(sql);
Reference< XPreparedStatement > xHoldAlive = pStmt;
+ pStmt->construct(sql);
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
return pStmt;
}
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index e7d21a8fe581..8c91e173447c 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DIndex.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-10-09 12:30:30 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:15:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -235,7 +235,7 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp,
return new OIndexIterator(this, pOp, pOperand);
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const OFileValue& rValue)
+BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue)
{
OSL_ENSHURE(m_aFileStream.IsOpen(),"FileStream is not opened!");
// Sucht ein bestimmten Wert im Index
@@ -262,7 +262,7 @@ BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const OFileValue&
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Find(sal_uInt32 nRec, const OFileValue& rValue)
+BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSHURE(m_aFileStream.IsOpen(),"FileStream is not opened!");
@@ -273,7 +273,7 @@ BOOL ODbaseIndex::Find(sal_uInt32 nRec, const OFileValue& rValue)
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const OFileValue& rValue)
+BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSHURE(m_aFileStream.IsOpen(),"FileStream is not opened!");
@@ -297,8 +297,8 @@ BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const OFileValue& rValue)
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Update(sal_uInt32 nRec, const OFileValue& rOldValue,
- const OFileValue& rNewValue)
+BOOL ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue,
+ const ORowSetValue& rNewValue)
{
openIndexFile();
OSL_ENSHURE(m_aFileStream.IsOpen(),"FileStream is not opened!");
@@ -310,7 +310,7 @@ BOOL ODbaseIndex::Update(sal_uInt32 nRec, const OFileValue& rOldValue,
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const OFileValue& rValue)
+BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSHURE(m_aFileStream.IsOpen(),"FileStream is not opened!");
@@ -650,7 +650,7 @@ BOOL ODbaseIndex::CreateImpl()
// ueberpruefen auf doppelten eintrag
if (m_IsUnique && m_nCurNode != NODE_NOTFOUND)
{
- ONDXKey aKey(m_aHeader.db_keytype ? OFileValue(xRow->getDouble(1)) : OFileValue(xRow->getString(1)), nType, 0);
+ ONDXKey aKey(m_aHeader.db_keytype ? ORowSetValue(xRow->getDouble(1)) : ORowSetValue(xRow->getString(1)), nType, 0);
if (aKey == (*m_aCurLeaf)[m_nCurNode].GetKey())
{
// String aText = String(OResId(STR_STAT_INDEX_NOT_UNIQUE));
@@ -662,7 +662,7 @@ BOOL ODbaseIndex::CreateImpl()
break;
}
}
- ONDXKey aKey(m_aHeader.db_keytype ? OFileValue(xRow->getDouble(1)) : OFileValue(xRow->getString(1)), nType, xSet->getRow());
+ ONDXKey aKey(m_aHeader.db_keytype ? ORowSetValue(xRow->getDouble(1)) : ORowSetValue(xRow->getString(1)), nType, xSet->getRow());
ONDXNode aNewNode(aKey);
if (!m_aCurLeaf->Insert(aNewNode, --nRowsLeft))
break;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 1fefc2b1d46c..97fae25eb580 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DTable.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2000-10-11 10:45:54 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:15:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -522,7 +522,14 @@ void SAL_CALL ODbaseTable::disposing(void)
{
OFileTable::disposing();
::osl::MutexGuard aGuard(m_aMutex);
+#ifdef DEBUG
+ for(OSQLColumns::const_iterator aIter = m_aColumns->begin();aIter != m_aColumns->end();++aIter)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet> xProp = *aIter;
+ xProp = NULL;
+ }
m_aColumns->clear();
+#endif
}
// -------------------------------------------------------------------------
Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException)
@@ -811,7 +818,7 @@ sal_Bool ODbaseTable::fetchRow(file::OValueRow _rRow,const OSQLColumns & _rCols,
default:
OSL_ASSERT("Falscher Type");
}
- (*_rRow)[i].setType(nType);
+ (*_rRow)[i].setTypeKind(nType);
}
// if (aStatus.IsError())
@@ -822,7 +829,7 @@ sal_Bool ODbaseTable::fetchRow(file::OValueRow _rRow,const OSQLColumns & _rCols,
return sal_True;
}
//------------------------------------------------------------------
-BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, OFileValue& aVariable)
+BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
{
BOOL bIsText = TRUE;
// SdbConnection* pConnection = GetConnection();
@@ -833,7 +840,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, OFileValue& aVariable)
case MemodBaseIII: // dBase III-Memofeld, endet mit Ctrl-Z
{
const char cEOF = (char) 0x1a;
- ByteString aStr;
+ ByteString aBStr;
static char aBuf[514];
aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen
BOOL bReady = sal_False;
@@ -848,11 +855,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, OFileValue& aVariable)
bReady = aBuf[i] == cEOF;
aBuf[i] = 0;
- aStr += aBuf;
+ aBStr += aBuf;
- } while (!bReady && !m_aMemoStream.IsEof() && aStr.Len() < STRING_MAXLEN);
+ } while (!bReady && !m_aMemoStream.IsEof() && aBStr.Len() < STRING_MAXLEN);
+
+ ::rtl::OUString aStr(aBStr.GetBuffer(), aBStr.Len(),getConnection()->getTextEncoding());
+ aVariable = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aStr.getStr()),aStr.getLength());
- aVariable = ::rtl::OUString(aStr.GetBuffer(), aStr.Len(),getConnection()->getTextEncoding());
} break;
case MemoFoxPro:
case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
@@ -897,23 +906,25 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, OFileValue& aVariable)
// char cChar;
if (nLength < STRING_MAXLEN && bIsText)
{
- ByteString aStr;
- aStr.Expand(USHORT (nLength));
- m_aMemoStream.Read(aStr.AllocBuffer((USHORT)nLength),nLength);
- aStr.ReleaseBufferAccess();
- aVariable = ::rtl::OUString(aStr.GetBuffer(),aStr.Len(), getConnection()->getTextEncoding());
+ ByteString aBStr;
+ aBStr.Expand(USHORT (nLength));
+ m_aMemoStream.Read(aBStr.AllocBuffer((USHORT)nLength),nLength);
+ aBStr.ReleaseBufferAccess();
+ ::rtl::OUString aStr(aBStr.GetBuffer(),aBStr.Len(), getConnection()->getTextEncoding());
+ aVariable = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aStr.getStr()),aStr.getLength());
}
else
{
-// ::Sequence<sal_Int8> aText(nLength);
-// sal_Int8* pData = aText.getArray();
-// for (ULONG i = 0; i < nLength; i++)
-// {
-// m_aMemoStream.Read(&cChar,1);
-// (*pData++) = cChar;
-// }
-// aVariable.setBytes(aText);
- return sal_False;
+ Sequence<sal_Int8> aText(nLength);
+ sal_Int8* pData = aText.getArray();
+ sal_Char cChar;
+ for (ULONG i = 0; i < nLength; i++)
+ {
+ m_aMemoStream.Read(&cChar,1);
+ (*pData++) = cChar;
+ }
+ aVariable = aText;
+ // return sal_False;
}
}
}
@@ -1415,7 +1426,7 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
}
//------------------------------------------------------------------
-BOOL ODbaseTable::WriteMemo(OFileValue& aVariable, ULONG& rBlockNr)
+BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
{
// wird die BlockNr 0 vorgegeben, wird der block ans Ende gehaengt
char cChar = 0;
diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx
index 7705ec929ae5..76328570f525 100644
--- a/connectivity/source/drivers/flat/ECatalog.cxx
+++ b/connectivity/source/drivers/flat/ECatalog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ECatalog.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2000-10-05 14:42:24 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:14:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,8 +96,7 @@ OFlatCatalog::OFlatCatalog(OFlatConnection* _pCon) : file::OFileCatalog(_pCon)
void OFlatCatalog::refreshTables()
{
::std::vector< ::rtl::OUString> aVector;
- Sequence< ::rtl::OUString > aTypes(1);
- aTypes[0] = ::rtl::OUString::createFromAscii("%");
+ Sequence< ::rtl::OUString > aTypes;
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),
::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes);
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index 968cedc2c98a..d6b8eb2eb5f9 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: EConnection.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2000-10-05 14:42:44 $
+ * last change: $Author: oj $ $Date: 2000-10-17 09:14:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -184,8 +184,9 @@ Reference< XStatement > SAL_CALL OFlatConnection::createStatement( ) throw(SQLE
throw DisposedException();
OFlatStatement* pStmt = new OFlatStatement(this);
+ Reference< XStatement > xStmt = pStmt;
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
- return pStmt;
+ return xStmt;
}
// --------------------------------------------------------------------------------
Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
@@ -195,9 +196,11 @@ Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( cons
throw DisposedException();
OFlatPreparedStatement* pStmt = new OFlatPreparedStatement(this,m_aTypeInfo);
+ Reference< XPreparedStatement > xStmt = pStmt;
pStmt->construct(sql);
+
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
- return pStmt;
+ return xStmt;
}
// --------------------------------------------------------------------------------
Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/flat/makefile.mk b/connectivity/source/drivers/flat/makefile.mk
index 1e27dd12bec3..84d8bd942ad1 100644
--- a/connectivity/source/drivers/flat/makefile.mk
+++ b/connectivity/source/drivers/flat/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: oj $ $Date: 2000-10-05 14:44:19 $
+# last change: $Author: oj $ $Date: 2000-10-17 09:14:16 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -123,9 +123,16 @@ SHL1STDLIBS=\
$(SVLLIB) \
$(SVLIB) \
$(TOOLSLIB) \
+ $(SVTOOLLIB) \
+ $(SVTLIB) \
$(UNOTOOLSLIB) \
$(UCBHELPERLIB) \
- $(SALLIB)
+ $(SALLIB) \
+ $(COMPHELPERLIB)
+
+.IF "$(COMPHELPERLIB)" == ""
+SHL1STDLIBS+= icomphelp2.lib
+.ENDIF
SHL1DEPN=
SHL1IMPLIB= i$(FLAT_TARGET)