summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/commontools/FValue.cxx2
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DCode.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx64
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx28
-rw-r--r--connectivity/source/drivers/dbase/DNoException.cxx80
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx200
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx160
-rw-r--r--connectivity/source/drivers/evoab/LFolderList.cxx22
-rw-r--r--connectivity/source/drivers/evoab/LFolderList.hxx2
-rw-r--r--connectivity/source/drivers/evoab/LNoException.cxx18
-rw-r--r--connectivity/source/drivers/evoab/LTable.cxx26
-rw-r--r--connectivity/source/drivers/file/FNoException.cxx6
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx12
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx78
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx6
-rw-r--r--connectivity/source/drivers/file/FTable.cxx6
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx4
-rw-r--r--connectivity/source/drivers/file/fcode.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx2
-rw-r--r--connectivity/source/drivers/file/quotedstring.cxx16
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx20
-rw-r--r--connectivity/source/drivers/mozab/pre_include_mozilla.h7
-rw-r--r--connectivity/source/inc/dbase/DIndex.hxx28
-rw-r--r--connectivity/source/inc/dbase/DIndexIter.hxx16
-rw-r--r--connectivity/source/inc/dbase/DIndexPage.hxx8
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx54
-rw-r--r--connectivity/source/inc/dbase/dindexnode.hxx126
-rw-r--r--connectivity/source/inc/file/FPreparedStatement.hxx2
-rw-r--r--connectivity/source/inc/file/FResultSet.hxx14
-rw-r--r--connectivity/source/inc/file/FStatement.hxx4
-rw-r--r--connectivity/source/inc/file/FTable.hxx6
-rw-r--r--connectivity/source/inc/file/fanalyzer.hxx6
-rw-r--r--connectivity/source/inc/flat/ETable.hxx2
34 files changed, 513 insertions, 520 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 1e39befaf5f7..95aabb821b1a 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -32,7 +32,7 @@
#include "connectivity/FValue.hxx"
#include "connectivity/CommonTools.hxx"
#include <connectivity/dbconversion.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 20214c18af75..ef150f126060 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -829,12 +829,12 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::fetchRow" );
// read the bookmark
- BOOL bIsCurRecordDeleted = sal_False;
+ sal_Bool bIsCurRecordDeleted = sal_False;
_rRow->setDeleted(bIsCurRecordDeleted);
*(_rRow->get())[0] = m_nFilePos;
if (!bRetrieveData)
- return TRUE;
+ return sal_True;
// fields
diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx
index d292c7ab5291..8c826766b2c4 100644
--- a/connectivity/source/drivers/dbase/DCode.cxx
+++ b/connectivity/source/drivers/dbase/DCode.cxx
@@ -114,7 +114,7 @@ OEvaluateSet* OFILEOperandAttr::preProcess(OBoolOperator* pOp, OOperand* pRight)
if (pIter)
{
pEvaluateSet = new OEvaluateSet();
- ULONG nRec = pIter->First();
+ sal_uIntPtr nRec = pIter->First();
while (nRec != NODE_NOTFOUND)
{
(*pEvaluateSet)[nRec] = nRec;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index e4d3eafc9071..cd11204b3570 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -143,7 +143,7 @@ ONDXPagePtr ODbaseIndex::getRoot()
{
m_nRootPage = m_aHeader.db_rootpage;
m_nPageCount = m_aHeader.db_pagecount;
- m_aRoot = CreatePage(m_nRootPage,NULL,TRUE);
+ m_aRoot = CreatePage(m_nRootPage,NULL,sal_True);
}
return m_aRoot;
}
@@ -185,7 +185,7 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp,
return new OIndexIterator(this, pOp, pOperand);
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue)
+sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue)
{
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
// Sucht ein bestimmten Wert im Index
@@ -207,13 +207,13 @@ BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValu
catch (Exception&)
{
OSL_ASSERT(0);
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue)
+sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
@@ -224,7 +224,7 @@ BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue)
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue)
+sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
@@ -233,35 +233,35 @@ BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue)
// Existiert der Wert bereits
// Find immer verwenden um das aktuelle Blatt zu bestimmen
if (!ConvertToKey(&aKey, nRec, rValue) || (getRoot()->Find(aKey) && isUnique()))
- return FALSE;
+ return sal_False;
ONDXNode aNewNode(aKey);
// einfuegen in das aktuelle Blatt
if (!m_aCurLeaf.Is())
- return FALSE;
+ return sal_False;
- BOOL bResult = m_aCurLeaf->Insert(aNewNode);
+ sal_Bool bResult = m_aCurLeaf->Insert(aNewNode);
Release(bResult);
return bResult;
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue,
+sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue,
const ORowSetValue& rNewValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
ONDXKey aKey;
if (!ConvertToKey(&aKey, nRec, rNewValue) || (isUnique() && getRoot()->Find(aKey)))
- return FALSE;
+ return sal_False;
else
return Delete(nRec, rOldValue) && Insert(nRec,rNewValue);
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue)
+sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
@@ -269,13 +269,13 @@ BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue)
// Find immer verwenden um das aktuelle Blatt zu bestimmen
ONDXKey aKey;
if (!ConvertToKey(&aKey, nRec, rValue) || !getRoot()->Find(aKey))
- return FALSE;
+ return sal_False;
ONDXNode aNewNode(aKey);
// einfuegen in das aktuelle Blatt
if (!m_aCurLeaf.Is())
- return FALSE;
+ return sal_False;
#if OSL_DEBUG_LEVEL > 1
m_aRoot->PrintPage();
#endif
@@ -289,10 +289,10 @@ void ODbaseIndex::Collect(ONDXPage* pPage)
m_aCollector.push_back(pPage);
}
//------------------------------------------------------------------
-void ODbaseIndex::Release(BOOL bSave)
+void ODbaseIndex::Release(sal_Bool bSave)
{
// Freigeben der Indexressourcen
- m_bUseCollector = FALSE;
+ m_bUseCollector = sal_False;
if (m_aCurLeaf.Is())
{
@@ -307,7 +307,7 @@ void ODbaseIndex::Release(BOOL bSave)
m_aRoot.Clear();
}
// alle Referenzen freigeben, bevor der FileStream geschlossen wird
- for (ULONG i = 0; i < m_aCollector.size(); i++)
+ for (sal_uIntPtr i = 0; i < m_aCollector.size(); i++)
m_aCollector[i]->QueryDelete();
m_aCollector.clear();
@@ -335,7 +335,7 @@ void ODbaseIndex::closeImpl()
}
}
//------------------------------------------------------------------
-ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, BOOL bLoad)
+ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bool bLoad)
{
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
@@ -412,14 +412,14 @@ void ODbaseIndex::createINFEntry()
Config aInfFile(sPhysicalPath);
aInfFile.SetGroup(dBASE_III_GROUP);
- USHORT nSuffix = aInfFile.GetKeyCount();
+ sal_uInt16 nSuffix = aInfFile.GetKeyCount();
ByteString aNewEntry,aKeyName;
- BOOL bCase = isCaseSensitive();
+ sal_Bool bCase = isCaseSensitive();
while (!aNewEntry.Len())
{
aNewEntry = "NDX";
aNewEntry += ByteString::CreateFromInt32(++nSuffix);
- for (USHORT i = 0; i < aInfFile.GetKeyCount(); i++)
+ for (sal_uInt16 i = 0; i < aInfFile.GetKeyCount(); i++)
{
aKeyName = aInfFile.GetKeyName(i);
if (bCase ? aKeyName == aNewEntry : aKeyName.EqualsIgnoreCaseAscii(aNewEntry))
@@ -432,7 +432,7 @@ void ODbaseIndex::createINFEntry()
aInfFile.WriteKey(aNewEntry,ByteString(sEntry,m_pTable->getConnection()->getTextEncoding()));
}
// -------------------------------------------------------------------------
-BOOL ODbaseIndex::DropImpl()
+sal_Bool ODbaseIndex::DropImpl()
{
closeImpl();
@@ -456,13 +456,13 @@ BOOL ODbaseIndex::DropImpl()
Config aInfFile(sPhysicalPath);
aInfFile.SetGroup(dBASE_III_GROUP);
- USHORT nKeyCnt = aInfFile.GetKeyCount();
+ sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
ByteString aKeyName;
String sEntry = m_Name;
sEntry += String::CreateFromAscii(".ndx");
// delete entries from the inf file
- for (USHORT nKey = 0; nKey < nKeyCnt; nKey++)
+ for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++)
{
// Verweist der Key auf ein Indexfile?...
aKeyName = aInfFile.GetKeyName( nKey );
@@ -475,7 +475,7 @@ BOOL ODbaseIndex::DropImpl()
}
}
}
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------------
void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const ::rtl::OUString& _sFile)
@@ -486,7 +486,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const ::
m_pTable->getConnection()->throwGenericSQLException(_nErrorId,*this);
}
//------------------------------------------------------------------
-BOOL ODbaseIndex::CreateImpl()
+sal_Bool ODbaseIndex::CreateImpl()
{
// Anlegen des Index
const ::rtl::OUString sFile = getCompletePath();
@@ -515,7 +515,7 @@ BOOL ODbaseIndex::CreateImpl()
// String::CreateFromAscii("01000"),
// aStatus.CreateErrorMessage(aText),
// 0, String() );
-// return FALSE;
+// return sal_False;
// }
// create the index file
@@ -586,7 +586,7 @@ BOOL ODbaseIndex::CreateImpl()
xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
m_aHeader.db_keytype = (nType == DataType::VARCHAR || nType == DataType::CHAR) ? 0 : 1;
- m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (USHORT)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)));
+ m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (sal_uInt16)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)));
m_aHeader.db_keylen = (( m_aHeader.db_keylen - 1) / 4 + 1) * 4;
m_aHeader.db_maxkeys = (PAGE_SIZE - 4) / (8 + m_aHeader.db_keylen);
if ( m_aHeader.db_maxkeys < 3 )
@@ -597,7 +597,7 @@ BOOL ODbaseIndex::CreateImpl()
m_pFileStream->SetStreamSize(PAGE_SIZE);
ByteString aCol(aName,m_pTable->getConnection()->getTextEncoding());
- strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((USHORT)sizeof(m_aHeader.db_name), aCol.Len()));
+ strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((sal_uInt16)sizeof(m_aHeader.db_name), aCol.Len()));
m_aHeader.db_unique = m_IsUnique ? 1: 0;
m_aHeader.db_keyrec = m_aHeader.db_keylen + 8;
@@ -609,11 +609,11 @@ BOOL ODbaseIndex::CreateImpl()
// ODatabaseType eType = m_aHeader.db_keytype == 0 ? DataType::VARCHAR : DataType::DOUBLE;
m_aCurLeaf = m_aRoot = CreatePage(m_nRootPage);
- m_aRoot->SetModified(TRUE);
+ m_aRoot->SetModified(sal_True);
- m_bUseCollector = TRUE;
+ m_bUseCollector = sal_True;
- // ULONG nRowsLeft = pCursor->RowCount();
+ // sal_uIntPtr nRowsLeft = pCursor->RowCount();
sal_Int32 nRowsLeft = 0;
Reference<XRow> xRow(xSet,UNO_QUERY);
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index f32b1f2cffe0..b35caa0a3da1 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -46,22 +46,22 @@ OIndexIterator::~OIndexIterator()
}
//------------------------------------------------------------------
-ULONG OIndexIterator::First()
+sal_uIntPtr OIndexIterator::First()
{
- return Find(TRUE);
+ return Find(sal_True);
}
//------------------------------------------------------------------
-ULONG OIndexIterator::Next()
+sal_uIntPtr OIndexIterator::Next()
{
- return Find(FALSE);
+ return Find(sal_False);
}
//------------------------------------------------------------------
-ULONG OIndexIterator::Find(BOOL bFirst)
+sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst)
{
// ONDXIndex* m_pIndex = GetNDXIndex();
- ULONG nRes = STRING_NOTFOUND;
+ sal_uIntPtr nRes = STRING_NOTFOUND;
// if (!m_pIndex->IsOpen())
// return nRes;
@@ -108,7 +108,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
// dieses findet beim Insert besondere Beachtung
// ONDXIndex* m_pIndex = GetNDXIndex();
OOp_COMPARE aTempOp(SQLFilterOperator::GREATER);
- USHORT i = 0;
+ sal_uInt16 i = 0;
if (pPage->IsLeaf())
{
@@ -146,7 +146,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
}
//------------------------------------------------------------------
-ULONG OIndexIterator::GetCompare(BOOL bFirst)
+sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst)
{
ONDXKey* pKey = NULL;
// ONDXIndex* m_pIndex = GetNDXIndex();
@@ -217,7 +217,7 @@ ULONG OIndexIterator::GetCompare(BOOL bFirst)
}
//------------------------------------------------------------------
-ULONG OIndexIterator::GetLike(BOOL bFirst)
+sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst)
{
// ONDXIndex* m_pIndex = GetNDXIndex();
if (bFirst)
@@ -238,7 +238,7 @@ ULONG OIndexIterator::GetLike(BOOL bFirst)
}
//------------------------------------------------------------------
-ULONG OIndexIterator::GetNull(BOOL bFirst)
+sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst)
{
// ONDXIndex* m_pIndex = GetNDXIndex();
if (bFirst)
@@ -261,16 +261,16 @@ ULONG OIndexIterator::GetNull(BOOL bFirst)
}
//------------------------------------------------------------------
-ULONG OIndexIterator::GetNotNull(BOOL bFirst)
+sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst)
{
ONDXKey* pKey;
// ONDXIndex* m_pIndex = GetNDXIndex();
if (bFirst)
{
// erst alle NULL werte abklappern
- for (ULONG nRec = GetNull(bFirst);
+ for (sal_uIntPtr nRec = GetNull(bFirst);
nRec != STRING_NOTFOUND;
- nRec = GetNull(FALSE))
+ nRec = GetNull(sal_False))
;
pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL;
}
@@ -293,7 +293,7 @@ ONDXKey* OIndexIterator::GetNextKey()
ONDXPage* pParentPage = pPage->GetParent();
if (pParentPage)
{
- USHORT nPos = pParentPage->Search(pPage);
+ sal_uInt16 nPos = pParentPage->Search(pPage);
if (nPos != pParentPage->Count() - 1)
{ // Seite gefunden
pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage);
diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx
index b39581f1be15..7534d06f068c 100644
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ b/connectivity/source/drivers/dbase/DNoException.cxx
@@ -90,7 +90,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen;
- ULONG nLen = m_pFileStream->Seek(nPos);
+ sal_uIntPtr nLen = m_pFileStream->Seek(nPos);
if (m_pFileStream->GetError() != ERRCODE_NONE)
goto Error;
@@ -127,10 +127,10 @@ End:
return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
+sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" );
- BOOL bIsText = TRUE;
+ sal_Bool bIsText = sal_True;
// SdbConnection* pConnection = GetConnection();
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
@@ -142,13 +142,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
ByteString aBStr;
static char aBuf[514];
aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen
- BOOL bReady = sal_False;
+ sal_Bool bReady = sal_False;
do
{
m_pMemoStream->Read(&aBuf,512);
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (aBuf[i] != cEOF && ++i < 512)
;
bReady = aBuf[i] == cEOF;
@@ -170,7 +170,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
// Foxpro stores text and binary data
if (m_aMemoHeader.db_typ == MemoFoxPro)
{
- if (((BYTE)sHeader[0]) != 0 || ((BYTE)sHeader[1]) != 0 || ((BYTE)sHeader[2]) != 0)
+ if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0)
{
// String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID));
// aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName());
@@ -184,7 +184,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
bIsText = sHeader[3] != 0;
}
- else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08)
+ else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
{
// String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID));
// aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName());
@@ -232,7 +232,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
void ODbaseTable::AllocBuffer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" );
- UINT16 nSize = m_aHeader.db_slng;
+ sal_uInt16 nSize = m_aHeader.db_slng;
OSL_ENSURE(nSize > 0, "Size too small");
if (m_nBufferSize != nSize)
@@ -245,11 +245,11 @@ void ODbaseTable::AllocBuffer()
if (m_pBuffer == NULL && nSize)
{
m_nBufferSize = nSize;
- m_pBuffer = new BYTE[m_nBufferSize+1];
+ m_pBuffer = new sal_uInt8[m_nBufferSize+1];
}
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::WriteBuffer()
+sal_Bool ODbaseTable::WriteBuffer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" );
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
@@ -285,7 +285,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
else
{
ByteString aBuf;
- USHORT nLen = rIndex.getHeader().db_keylen;
+ sal_uInt16 nLen = rIndex.getHeader().db_keylen;
char* pStr = aBuf.AllocBuffer(nLen+1);
rStream.Read(pStr,nLen);
@@ -319,7 +319,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
if (aKey.getValue().isNull())
{
memset(aNodeData.aData,0,rIndex.getHeader().db_keylen);
- rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen);
+ rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
}
else
rStream << (double) aKey.getValue();
@@ -333,7 +333,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding());
strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len()));
}
- rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen);
+ rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
}
rStream << aChild;
}
@@ -354,7 +354,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent)
// ONDXKey
//==================================================================
//------------------------------------------------------------------
-BOOL ONDXKey::IsText(sal_Int32 eType)
+sal_Bool ONDXKey::IsText(sal_Int32 eType)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXKey::IsText" );
return eType == DataType::VARCHAR || eType == DataType::CHAR;
@@ -383,7 +383,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
}
else if (IsText(getDBType()))
{
- INT32 nRes = getValue().getString().compareTo(rKey.getValue());
+ sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue());
eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS;
}
else
@@ -460,16 +460,16 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef)
return *this;
}
// -----------------------------------------------------------------------------
-static UINT32 nValue;
+static sal_uInt32 nValue;
//------------------------------------------------------------------
SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
{
rStream.Seek(rPage.GetPagePos() * 512);
rStream >> nValue >> rPage.aChild;
- rPage.nCount = USHORT(nValue);
+ rPage.nCount = sal_uInt16(nValue);
// DBG_ASSERT(rPage.nCount && rPage.nCount < rPage.GetIndex().GetMaxNodes(), "Falscher Count");
- for (USHORT i = 0; i < rPage.nCount; i++)
+ for (sal_uInt16 i = 0; i < rPage.nCount; i++)
rPage[i].Read(rStream, rPage.GetIndex());
return rStream;
}
@@ -478,7 +478,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage)
{
// Seite existiert noch nicht
- ULONG nSize = (rPage.GetPagePos() + 1) * 512;
+ sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * 512;
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
{
rStream.SetStreamSize(nSize);
@@ -486,27 +486,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r
char aEmptyData[512];
memset(aEmptyData,0x00,512);
- rStream.Write((BYTE*)aEmptyData,512);
+ rStream.Write((sal_uInt8*)aEmptyData,512);
}
- ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512);
+ sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512);
OSL_UNUSED( nCurrentPos );
nValue = rPage.nCount;
rStream << nValue << rPage.aChild;
- USHORT i = 0;
+ sal_uInt16 i = 0;
for (; i < rPage.nCount; i++)
rPage[i].Write(rStream, rPage);
// check if we have to fill the stream with '\0'
if(i < rPage.rIndex.getHeader().db_maxkeys)
{
- ULONG nTell = rStream.Tell() % 512;
- USHORT nBufferSize = rStream.GetBufferSize();
- ULONG nSize = nBufferSize - nTell;
+ sal_uIntPtr nTell = rStream.Tell() % 512;
+ sal_uInt16 nBufferSize = rStream.GetBufferSize();
+ sal_uIntPtr nSize = nBufferSize - nTell;
char* pEmptyData = new char[nSize];
memset(pEmptyData,0x00,nSize);
- rStream.Write((BYTE*)pEmptyData,nSize);
+ rStream.Write((sal_uInt8*)pEmptyData,nSize);
rStream.Seek(nTell);
delete [] pEmptyData;
}
@@ -521,7 +521,7 @@ void ONDXPage::PrintPage()
DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos());
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ONDXNode rNode = (*this)[i];
ONDXKey& rKey = rNode.GetKey();
@@ -546,7 +546,7 @@ void ONDXPage::PrintPage()
{
#if OSL_DEBUG_LEVEL > 1
GetChild(&rIndex)->PrintPage();
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ONDXNode rNode = (*this)[i];
rNode.GetChild(&rIndex,this)->PrintPage();
@@ -557,18 +557,18 @@ void ONDXPage::PrintPage()
}
#endif
// -----------------------------------------------------------------------------
-BOOL ONDXPage::IsFull() const
+sal_Bool ONDXPage::IsFull() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::IsFull" );
return Count() == rIndex.getHeader().db_maxkeys;
}
// -----------------------------------------------------------------------------
//------------------------------------------------------------------
-USHORT ONDXPage::Search(const ONDXKey& rSearch)
+sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" );
// binare Suche spaeter
- USHORT i = 0xFFFF;
+ sal_uInt16 i = 0xFFFF;
while (++i < Count())
if ((*this)[i].GetKey() == rSearch)
break;
@@ -577,10 +577,10 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch)
}
//------------------------------------------------------------------
-USHORT ONDXPage::Search(const ONDXPage* pPage)
+sal_uInt16 ONDXPage::Search(const ONDXPage* pPage)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" );
- USHORT i = 0xFFFF;
+ sal_uInt16 i = 0xFFFF;
while (++i < Count())
if (((*this)[i]).GetChild() == pPage)
break;
@@ -598,7 +598,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace");
if (rSearch != rReplace)
{
- USHORT nPos = NODE_NOTFOUND;
+ sal_uInt16 nPos = NODE_NOTFOUND;
ONDXPage* pPage = this;
while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND)
@@ -607,34 +607,34 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
if (pPage)
{
(*pPage)[nPos].GetKey() = rReplace;
- pPage->SetModified(TRUE);
+ pPage->SetModified(sal_True);
}
}
}
// -----------------------------------------------------------------------------
-ONDXNode& ONDXPage::operator[] (USHORT nPos)
+ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos)
{
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
return ppNodes[nPos];
}
//------------------------------------------------------------------
-const ONDXNode& ONDXPage::operator[] (USHORT nPos) const
+const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const
{
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
return ppNodes[nPos];
}
// -----------------------------------------------------------------------------
-void ONDXPage::Remove(USHORT nPos)
+void ONDXPage::Remove(sal_uInt16 nPos)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Remove" );
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
- for (USHORT i = nPos; i < (nCount-1); i++)
+ for (sal_uInt16 i = nPos; i < (nCount-1); i++)
(*this)[i] = (*this)[i+1];
nCount--;
- bModified = TRUE;
+ bModified = sal_True;
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 6adbfbbbf931..a0844b93b0b7 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -229,12 +229,12 @@ void ODbaseTable::readHeader()
m_pFileStream->RefreshBuffer(); // sicherstellen, dass die Kopfinformationen tatsaechlich neu gelesen werden
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
- BYTE nType=0;
+ sal_uInt8 nType=0;
(*m_pFileStream) >> nType;
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(BYTE));
+ m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(sal_uInt8));
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
(*m_pFileStream) >> m_aHeader.db_anz;
@@ -246,7 +246,7 @@ void ODbaseTable::readHeader()
(*m_pFileStream) >> m_aHeader.db_slng;
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(BYTE));
+ m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(sal_uInt8));
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
@@ -552,7 +552,7 @@ void ODbaseTable::construct()
// if(!m_pColumns && (!m_aColumns.isValid() || !m_aColumns->size()))
fillColumns();
- UINT32 nFileSize = lcl_getFileSize(*m_pFileStream);
+ sal_uInt32 nFileSize = lcl_getFileSize(*m_pFileStream);
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
if ( m_aHeader.db_anz == 0 && ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng) > 0) // seems to be empty or someone wrote bullshit into the dbase file
m_aHeader.db_anz = ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng);
@@ -580,7 +580,7 @@ void ODbaseTable::construct()
}
}
//------------------------------------------------------------------
-BOOL ODbaseTable::ReadMemoHeader()
+sal_Bool ODbaseTable::ReadMemoHeader()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemoHeader" );
m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
@@ -605,7 +605,7 @@ BOOL ODbaseTable::ReadMemoHeader()
m_pMemoStream->Seek(m_aMemoHeader.db_size);
m_pMemoStream->Read(sHeader,4);
- if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08)
+ if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
m_aMemoHeader.db_typ = MemodBaseIII;
else
m_aMemoHeader.db_typ = MemodBaseIV;
@@ -628,7 +628,7 @@ BOOL ODbaseTable::ReadMemoHeader()
OSL_ENSURE( false, "ODbaseTable::ReadMemoHeader: unsupported memo type!" );
break;
}
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------------
String ODbaseTable::getEntry(OConnection* _pConnection,const ::rtl::OUString& _sName )
@@ -704,11 +704,11 @@ void ODbaseTable::refreshIndexes()
aURL.setExtension(String::CreateFromAscii("inf"));
Config aInfFile(aURL.getFSysPath(INetURLObject::FSYS_DETECT));
aInfFile.SetGroup(dBASE_III_GROUP);
- USHORT nKeyCnt = aInfFile.GetKeyCount();
+ sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
ByteString aKeyName;
ByteString aIndexName;
- for (USHORT nKey = 0; nKey < nKeyCnt; nKey++)
+ for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++)
{
// Verweist der Key auf ein Indexfile?...
aKeyName = aInfFile.GetKeyName( nKey );
@@ -812,7 +812,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::fetchRow" );
// Einlesen der Daten
- BOOL bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? TRUE : sal_False;
+ sal_Bool bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? sal_True : sal_False;
// only read the bookmark
@@ -822,7 +822,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
*(_rRow->get())[0] = m_nFilePos;
if (!bRetrieveData)
- return TRUE;
+ return sal_True;
sal_Size nByteOffset = 1;
// Felder:
@@ -982,13 +982,13 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
break;
case DataType::BIT:
{
- BOOL b;
+ sal_Bool b;
switch (* ((const char *)pData))
{
case 'T':
case 'Y':
- case 'J': b = TRUE; break;
- default: b = FALSE; break;
+ case 'J': b = sal_True; break;
+ default: b = sal_False; break;
}
*(_rRow->get())[i] = b;
// pVal->setDouble(b);
@@ -1034,7 +1034,7 @@ void ODbaseTable::FileClose()
ODbaseTable_BASE::FileClose();
}
// -------------------------------------------------------------------------
-BOOL ODbaseTable::CreateImpl()
+sal_Bool ODbaseTable::CreateImpl()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateImpl" );
OSL_ENSURE(!m_pFileStream, "SequenceError");
@@ -1084,7 +1084,7 @@ BOOL ODbaseTable::CreateImpl()
{
}
- BOOL bMemoFile = sal_False;
+ sal_Bool bMemoFile = sal_False;
sal_Bool bOk = CreateFile(aURL, bMemoFile);
@@ -1148,7 +1148,7 @@ BOOL ODbaseTable::CreateImpl()
else
m_aHeader.db_typ = dBaseIII;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl::OUString& _sColumnName)
@@ -1171,7 +1171,7 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl:
}
//------------------------------------------------------------------
// erzeugt grundsaetzlich dBase IV Datei Format
-BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
+sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateFile" );
bCreateMemo = sal_False;
@@ -1182,7 +1182,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
if (!m_pFileStream)
return sal_False;
- BYTE nDbaseType = dBaseIII;
+ sal_uInt8 nDbaseType = dBaseIII;
Reference<XIndexAccess> xColumns(getColumns(),UNO_QUERY);
Reference<XPropertySet> xCol;
const ::rtl::OUString sPropType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE);
@@ -1224,19 +1224,19 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
memset(aBuffer,0,sizeof(aBuffer));
m_pFileStream->Seek(0L);
- (*m_pFileStream) << (BYTE) nDbaseType; // dBase format
- (*m_pFileStream) << (BYTE) (aDate.GetYear() % 100); // aktuelles Datum
+ (*m_pFileStream) << (sal_uInt8) nDbaseType; // dBase format
+ (*m_pFileStream) << (sal_uInt8) (aDate.GetYear() % 100); // aktuelles Datum
- (*m_pFileStream) << (BYTE) aDate.GetMonth();
- (*m_pFileStream) << (BYTE) aDate.GetDay();
+ (*m_pFileStream) << (sal_uInt8) aDate.GetMonth();
+ (*m_pFileStream) << (sal_uInt8) aDate.GetDay();
(*m_pFileStream) << 0L; // Anzahl der Datensaetze
- (*m_pFileStream) << (USHORT)((m_pColumns->getCount()+1) * 32 + 1); // Kopfinformationen,
+ (*m_pFileStream) << (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1); // Kopfinformationen,
// pColumns erhaelt immer eine Spalte mehr
- (*m_pFileStream) << (USHORT) 0; // Satzlaenge wird spaeter bestimmt
+ (*m_pFileStream) << (sal_uInt16) 0; // Satzlaenge wird spaeter bestimmt
m_pFileStream->Write(aBuffer, 20);
- USHORT nRecLength = 1; // Laenge 1 fuer deleted flag
+ sal_uInt16 nRecLength = 1; // Laenge 1 fuer deleted flag
sal_Int32 nMaxFieldLength = m_pConnection->getMetaData()->getMaxColumnNameLength();
::rtl::OUString aName;
const ::rtl::OUString sPropName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME);
@@ -1329,9 +1329,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
{
throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName);
}
- (*m_pFileStream) << (BYTE) Min((ULONG)nPrecision, 255UL); //Feldlaenge
- nRecLength = nRecLength + (USHORT)::std::min((USHORT)nPrecision, (USHORT)255UL);
- (*m_pFileStream) << (BYTE)0; //Nachkommastellen
+ (*m_pFileStream) << (sal_uInt8) Min((sal_uIntPtr)nPrecision, 255UL); //Feldlaenge
+ nRecLength = nRecLength + (sal_uInt16)::std::min((sal_uInt16)nPrecision, (sal_uInt16)255UL);
+ (*m_pFileStream) << (sal_uInt8)0; //Nachkommastellen
break;
case 'F':
case 'N':
@@ -1343,41 +1343,41 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
}
if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
{
- (*m_pFileStream) << (BYTE)10; // Standard Laenge
- (*m_pFileStream) << (BYTE)4;
+ (*m_pFileStream) << (sal_uInt8)10; // Standard Laenge
+ (*m_pFileStream) << (sal_uInt8)4;
nRecLength += 10;
}
else
{
sal_Int32 nPrec = SvDbaseConverter::ConvertPrecisionToDbase(nPrecision,nScale);
- (*m_pFileStream) << (BYTE)( nPrec);
- (*m_pFileStream) << (BYTE)nScale;
- nRecLength += (USHORT)nPrec;
+ (*m_pFileStream) << (sal_uInt8)( nPrec);
+ (*m_pFileStream) << (sal_uInt8)nScale;
+ nRecLength += (sal_uInt16)nPrec;
}
break;
case 'L':
- (*m_pFileStream) << (BYTE)1;
- (*m_pFileStream) << (BYTE)0;
+ (*m_pFileStream) << (sal_uInt8)1;
+ (*m_pFileStream) << (sal_uInt8)0;
++nRecLength;
break;
case 'I':
- (*m_pFileStream) << (BYTE)4;
- (*m_pFileStream) << (BYTE)0;
+ (*m_pFileStream) << (sal_uInt8)4;
+ (*m_pFileStream) << (sal_uInt8)0;
nRecLength += 4;
break;
case 'Y':
case 'B':
case 'T':
case 'D':
- (*m_pFileStream) << (BYTE)8;
- (*m_pFileStream) << (BYTE)0;
+ (*m_pFileStream) << (sal_uInt8)8;
+ (*m_pFileStream) << (sal_uInt8)0;
nRecLength += 8;
break;
case 'M':
- bCreateMemo = TRUE;
- (*m_pFileStream) << (BYTE)10;
- (*m_pFileStream) << (BYTE)0;
+ bCreateMemo = sal_True;
+ (*m_pFileStream) << (sal_uInt8)10;
+ (*m_pFileStream) << (sal_uInt8)0;
nRecLength += 10;
if ( bBinary )
aBuffer[0] = 0x06;
@@ -1389,7 +1389,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
aBuffer[0] = 0x00;
}
- (*m_pFileStream) << (BYTE)FIELD_DESCRIPTOR_TERMINATOR; // kopf ende
+ (*m_pFileStream) << (sal_uInt8)FIELD_DESCRIPTOR_TERMINATOR; // kopf ende
(*m_pFileStream) << (char)DBF_EOL;
m_pFileStream->Seek(10L);
(*m_pFileStream) << nRecLength; // Satzlaenge nachtraeglich eintragen
@@ -1398,9 +1398,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
{
m_pFileStream->Seek(0L);
if (nDbaseType == VisualFoxPro)
- (*m_pFileStream) << (BYTE) FoxProMemo;
+ (*m_pFileStream) << (sal_uInt8) FoxProMemo;
else
- (*m_pFileStream) << (BYTE) dBaseIIIMemo;
+ (*m_pFileStream) << (sal_uInt8) dBaseIIIMemo;
} // if (bCreateMemo)
}
catch ( const Exception& e )
@@ -1415,12 +1415,12 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
catch(const Exception&) { }
throw;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
// erzeugt grundsaetzlich dBase III Datei Format
-BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
+sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateMemoFile" );
// Makro zum Filehandling fuers Erzeugen von Tabellen
@@ -1441,16 +1441,16 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
m_pMemoStream->Flush();
delete m_pMemoStream;
m_pMemoStream = NULL;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
-BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes )
+sal_Bool ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::Drop_Static" );
INetURLObject aURL;
aURL.SetURL(_sUrl);
- BOOL bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ sal_Bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE));
if(bDropped)
{
@@ -1495,7 +1495,7 @@ BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFie
return bDropped;
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::DropImpl()
+sal_Bool ODbaseTable::DropImpl()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DropImpl" );
FileClose();
@@ -1503,7 +1503,7 @@ BOOL ODbaseTable::DropImpl()
if(!m_pIndexes)
refreshIndexes(); // look for indexes which must be deleted as well
- BOOL bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes);
+ sal_Bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes);
if(!bDropped)
{// we couldn't drop the table so we have to reopen it
construct();
@@ -1514,7 +1514,7 @@ BOOL ODbaseTable::DropImpl()
}
//------------------------------------------------------------------
-BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<XIndexAccess>& _xCols)
+sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Reference<XIndexAccess>& _xCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::InsertRow" );
// Buffer mit Leerzeichen fuellen
@@ -1524,12 +1524,12 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X
// Gesamte neue Row uebernehmen:
// ... und am Ende als neuen Record hinzufuegen:
- UINT32 nTempPos = m_nFilePos,
+ sal_uInt32 nTempPos = m_nFilePos,
nFileSize = 0,
nMemoFileSize = 0;
- m_nFilePos = (ULONG)m_aHeader.db_anz + 1;
- BOOL bInsertRow = UpdateBuffer( rRow, NULL, _xCols );
+ m_nFilePos = (sal_uIntPtr)m_aHeader.db_anz + 1;
+ sal_Bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols );
if ( bInsertRow )
{
nFileSize = lcl_getFileSize(*m_pFileStream);
@@ -1572,7 +1572,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X
}
//------------------------------------------------------------------
-BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols)
+sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateRow" );
// Buffer mit Leerzeichen fuellen
@@ -1583,7 +1583,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R
m_pFileStream->Seek(nPos);
m_pFileStream->Read((char*)m_pBuffer, m_aHeader.db_slng);
- UINT32 nMemoFileSize( 0 );
+ sal_uInt32 nMemoFileSize( 0 );
if (HasMemoFields() && m_pMemoStream)
{
m_pMemoStream->Seek(STREAM_SEEK_TO_END);
@@ -1602,7 +1602,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R
}
//------------------------------------------------------------------
-BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
+sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DeleteRow" );
// Einfach das Loesch-Flag setzen (egal, ob es schon gesetzt war
@@ -1613,13 +1613,13 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
OValueRefRow aRow = new OValueRefVector(_rCols.get().size());
- if (!fetchRow(aRow,_rCols,TRUE,TRUE))
+ if (!fetchRow(aRow,_rCols,sal_True,sal_True))
return sal_False;
Reference<XPropertySet> xCol;
::rtl::OUString aColName;
::comphelper::UStringMixEqual aCase(isCaseSensitive());
- for (USHORT i = 0; i < m_pColumns->getCount(); i++)
+ for (sal_uInt16 i = 0; i < m_pColumns->getCount(); i++)
{
Reference<XPropertySet> xIndex = isUniqueByColumnName(i);
if (xIndex.is())
@@ -1651,7 +1651,7 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
}
m_pFileStream->Seek(nFilePos);
- (*m_pFileStream) << (BYTE)'*'; // mark the row in the table as deleted
+ (*m_pFileStream) << (sal_uInt8)'*'; // mark the row in the table as deleted
m_pFileStream->Flush();
return sal_True;
}
@@ -1691,18 +1691,18 @@ double toDouble(const ByteString& rString)
}
//------------------------------------------------------------------
-BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols)
+sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateBuffer" );
OSL_ENSURE(m_pBuffer,"Buffer is NULL!");
if ( !m_pBuffer )
- return FALSE;
+ return sal_False;
sal_Int32 nByteOffset = 1;
// Felder aktualisieren:
Reference<XPropertySet> xCol;
Reference<XPropertySet> xIndex;
- USHORT i;
+ sal_uInt16 i;
::rtl::OUString aColName;
const sal_Int32 nColumnCount = m_pColumns->getCount();
::std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount);
@@ -1936,7 +1936,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
// sein koennte und muesste
const ByteString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0));
- BOOL bValidLength = aDefaultValue.Len() <= nLen;
+ sal_Bool bValidLength = aDefaultValue.Len() <= nLen;
if ( bValidLength )
{
strncpy(pData,aDefaultValue.GetBuffer(),nLen);
@@ -1970,7 +1970,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
char cNext = pData[nLen]; // merken und temporaer durch 0 ersetzen
pData[nLen] = '\0'; // das geht, da der Puffer immer ein Zeichen groesser ist ...
- ULONG nBlockNo = strtol((const char *)pData,NULL,10); // Blocknummer lesen
+ sal_uIntPtr nBlockNo = strtol((const char *)pData,NULL,10); // Blocknummer lesen
// Naechstes Anfangszeichen wieder restaurieren:
pData[nLen] = cNext;
@@ -2028,14 +2028,14 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
+sal_Bool ODbaseTable::WriteMemo(ORowSetValue& aVariable, sal_uIntPtr& rBlockNr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteMemo" );
// wird die BlockNr 0 vorgegeben, wird der block ans Ende gehaengt
- ULONG nSize = 0;
+ sal_uIntPtr nSize = 0;
::rtl::OString aStr;
::com::sun::star::uno::Sequence<sal_Int8> aValue;
- BYTE nHeader[4];
+ sal_uInt8 nHeader[4];
const bool bBinary = aVariable.getTypeKind() == DataType::LONGVARBINARY && m_aMemoHeader.db_typ == MemoFoxPro;
if ( bBinary )
{
@@ -2048,7 +2048,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
}
// Anhaengen oder ueberschreiben
- BOOL bAppend = rBlockNr == 0;
+ sal_Bool bAppend = rBlockNr == 0;
if (!bAppend)
{
@@ -2065,7 +2065,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
m_pMemoStream->SeekRel(4L);
m_pMemoStream->Read(sHeader,4);
- ULONG nOldSize;
+ sal_uIntPtr nOldSize;
if (m_aMemoHeader.db_typ == MemoFoxPro)
nOldSize = ((((unsigned char)sHeader[0]) * 256 +
(unsigned char)sHeader[1]) * 256 +
@@ -2078,7 +2078,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
(unsigned char)sHeader[0] - 8;
// passt die neue Laenge in die belegten Bloecke
- ULONG nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0),
+ sal_uIntPtr nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0),
nOldUsedBlocks = ((nOldSize + 8) / m_aMemoHeader.db_size) + (((nOldSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0);
bAppend = nUsedBlocks > nOldUsedBlocks;
}
@@ -2087,7 +2087,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
if (bAppend)
{
- ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
+ sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
// letzten block auffuellen
rBlockNr = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
@@ -2112,30 +2112,30 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
{
if ( MemodBaseIV == m_aMemoHeader.db_typ )
- (*m_pMemoStream) << (BYTE)0xFF
- << (BYTE)0xFF
- << (BYTE)0x08;
+ (*m_pMemoStream) << (sal_uInt8)0xFF
+ << (sal_uInt8)0xFF
+ << (sal_uInt8)0x08;
else
- (*m_pMemoStream) << (BYTE)0x00
- << (BYTE)0x00
- << (BYTE)0x00;
+ (*m_pMemoStream) << (sal_uInt8)0x00
+ << (sal_uInt8)0x00
+ << (sal_uInt8)0x00;
- UINT32 nWriteSize = nSize;
+ sal_uInt32 nWriteSize = nSize;
if (m_aMemoHeader.db_typ == MemoFoxPro)
{
if ( bBinary )
- (*m_pMemoStream) << (BYTE) 0x00; // Picture
+ (*m_pMemoStream) << (sal_uInt8) 0x00; // Picture
else
- (*m_pMemoStream) << (BYTE) 0x01; // Memo
+ (*m_pMemoStream) << (sal_uInt8) 0x01; // Memo
for (int i = 4; i > 0; nWriteSize >>= 8)
- nHeader[--i] = (BYTE) (nWriteSize % 256);
+ nHeader[--i] = (sal_uInt8) (nWriteSize % 256);
}
else
{
- (*m_pMemoStream) << (BYTE) 0x00;
+ (*m_pMemoStream) << (sal_uInt8) 0x00;
nWriteSize += 8;
for (int i = 0; i < 4; nWriteSize >>= 8)
- nHeader[i++] = (BYTE) (nWriteSize % 256);
+ nHeader[i++] = (sal_uInt8) (nWriteSize % 256);
}
m_pMemoStream->Write(nHeader,4);
@@ -2151,7 +2151,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
// Schreiben der neuen Blocknummer
if (bAppend)
{
- ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
+ sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
m_aMemoHeader.db_next = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
// Schreiben der neuen Blocknummer
@@ -2423,7 +2423,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
::dbtools::throwGenericSQLException( sError, *this );
}
- BOOL bAlreadyDroped = FALSE;
+ sal_Bool bAlreadyDroped = sal_False;
try
{
pNewTable->construct();
@@ -2432,7 +2432,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
// drop the old table
if(DropImpl())
{
- bAlreadyDroped = TRUE;
+ bAlreadyDroped = sal_True;
pNewTable->renameImpl(m_Name);
// release the temp file
}
@@ -2660,7 +2660,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen;
- ULONG nLen = m_pFileStream->Seek(nPos);
+ sal_uIntPtr nLen = m_pFileStream->Seek(nPos);
if (m_pFileStream->GetError() != ERRCODE_NONE)
goto Error;
@@ -2697,10 +2697,10 @@ End:
return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
+sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" );
- BOOL bIsText = TRUE;
+ sal_Bool bIsText = sal_True;
// SdbConnection* pConnection = GetConnection();
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
@@ -2712,13 +2712,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
ByteString aBStr;
static char aBuf[514];
aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen
- BOOL bReady = sal_False;
+ sal_Bool bReady = sal_False;
do
{
m_pMemoStream->Read(&aBuf,512);
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (aBuf[i] != cEOF && ++i < 512)
;
bReady = aBuf[i] == cEOF;
@@ -2740,7 +2740,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
// Foxpro stores text and binary data
if (m_aMemoHeader.db_typ == MemoFoxPro)
{
-// if (((BYTE)sHeader[0]) != 0 || ((BYTE)sHeader[1]) != 0 || ((BYTE)sHeader[2]) != 0)
+// if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0)
// {
//// String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID));
//// aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName());
@@ -2754,7 +2754,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
//
bIsText = sHeader[3] != 0;
}
- else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08)
+ else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
{
// String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID));
// aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName());
@@ -2812,7 +2812,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
void ODbaseTable::AllocBuffer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" );
- UINT16 nSize = m_aHeader.db_slng;
+ sal_uInt16 nSize = m_aHeader.db_slng;
OSL_ENSURE(nSize > 0, "Size too small");
if (m_nBufferSize != nSize)
@@ -2825,11 +2825,11 @@ void ODbaseTable::AllocBuffer()
if (m_pBuffer == NULL && nSize)
{
m_nBufferSize = nSize;
- m_pBuffer = new BYTE[m_nBufferSize+1];
+ m_pBuffer = new sal_uInt8[m_nBufferSize+1];
}
}
// -----------------------------------------------------------------------------
-BOOL ODbaseTable::WriteBuffer()
+sal_Bool ODbaseTable::WriteBuffer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" );
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 9a8905b6a6ba..767595d06b85 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -42,19 +42,19 @@ using namespace connectivity::dbase;
using namespace connectivity::file;
using namespace com::sun::star::sdbc;
// -----------------------------------------------------------------------------
-ONDXKey::ONDXKey(UINT32 nRec)
+ONDXKey::ONDXKey(sal_uInt32 nRec)
:nRecord(nRec)
{
}
// -----------------------------------------------------------------------------
-ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec)
+ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec)
: ONDXKey_BASE(eType)
, nRecord(nRec)
, xValue(rVal)
{
}
// -----------------------------------------------------------------------------
-ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec)
+ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec)
: ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR)
,nRecord(nRec)
{
@@ -66,7 +66,7 @@ ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec)
}
// -----------------------------------------------------------------------------
-ONDXKey::ONDXKey(double aVal, UINT32 nRec)
+ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
: ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE)
,nRecord(nRec)
,xValue(aVal)
@@ -79,7 +79,7 @@ ONDXKey::ONDXKey(double aVal, UINT32 nRec)
//==================================================================
ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent)
:nPagePos(nPos)
- ,bModified(FALSE)
+ ,bModified(sal_False)
,nCount(0)
,aParent(pParent)
,rIndex(rInd)
@@ -103,16 +103,16 @@ void ONDXPage::QueryDelete()
if (IsModified() && rIndex.m_pFileStream)
(*rIndex.m_pFileStream) << *this;
- bModified = FALSE;
+ bModified = sal_False;
if (rIndex.UseCollector())
{
if (aChild.Is())
- aChild->Release(FALSE);
+ aChild->Release(sal_False);
- for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++)
+ for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++)
{
if (ppNodes[i].GetChild().Is())
- ppNodes[i].GetChild()->Release(FALSE);
+ ppNodes[i].GetChild()->Release(sal_False);
ppNodes[i] = ONDXNode();
}
@@ -136,10 +136,10 @@ ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex)
}
//------------------------------------------------------------------
-USHORT ONDXPage::FindPos(const ONDXKey& rKey) const
+sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const
{
// sucht nach Platz fuer den vorgegeben key auf einer Seite
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (i < nCount && rKey > ((*this)[i]).GetKey())
i++;
@@ -147,18 +147,18 @@ USHORT ONDXPage::FindPos(const ONDXKey& rKey) const
}
//------------------------------------------------------------------
-BOOL ONDXPage::Find(const ONDXKey& rKey)
+sal_Bool ONDXPage::Find(const ONDXKey& rKey)
{
// sucht den vorgegeben key
// Besonderheit: gelangt der Algorithmus ans Ende
// wird immer die aktuelle Seite und die Knotenposition vermerkt
// auf die die Bedingung <= zutrifft
// dieses findet beim Insert besondere Beachtung
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (i < nCount && rKey > ((*this)[i]).GetKey())
i++;
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (!IsLeaf())
{
@@ -170,7 +170,7 @@ BOOL ONDXPage::Find(const ONDXKey& rKey)
{
rIndex.m_aCurLeaf = this;
rIndex.m_nCurNode = i - 1;
- bResult = FALSE;
+ bResult = sal_False;
}
else
{
@@ -182,14 +182,14 @@ BOOL ONDXPage::Find(const ONDXKey& rKey)
}
//------------------------------------------------------------------
-BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
+sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
{
// beim Erzeugen eines Index koennen auch mehrere Knoten eingefuegt werden
// diese sin dann aufsteigend sortiert
- BOOL bAppend = nRowsLeft > 0;
+ sal_Bool bAppend = nRowsLeft > 0;
if (IsFull())
{
- BOOL bResult = TRUE;
+ sal_Bool bResult = sal_True;
ONDXNode aSplitNode;
if (bAppend)
aSplitNode = rNode;
@@ -210,7 +210,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
}
else // Position unbekannt
{
- USHORT nPos = NODE_NOTFOUND;
+ sal_uInt16 nPos = NODE_NOTFOUND;
while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ;
--nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593)
@@ -295,7 +295,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
}
else
{
- USHORT nNodePos = FindPos(rNode.GetKey());
+ sal_uInt16 nNodePos = FindPos(rNode.GetKey());
if (IsLeaf())
rIndex.m_nCurNode = nNodePos;
@@ -305,17 +305,17 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
}
//------------------------------------------------------------------
-BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode)
+sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode)
{
- USHORT nMaxCount = rIndex.getHeader().db_maxkeys;
+ sal_uInt16 nMaxCount = rIndex.getHeader().db_maxkeys;
if (nPos >= nMaxCount)
- return FALSE;
+ return sal_False;
if (nCount)
{
++nCount;
// nach rechts verschieben
- for (USHORT i = std::min((USHORT)(nMaxCount-1), (USHORT)(nCount-1)); nPos < i; --i)
+ for (sal_uInt16 i = std::min((sal_uInt16)(nMaxCount-1), (sal_uInt16)(nCount-1)); nPos < i; --i)
(*this)[i] = (*this)[i-1];
}
else
@@ -331,19 +331,19 @@ BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode)
rNode.GetChild()->SetParent(this);
}
- bModified = TRUE;
+ bModified = sal_True;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
-BOOL ONDXPage::Append(ONDXNode& rNode)
+sal_Bool ONDXPage::Append(ONDXNode& rNode)
{
DBG_ASSERT(!IsFull(), "kein Append moeglich");
return Insert(nCount, rNode);
}
//------------------------------------------------------------------
-void ONDXPage::Release(BOOL bSave)
+void ONDXPage::Release(sal_Bool bSave)
{
// freigeben der Pages
if (aChild.Is())
@@ -352,7 +352,7 @@ void ONDXPage::Release(BOOL bSave)
// Pointer freigeben
aChild.Clear();
- for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++)
+ for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++)
{
if (ppNodes[i].GetChild())
ppNodes[i].GetChild()->Release(bSave);
@@ -362,7 +362,7 @@ void ONDXPage::Release(BOOL bSave)
aParent = NULL;
}
//------------------------------------------------------------------
-void ONDXPage::ReleaseFull(BOOL bSave)
+void ONDXPage::ReleaseFull(sal_Bool bSave)
{
ONDXPagePtr aTempParent = aParent;
Release(bSave);
@@ -371,7 +371,7 @@ void ONDXPage::ReleaseFull(BOOL bSave)
{
// Freigeben nicht benoetigter Seiten, danach besteht keine Referenz
// mehr auf die Seite, danach kann 'this' nicht mehr gueltig sein!!!
- USHORT nParentPos = aTempParent->Search(this);
+ sal_uInt16 nParentPos = aTempParent->Search(this);
if (nParentPos != NODE_NOTFOUND)
(*aTempParent)[nParentPos].GetChild().Clear();
else
@@ -379,7 +379,7 @@ void ONDXPage::ReleaseFull(BOOL bSave)
}
}
//------------------------------------------------------------------
-BOOL ONDXPage::Delete(USHORT nNodePos)
+sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos)
{
if (IsLeaf())
{
@@ -402,7 +402,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos)
if (HasParent() && nCount < (rIndex.GetMaxNodes() / 2))
{
// Feststellen, welcher Knoten auf die Seite zeigt
- USHORT nParentNodePos = aParent->Search(this);
+ sal_uInt16 nParentNodePos = aParent->Search(this);
// letzte Element auf Vaterseite
// -> zusammenlegen mit vorletzter Seite
if (nParentNodePos == (aParent->Count() - 1))
@@ -455,7 +455,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos)
else if (IsRoot())
// Sicherstellen das die Position der Wurzel festgehalten wird
rIndex.SetRootPos(nPagePos);
- return TRUE;
+ return sal_True;
}
@@ -476,7 +476,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
ONDXNode aResultNode;
if (IsLeaf())
{
- for (USHORT i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++)
+ for (sal_uInt16 i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++)
rPage.Insert(j++,(*this)[i]);
// dieser Knoten enthaelt einen Schluessel der noch einmal im Tree vorkommt
@@ -491,7 +491,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
}
else
{
- for (USHORT i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++)
+ for (sal_uInt16 i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++)
rPage.Insert(j++,(*this)[i]);
aResultNode = (*this)[(nCount + 1) / 2];
@@ -506,31 +506,31 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
// innere Knoten haben keine Recordnummer
if (rIndex.isUnique())
aResultNode.GetKey().ResetRecord();
- bModified = TRUE;
+ bModified = sal_True;
return aResultNode;
}
//------------------------------------------------------------------
-void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
+void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage)
{
DBG_ASSERT(HasParent(), "kein Vater vorhanden");
DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau");
/* Zusammenlegen zweier Seiten */
ONDXNode aResultNode;
- USHORT nMaxNodes = rIndex.GetMaxNodes(),
+ sal_uInt16 nMaxNodes = rIndex.GetMaxNodes(),
nMaxNodes_2 = nMaxNodes / 2;
// Feststellen ob Seite rechter oder linker Nachbar
- BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, wenn xPage die rechte Seite ist
- USHORT nNewCount = (*xPage).Count() + Count();
+ sal_Bool bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // sal_True, wenn xPage die rechte Seite ist
+ sal_uInt16 nNewCount = (*xPage).Count() + Count();
if (IsLeaf())
{
// Bedingung fuers zusammenlegen
if (nNewCount < (nMaxNodes_2 * 2))
{
- USHORT nLastNode = bRight ? Count() - 1 : xPage->Count() - 1;
+ sal_uInt16 nLastNode = bRight ? Count() - 1 : xPage->Count() - 1;
if (bRight)
{
DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife");
@@ -555,7 +555,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
(*aParent)[nParentNodePos-1].SetChild(this,aParent);
else // oder als rechten Knoten setzen
aParent->SetChild(this);
- aParent->SetModified(TRUE);
+ aParent->SetModified(sal_True);
}
@@ -571,12 +571,12 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
aParent = NULL;
rIndex.SetRootPos(nPagePos);
rIndex.m_aRoot = this;
- SetModified(TRUE);
+ SetModified(sal_True);
}
else
aParent->SearchAndReplace((*this)[nLastNode].GetKey(),(*this)[nCount-1].GetKey());
- xPage->SetModified(FALSE);
+ xPage->SetModified(sal_False);
xPage->ReleaseFull(); // wird nicht mehr benoetigt
}
// Ausgleichen der Elemente nNewCount >= (nMaxNodes_2 * 2)
@@ -620,7 +620,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
// erhaelt zunaechst Child von xPage
(*aParent)[nParentNodePos].SetChild(xPage->GetChild(),aParent);
Append((*aParent)[nParentNodePos]);
- for (USHORT i = 0 ; i < xPage->Count(); i++)
+ for (sal_uInt16 i = 0 ; i < xPage->Count(); i++)
Append((*xPage)[i]);
}
else
@@ -645,7 +645,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
// danach wird der Vaterknoten zurueckgesetzt
(*aParent)[nParentNodePos].SetChild();
- aParent->SetModified(TRUE);
+ aParent->SetModified(sal_True);
if(aParent->IsRoot() && aParent->Count() == 1)
{
@@ -654,7 +654,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
aParent = NULL;
rIndex.SetRootPos(nPagePos);
rIndex.m_aRoot = this;
- SetModified(TRUE);
+ SetModified(sal_True);
}
else if(nParentNodePos)
// Austauschen des KnotenWertes
@@ -662,7 +662,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
// deshalb muss der Knoten auch hier aktualisiert werden
aParent->SearchAndReplace((*aParent)[nParentNodePos-1].GetKey(),(*aParent)[nParentNodePos].GetKey());
- xPage->SetModified(FALSE);
+ xPage->SetModified(sal_False);
xPage->ReleaseFull();
}
// Ausgleichen der Elemente
@@ -693,7 +693,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
(*aParent)[nParentNodePos].SetChild(this,aParent);
}
- aParent->SetModified(TRUE);
+ aParent->SetModified(sal_True);
}
}
}
@@ -715,7 +715,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
else
{
ByteString aBuf;
- USHORT nLen = rIndex.getHeader().db_keylen;
+ sal_uInt16 nLen = rIndex.getHeader().db_keylen;
char* pStr = aBuf.AllocBuffer(nLen+1);
rStream.Read(pStr,nLen);
@@ -748,7 +748,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
if (aKey.getValue().isNull())
{
memset(aNodeData.aData,0,rIndex.getHeader().db_keylen);
- rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen);
+ rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
}
else
rStream << (double) aKey.getValue();
@@ -762,7 +762,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding());
strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len()));
}
- rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen);
+ rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen);
}
rStream << aChild;
}
@@ -782,7 +782,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent)
// ONDXKey
//==================================================================
//------------------------------------------------------------------
-BOOL ONDXKey::IsText(sal_Int32 eType)
+sal_Bool ONDXKey::IsText(sal_Int32 eType)
{
return eType == DataType::VARCHAR || eType == DataType::CHAR;
}
@@ -809,7 +809,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
}
else if (IsText(getDBType()))
{
- INT32 nRes = getValue().getString().compareTo(rKey.getValue());
+ sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue());
eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS;
}
else
@@ -882,16 +882,16 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef)
return *this;
}
// -----------------------------------------------------------------------------
-static UINT32 nValue;
+static sal_uInt32 nValue;
//------------------------------------------------------------------
SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
{
rStream.Seek(rPage.GetPagePos() * PAGE_SIZE);
rStream >> nValue >> rPage.aChild;
- rPage.nCount = USHORT(nValue);
+ rPage.nCount = sal_uInt16(nValue);
// DBG_ASSERT(rPage.nCount && rPage.nCount < rPage.GetIndex().GetMaxNodes(), "Falscher Count");
- for (USHORT i = 0; i < rPage.nCount; i++)
+ for (sal_uInt16 i = 0; i < rPage.nCount; i++)
rPage[i].Read(rStream, rPage.GetIndex());
return rStream;
}
@@ -900,7 +900,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage)
{
// Seite existiert noch nicht
- ULONG nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE;
+ sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE;
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
{
rStream.SetStreamSize(nSize);
@@ -908,27 +908,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r
char aEmptyData[PAGE_SIZE];
memset(aEmptyData,0x00,PAGE_SIZE);
- rStream.Write((BYTE*)aEmptyData,PAGE_SIZE);
+ rStream.Write((sal_uInt8*)aEmptyData,PAGE_SIZE);
}
- ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE);
+ sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE);
OSL_UNUSED( nCurrentPos );
nValue = rPage.nCount;
rStream << nValue << rPage.aChild;
- USHORT i = 0;
+ sal_uInt16 i = 0;
for (; i < rPage.nCount; i++)
rPage[i].Write(rStream, rPage);
// check if we have to fill the stream with '\0'
if(i < rPage.rIndex.getHeader().db_maxkeys)
{
- ULONG nTell = rStream.Tell() % PAGE_SIZE;
- USHORT nBufferSize = rStream.GetBufferSize();
- ULONG nRemainSize = nBufferSize - nTell;
+ sal_uIntPtr nTell = rStream.Tell() % PAGE_SIZE;
+ sal_uInt16 nBufferSize = rStream.GetBufferSize();
+ sal_uIntPtr nRemainSize = nBufferSize - nTell;
char* pEmptyData = new char[nRemainSize];
memset(pEmptyData,0x00,nRemainSize);
- rStream.Write((BYTE*)pEmptyData,nRemainSize);
+ rStream.Write((sal_uInt8*)pEmptyData,nRemainSize);
rStream.Seek(nTell);
delete [] pEmptyData;
}
@@ -942,7 +942,7 @@ void ONDXPage::PrintPage()
DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos());
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ONDXNode rNode = (*this)[i];
ONDXKey& rKey = rNode.GetKey();
@@ -967,7 +967,7 @@ void ONDXPage::PrintPage()
{
#if OSL_DEBUG_LEVEL > 1
GetChild(&rIndex)->PrintPage();
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ONDXNode rNode = (*this)[i];
rNode.GetChild(&rIndex,this)->PrintPage();
@@ -978,16 +978,16 @@ void ONDXPage::PrintPage()
}
#endif
// -----------------------------------------------------------------------------
-BOOL ONDXPage::IsFull() const
+sal_Bool ONDXPage::IsFull() const
{
return Count() == rIndex.getHeader().db_maxkeys;
}
// -----------------------------------------------------------------------------
//------------------------------------------------------------------
-USHORT ONDXPage::Search(const ONDXKey& rSearch)
+sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch)
{
// binare Suche spaeter
- USHORT i = NODE_NOTFOUND;
+ sal_uInt16 i = NODE_NOTFOUND;
while (++i < Count())
if ((*this)[i].GetKey() == rSearch)
break;
@@ -996,9 +996,9 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch)
}
//------------------------------------------------------------------
-USHORT ONDXPage::Search(const ONDXPage* pPage)
+sal_uInt16 ONDXPage::Search(const ONDXPage* pPage)
{
- USHORT i = NODE_NOTFOUND;
+ sal_uInt16 i = NODE_NOTFOUND;
while (++i < Count())
if (((*this)[i]).GetChild() == pPage)
break;
@@ -1015,7 +1015,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace");
if (rSearch != rReplace)
{
- USHORT nPos = NODE_NOTFOUND;
+ sal_uInt16 nPos = NODE_NOTFOUND;
ONDXPage* pPage = this;
while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND)
@@ -1024,33 +1024,33 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
if (pPage)
{
(*pPage)[nPos].GetKey() = rReplace;
- pPage->SetModified(TRUE);
+ pPage->SetModified(sal_True);
}
}
}
// -----------------------------------------------------------------------------
-ONDXNode& ONDXPage::operator[] (USHORT nPos)
+ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos)
{
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
return ppNodes[nPos];
}
//------------------------------------------------------------------
-const ONDXNode& ONDXPage::operator[] (USHORT nPos) const
+const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const
{
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
return ppNodes[nPos];
}
// -----------------------------------------------------------------------------
-void ONDXPage::Remove(USHORT nPos)
+void ONDXPage::Remove(sal_uInt16 nPos)
{
DBG_ASSERT(nCount > nPos, "falscher Indexzugriff");
- for (USHORT i = nPos; i < (nCount-1); i++)
+ for (sal_uInt16 i = nPos; i < (nCount-1); i++)
(*this)[i] = (*this)[i+1];
nCount--;
- bModified = TRUE;
+ bModified = sal_True;
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx
index dfa347c12134..02d3fb284312 100644
--- a/connectivity/source/drivers/evoab/LFolderList.cxx
+++ b/connectivity/source/drivers/evoab/LFolderList.cxx
@@ -74,7 +74,7 @@ using namespace ::com::sun::star::lang;
// -------------------------------------------------------------------------
void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
{
- BOOL bRead = TRUE;
+ sal_Bool bRead = sal_True;
QuotedTokenizedString aHeaderLine;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
@@ -125,11 +125,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
aColumnName += String::CreateFromInt32(i+1);
sal_Int32 eType;
- UINT16 nPrecision = 0;
- UINT16 nScale = 0;
+ sal_uInt16 nPrecision = 0;
+ sal_uInt16 nScale = 0;
- BOOL bNumeric = FALSE;
- ULONG nIndex = 0;
+ sal_Bool bNumeric = sal_False;
+ sal_uIntPtr nIndex = 0;
// first without fielddelimiter
String aField;
@@ -137,7 +137,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
if (aField.Len() == 0 ||
(pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0)))
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
else
{
@@ -149,11 +149,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
if (aField2.Len() == 0)
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
else
{
- bNumeric = TRUE;
+ bNumeric = sal_True;
xub_StrLen nDot = 0;
for (xub_StrLen j = 0; j < aField2.Len(); j++)
{
@@ -163,7 +163,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
(!cThousandDelimiter || c != cThousandDelimiter) &&
!aCharClass.isDigit(aField2,j))
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
if (cDecimalDelimiter && c == cDecimalDelimiter)
@@ -175,7 +175,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
}
if (nDot > 1) // if there is more than one dot it isn't a number
- bNumeric = FALSE;
+ bNumeric = sal_False;
if (bNumeric && cThousandDelimiter)
{
// Ist der Trenner richtig angegeben?
@@ -188,7 +188,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
continue;
else
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
}
diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx
index 2941cb6bd20f..16f5d2e2858e 100644
--- a/connectivity/source/drivers/evoab/LFolderList.hxx
+++ b/connectivity/source/drivers/evoab/LFolderList.hxx
@@ -63,7 +63,7 @@ namespace connectivity
private:
void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
- BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo);
+ sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols);
sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition);
diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx
index 2fefbafb7a94..790dc16c7c98 100644
--- a/connectivity/source/drivers/evoab/LNoException.cxx
+++ b/connectivity/source/drivers/evoab/LNoException.cxx
@@ -40,19 +40,19 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel )
return 0;
xub_StrLen nTokCount = 1;
- BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token?
- BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bStart = sal_True; // Stehen wir auf dem ersten Zeichen im Token?
+ sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
// Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
for( xub_StrLen i = 0; i < Len(); i++ )
{
if (bStart)
{
- bStart = FALSE;
+ bStart = sal_False;
// Erstes Zeichen ein String-Delimiter?
if ((*this).GetChar(i) == cStrDel)
{
- bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings!
+ bInString = sal_True; // dann sind wir jetzt INNERHALB des Strings!
continue; // dieses Zeichen ueberlesen!
}
}
@@ -69,7 +69,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel )
else
{
// String-Ende
- bInString = FALSE;
+ bInString = sal_False;
}
}
} else {
@@ -77,7 +77,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel )
if ( (*this).GetChar(i) == cTok )
{
nTokCount++;
- bStart = TRUE;
+ bStart = sal_True;
}
}
}
@@ -93,7 +93,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni
xub_StrLen nLen = Len();
if ( nLen )
{
- BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
// Erstes Zeichen ein String-Delimiter?
if (bInString )
@@ -116,7 +116,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni
else
{
// String-Ende
- bInString = FALSE;
+ bInString = sal_False;
}
}
else
@@ -152,7 +152,7 @@ sal_Bool OEvoabTable::checkHeaderLine()
{
if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine())
{
- BOOL bRead2;
+ sal_Bool bRead2;
do
{
bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding());
diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx
index b35d1c9551eb..c1a41e91acf2 100644
--- a/connectivity/source/drivers/evoab/LTable.cxx
+++ b/connectivity/source/drivers/evoab/LTable.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::lang;
// -------------------------------------------------------------------------
void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
{
- BOOL bRead = TRUE;
+ sal_Bool bRead = sal_True;
QuotedTokenizedString aHeaderLine;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
@@ -145,11 +145,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
//OSL_TRACE("OEvoabTable::aColumnName = %s\n", ((OUtoCStr(::rtl::OUString(aColumnName))) ? (OUtoCStr(::rtl::OUString(aColumnName))):("NULL")) );
sal_Int32 eType;
- UINT16 nPrecision = 0;
- UINT16 nScale = 0;
+ sal_uInt16 nPrecision = 0;
+ sal_uInt16 nScale = 0;
- BOOL bNumeric = FALSE;
- ULONG nIndex = 0;
+ sal_Bool bNumeric = sal_False;
+ sal_uIntPtr nIndex = 0;
// first without fielddelimiter
String aField;
@@ -159,7 +159,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
if (aField.Len() == 0 ||
(pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0)))
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
else
{
@@ -173,11 +173,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
if (aField2.Len() == 0)
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
else
{
- bNumeric = TRUE;
+ bNumeric = sal_True;
xub_StrLen nDot = 0;
for (xub_StrLen j = 0; j < aField2.Len(); j++)
{
@@ -187,7 +187,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
(!cThousandDelimiter || c != cThousandDelimiter) &&
!aCharClass.isDigit(aField2,j))
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
if (cDecimalDelimiter && c == cDecimalDelimiter)
@@ -199,7 +199,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
}
if (nDot > 1) // if there is more than one dot it isn't a number
- bNumeric = FALSE;
+ bNumeric = sal_False;
if (bNumeric && cThousandDelimiter)
{
// Ist der Trenner richtig angegeben?
@@ -212,7 +212,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
continue;
else
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
}
@@ -514,7 +514,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
*(_rRow->get())[0] = m_nFilePos;
if (!bRetrieveData)
- return TRUE;
+ return sal_True;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
// Felder:
@@ -700,7 +700,7 @@ sal_Bool OEvoabTable::checkHeaderLine()
{
if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine())
{
- BOOL bRead2;
+ sal_Bool bRead2;
do
{
bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding());
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index 4bf0a2e37a1b..ac04fc9dff86 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -100,16 +100,16 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector<
}
// Weiter absteigen im Parse Tree
- for (UINT32 i = 0; i < pParseNode->count(); i++)
+ for (sal_uInt32 i = 0; i < pParseNode->count(); i++)
scanParameter(pParseNode->getChild(i),_rParaNodes);
}
// -----------------------------------------------------------------------------
OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" );
- UINT32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue());
+ sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue());
- OKeyValue* pKeyValue = OKeyValue::createKeyValue((UINT32)nBookmarkValue);
+ OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue);
::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin();
for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter)
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 68e23360331b..386a601a3b7c 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -478,7 +478,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal
*((m_aParameterRow->get())[parameterIndex]) = x;
}
// -----------------------------------------------------------------------------
-UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol)
+sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::AddParameter" );
OSL_UNUSED( pParameter );
@@ -492,7 +492,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere
::rtl::OUString sParameterName;
// Parameter-Column aufsetzen:
sal_Int32 eType = DataType::VARCHAR;
- UINT32 nPrecision = 255;
+ sal_uInt32 nPrecision = 255;
sal_Int32 nScale = 0;
sal_Int32 nNullable = ColumnValue::NULLABLE;
@@ -576,20 +576,20 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult)
if (!m_xParamColumns->get().empty())
{
// Zunaechst AssignValues
- USHORT nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an
+ sal_uInt16 nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an
// Nach zu substituierenden Parametern suchen:
size_t nCount = m_aAssignValues.isValid() ? m_aAssignValues->get().size() : 1; // 1 ist wichtig fuer die Kriterien
for (size_t j = 1; j < nCount; j++)
{
- UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j);
+ sal_uInt32 nParameter = (*m_aAssignValues).getParameterIndex(j);
if (nParameter == SQL_NO_PARAMETER)
continue; // dieser AssignValue ist kein Parameter
++nParaCount; // ab hier ist der Parameter gueltig
// Parameter ersetzen. Wenn Parameter nicht verfuegbar,
// Value auf NULL setzen.
- // (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter];
+ // (*m_aAssignValues)[j] = (*m_aParameterRow)[(sal_uInt16)nParameter];
}
if (m_aParameterRow.isValid() && (m_xParamColumns->get().size()+1) != m_aParameterRow->get().size() )
@@ -627,7 +627,7 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN
if(nParameter == -1)
nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol);
// Nr. des Parameters in der Variablen merken:
- SetAssignValue(_sColumnName, String(), TRUE, nParameter);
+ SetAssignValue(_sColumnName, String(), sal_True, nParameter);
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index b2cb568eed4e..b9b7180eb65e 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -645,7 +645,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
// we know that we append new rows at the end
// so we have to know where the end is
m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_False);
- m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), TRUE,m_xColsIdx);
+ m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), sal_True,m_xColsIdx);
if(m_bRowInserted && m_pFileSet.isValid())
{
sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue();
@@ -901,20 +901,20 @@ IPropertyArrayHelper & OResultSet::getInfoHelper()
}
//------------------------------------------------------------------
-BOOL OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
- INT32 nFirstOffset,
- BOOL bEvaluate,
- BOOL bRetrieveData)
+sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
+ sal_Int32 nFirstOffset,
+ sal_Bool bEvaluate,
+ sal_Bool bRetrieveData)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::ExecuteRow" );
OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::ExecuteRow: Analyzer isn't set!");
// Fuer weitere Fetch-Operationen werden diese Angaben ggf. veraendert ...
IResultSetHelper::Movement eCursorPosition = eFirstCursorPosition;
- INT32 nOffset = nFirstOffset;
+ sal_Int32 nOffset = nFirstOffset;
const OSQLColumns & rTableCols = m_pTable->getTableColumns().getBody();
- BOOL bHasRestriction = m_pSQLAnalyzer->hasRestriction();
+ sal_Bool bHasRestriction = m_pSQLAnalyzer->hasRestriction();
again:
// protect from reading over the end when someboby is inserting while we are reading
@@ -1015,7 +1015,7 @@ again:
if (bEvaluate)
{
// jetzt die eigentliche Ergebniszeile Lesen
- bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE);
+ bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,sal_True);
}
if (bOK)
@@ -1030,7 +1030,7 @@ again:
sal_Bool bOK = sal_True;
if (bEvaluate)
{
- bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE);
+ bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,sal_True);
}
if (bOK)
{
@@ -1042,13 +1042,13 @@ again:
}
//-------------------------------------------------------------------
-BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData)
+sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::Move" );
//IgnoreDeletedRows:
//
- INT32 nTempPos = m_nRowPos;
+ sal_Int32 nTempPos = m_nRowPos;
// exclusiver zugriff auf die Tabelle
// vos::OGuard* pGuard = m_pTable->Lock();
@@ -1058,7 +1058,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
if (!m_pFileSet.isValid()) // kein Index verfuegbar
{
// Normales FETCH
- ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData);
+ ExecuteRow(eCursorPosition,nOffset,sal_False,bRetrieveData);
// now set the bookmark for outside this is the logical pos and not the file pos
*(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1);
@@ -1096,17 +1096,17 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
// Der FileCursor ist ausserhalb des gueltigen Bereichs, wenn
// a.) m_nRowPos < 1
// b.) Ein KeySet besteht und m_nRowPos > m_pFileSet->size()
- if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen()
+ if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen()
{
// aStatus.Set(SQL_STAT_NO_DATA_FOUND);
goto Error;
}
else
{
- if (m_nRowPos < (INT32)m_pFileSet->get().size())
+ if (m_nRowPos < (sal_Int32)m_pFileSet->get().size())
{
// Fetch ueber Index
- ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],FALSE,bRetrieveData);
+ ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],sal_False,bRetrieveData);
// now set the bookmark for outside
*(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1);
@@ -1126,26 +1126,26 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
}
sal_Bool bOK = sal_True;
// Ermitteln der Anzahl weiterer Fetches
- while (bOK && m_nRowPos >= (INT32)m_pFileSet->get().size())
+ while (bOK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size())
{
if (m_pEvaluationKeySet)
{
- if (m_nRowPos >= (INT32)m_pEvaluationKeySet->size())
+ if (m_nRowPos >= (sal_Int32)m_pEvaluationKeySet->size())
return sal_False;
// aStatus.Set(SQL_STAT_NO_DATA_FOUND);
else if (m_nRowPos == 0)
{
m_aEvaluateIter = m_pEvaluationKeySet->begin();
- bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData);
+ bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData);
}
else
{
++m_aEvaluateIter;
- bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData);
+ bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData);
}
}
else
- bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE, FALSE);//bRetrieveData);
+ bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True, sal_False);//bRetrieveData);
}
if (bOK)
@@ -1324,7 +1324,7 @@ void OResultSet::sortRows()
eKeyType[i] = SQL_ORDERBYKEY_DOUBLE;
break;
- // Andere Typen sind nicht implementiert (und damit immer FALSE)
+ // Andere Typen sind nicht implementiert (und damit immer sal_False)
default:
eKeyType[i] = SQL_ORDERBYKEY_NONE;
OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert");
@@ -1341,19 +1341,19 @@ void OResultSet::sortRows()
while (m_aEvaluateIter != m_pEvaluationKeySet->end())
{
- ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE);
+ ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True);
++m_aEvaluateIter;
}
}
else
{
- while ( ExecuteRow( IResultSetHelper::NEXT, 1, FALSE, TRUE ) )
+ while ( ExecuteRow( IResultSetHelper::NEXT, 1, sal_False, sal_True ) )
{
m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() );
if ( m_pSQLAnalyzer->hasFunctions() )
m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping );
const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue();
- ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, TRUE, FALSE );
+ ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, sal_True, sal_False );
}
}
@@ -1370,7 +1370,7 @@ void OResultSet::sortRows()
// -------------------------------------------------------------------------
-BOOL OResultSet::OpenImpl()
+sal_Bool OResultSet::OpenImpl()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OpenImpl" );
OSL_ENSURE(m_pSQLAnalyzer,"No analyzer set with setSqlAnalyzer!");
@@ -1441,9 +1441,9 @@ BOOL OResultSet::OpenImpl()
while (bOK)
{
if (m_pEvaluationKeySet)
- ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE);
+ ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True);
else
- bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE);
+ bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True);
if (bOK)
{
@@ -1465,8 +1465,8 @@ BOOL OResultSet::OpenImpl()
}
else
{
- BOOL bDistinct = FALSE;
- BOOL bWasSorted = FALSE;
+ sal_Bool bDistinct = sal_False;
+ sal_Bool bWasSorted = sal_False;
OSQLParseNode *pDistinct = m_pParseTree->getChild(1);
::std::vector<sal_Int32> aOrderbyColumnNumberSave;
::std::vector<TAscendingOrder> aOrderbyAscendingSave;
@@ -1479,7 +1479,7 @@ BOOL OResultSet::OpenImpl()
aOrderbyColumnNumberSave = m_aOrderbyColumnNumber;// .assign(m_aOrderbyColumnNumber.begin(), m_aOrderbyColumnNumber.end());
m_aOrderbyColumnNumber.clear();
aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), m_aOrderbyAscending.end());
- bWasSorted = TRUE;
+ bWasSorted = sal_True;
}
// the first column is the bookmark column
@@ -1487,7 +1487,7 @@ BOOL OResultSet::OpenImpl()
::std::copy(aColStart, m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber));
// m_aOrderbyColumnNumber.assign(aColStart, m_aColMapping.end());
m_aOrderbyAscending.assign(m_aColMapping.size()-1, SQL_ASC);
- bDistinct = TRUE;
+ bDistinct = sal_True;
}
if (IsSorted())
@@ -1525,15 +1525,15 @@ BOOL OResultSet::OpenImpl()
if (nMaxRow)
{
#if OSL_DEBUG_LEVEL > 1
- INT32 nFound=0;
+ sal_Int32 nFound=0;
#endif
- INT32 nPos;
- INT32 nKey;
+ sal_Int32 nPos;
+ sal_Int32 nKey;
for( size_t j = nMaxRow-1; j > 0; --j)
{
nPos = (m_pFileSet->get())[j];
- ExecuteRow(IResultSetHelper::BOOKMARK,nPos,FALSE);
+ ExecuteRow(IResultSetHelper::BOOKMARK,nPos,sal_False);
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
{ // copy row values
OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin();
@@ -1547,7 +1547,7 @@ BOOL OResultSet::OpenImpl()
// compare with next row
nKey = (m_pFileSet->get())[j-1];
- ExecuteRow(IResultSetHelper::BOOKMARK,nKey,FALSE);
+ ExecuteRow(IResultSetHelper::BOOKMARK,nKey,sal_False);
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin();
OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin();
@@ -1611,9 +1611,9 @@ BOOL OResultSet::OpenImpl()
while (bOK)
{
if (m_pEvaluationKeySet)
- ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE);
+ ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True);
else
- bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE);
+ bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True);
if (bOK)
{
@@ -1638,7 +1638,7 @@ BOOL OResultSet::OpenImpl()
m_nRowCountResult = 0;
OSL_ENSURE(m_aAssignValues.isValid(),"No assign values set!");
- if(!m_pTable->InsertRow(m_aAssignValues.getBody(), TRUE,m_xColsIdx))
+ if(!m_pTable->InsertRow(m_aAssignValues.getBody(), sal_True,m_xColsIdx))
{
m_nFilePos = 0;
return sal_False;
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 52200553d042..929fc1524337 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -743,7 +743,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam
else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL))
{
// NULL setzen
- SetAssignValue(aColumnName, String(), TRUE);
+ SetAssignValue(aColumnName, String(), sal_True);
}
else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter))
parseParamterElem(aColumnName,pRow_Value_Constructor_Elem);
@@ -756,8 +756,8 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam
//------------------------------------------------------------------
void OStatement_Base::SetAssignValue(const String& aColumnName,
const String& aValue,
- BOOL bSetNull,
- UINT32 nParameter)
+ sal_Bool bSetNull,
+ sal_uInt32 nParameter)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::SetAssignValue" );
Reference<XPropertySet> xCol;
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index e317120da95c..4d10d97b24b5 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -204,19 +204,19 @@ void SAL_CALL OFileTable::release() throw()
OTable_TYPEDEF::release();
}
// -----------------------------------------------------------------------------
-BOOL OFileTable::InsertRow(OValueRefVector& /*rRow*/, BOOL /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/)
+sal_Bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, sal_Bool /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::InsertRow" );
return sal_False;
}
// -----------------------------------------------------------------------------
-BOOL OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/)
+sal_Bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::DeleteRow" );
return sal_False;
}
// -----------------------------------------------------------------------------
-BOOL OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/)
+sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::UpdateRow" );
return sal_False;
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 8211e954a49f..04df24ab379e 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -284,12 +284,12 @@ OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos,
return new OOperandAttr(static_cast<sal_uInt16>(_nPos),_xCol);
}
// -----------------------------------------------------------------------------
-BOOL OSQLAnalyzer::hasRestriction() const
+sal_Bool OSQLAnalyzer::hasRestriction() const
{
return m_aCompiler->hasCode();
}
// -----------------------------------------------------------------------------
-BOOL OSQLAnalyzer::hasFunctions() const
+sal_Bool OSQLAnalyzer::hasFunctions() const
{
if ( m_bSelectionFirstTime )
{
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 9d4e1644d370..57b562664026 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -355,7 +355,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con
case DataType::LONGVARCHAR:
{
rtl::OUString sLH = aLH, sRH = aRH;
- INT32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength
+ sal_Int32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength
(
sLH.pData->buffer,
sLH.pData->length,
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index eeaec1ff40f1..4ea918ef3e27 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -60,7 +60,7 @@ OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs
// : m_rCursor(rCurs)
: m_pAnalyzer(pAnalyzer)
, m_nParamCounter(0)
- , m_bORCondition(FALSE)
+ , m_bORCondition(sal_False)
{
DBG_CTOR(OPredicateCompiler,NULL);
}
diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index 9b315f8cce85..6abfa8a02e01 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -44,8 +44,8 @@ namespace connectivity
return 0;
xub_StrLen nTokCount = 1;
- BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token?
- BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bStart = sal_True; // Stehen wir auf dem ersten Zeichen im Token?
+ sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
// Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
for( xub_StrLen i = 0; i < nLen; ++i )
@@ -53,11 +53,11 @@ namespace connectivity
const sal_Unicode cChar = m_sString.GetChar(i);
if (bStart)
{
- bStart = FALSE;
+ bStart = sal_False;
// Erstes Zeichen ein String-Delimiter?
if ( cChar == cStrDel )
{
- bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings!
+ bInString = sal_True; // dann sind wir jetzt INNERHALB des Strings!
continue; // dieses Zeichen ueberlesen!
}
}
@@ -75,7 +75,7 @@ namespace connectivity
else
{
// String-Ende
- bInString = FALSE;
+ bInString = sal_False;
}
}
} // if (bInString)
@@ -85,7 +85,7 @@ namespace connectivity
if ( cChar == cTok )
{
++nTokCount;
- bStart = TRUE;
+ bStart = sal_True;
}
}
}
@@ -102,7 +102,7 @@ namespace connectivity
const xub_StrLen nLen = m_sString.Len();
if ( nLen )
{
- BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
// Erstes Zeichen ein String-Delimiter?
if (bInString )
@@ -131,7 +131,7 @@ namespace connectivity
else
{
// String-Ende
- bInString = FALSE;
+ bInString = sal_False;
*pData = 0;
}
}
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index c427675f15a0..4dc27265b585 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -72,7 +72,7 @@ using namespace ::com::sun::star::lang;
void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatTable::fillColumns" );
- BOOL bRead = TRUE;
+ sal_Bool bRead = sal_True;
QuotedTokenizedString aHeaderLine;
OFlatConnection* pConnection = (OFlatConnection*)m_pConnection;
@@ -193,8 +193,8 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
{
if ( io_nType != DataType::VARCHAR )
{
- BOOL bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER;
- ULONG nIndex = 0;
+ sal_Bool bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER;
+ sal_uLong nIndex = 0;
if ( bNumeric )
{
@@ -204,7 +204,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
if (aField.Len() == 0 ||
(m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
if ( m_cStringDelimiter != '\0' )
aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
else
@@ -220,11 +220,11 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
if (aField2.Len() == 0)
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
else
{
- bNumeric = TRUE;
+ bNumeric = sal_True;
xub_StrLen nDot = 0;
xub_StrLen nDecimalDelCount = 0;
xub_StrLen nSpaceCount = 0;
@@ -242,7 +242,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
!aCharClass.isDigit(aField2,j) &&
( j != 0 || (c != '+' && c != '-' ) ) )
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
if (cDecimalDelimiter && c == cDecimalDelimiter)
@@ -256,7 +256,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
}
if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number
- bNumeric = FALSE;
+ bNumeric = sal_False;
if (bNumeric && cThousandDelimiter)
{
// Ist der Trenner richtig angegeben?
@@ -269,7 +269,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
continue;
else
{
- bNumeric = FALSE;
+ bNumeric = sal_False;
break;
}
}
@@ -606,7 +606,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
*(_rRow->get())[0] = m_nFilePos;
if (!bRetrieveData)
- return TRUE;
+ return sal_True;
if ( m_bNeedToReadLine )
{
sal_Int32 nCurrentPos = 0;
diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h
index 762d51160db9..a1667b2c87a5 100644
--- a/connectivity/source/drivers/mozab/pre_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h
@@ -25,13 +25,6 @@
*
************************************************************************/
-#ifndef BOOL
-# define MOZ_BOOL
-
-# define BOOL mozBOOL
-# define Bool mozBooL
-#endif
-
// Turn off DEBUG Assertions
#ifdef _DEBUG
#define _DEBUG_WAS_DEFINED _DEBUG
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index 9155ba72bb87..2637a7a2a5b1 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -83,13 +83,13 @@ namespace connectivity
ONDXPageList m_aCollector; // Pool von nicht mehr benoetigten Seiten
ONDXPagePtr m_aRoot, // Wurzel des b+ Baums
m_aCurLeaf; // aktuelles Blatt
- USHORT m_nCurNode; // Position des aktuellen Knoten
+ sal_uInt16 m_nCurNode; // Position des aktuellen Knoten
sal_uInt32 m_nPageCount,
m_nRootPage;
ODbaseTable* m_pTable;
- BOOL m_bUseCollector : 1; // Verwenden des GarbageCollectors
+ sal_Bool m_bUseCollector : 1; // Verwenden des GarbageCollectors
::rtl::OUString getCompletePath();
void closeImpl();
@@ -123,31 +123,31 @@ namespace connectivity
sal_uInt32 GetRootPos() {return m_nRootPage;}
sal_uInt32 GetPageCount() {return m_nPageCount;}
- BOOL IsText() const {return m_aHeader.db_keytype == 0;}
- USHORT GetMaxNodes() const {return m_aHeader.db_maxkeys;}
+ sal_Bool IsText() const {return m_aHeader.db_keytype == 0;}
+ sal_uInt16 GetMaxNodes() const {return m_aHeader.db_maxkeys;}
- virtual BOOL Insert(sal_uInt32 nRec, const ORowSetValue& rValue);
- virtual BOOL Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&);
- virtual BOOL Delete(sal_uInt32 nRec, const ORowSetValue& rValue);
- virtual BOOL Find(sal_uInt32 nRec, const ORowSetValue& rValue);
+ virtual sal_Bool Insert(sal_uInt32 nRec, const ORowSetValue& rValue);
+ virtual sal_Bool Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&);
+ virtual sal_Bool Delete(sal_uInt32 nRec, const ORowSetValue& rValue);
+ virtual sal_Bool Find(sal_uInt32 nRec, const ORowSetValue& rValue);
void createINFEntry();
- BOOL CreateImpl();
- BOOL DropImpl();
+ sal_Bool CreateImpl();
+ sal_Bool DropImpl();
DECLARE_SERVICE_INFO();
protected:
- ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, BOOL bLoad = FALSE);
+ ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, sal_Bool bLoad = sal_False);
void Collect(ONDXPage*);
ONDXPagePtr getRoot();
sal_Bool isUnique() const { return m_IsUnique; }
- BOOL UseCollector() const {return m_bUseCollector;}
+ sal_Bool UseCollector() const {return m_bUseCollector;}
// Tree operationen
void Insert(ONDXPagePtr aCurPage, ONDXNode& rNode);
- void Release(BOOL bSave = TRUE);
- BOOL ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue);
+ void Release(sal_Bool bSave = sal_True);
+ sal_Bool ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue);
};
SvStream& operator << (SvStream &rStream, ODbaseIndex&);
diff --git a/connectivity/source/inc/dbase/DIndexIter.hxx b/connectivity/source/inc/dbase/DIndexIter.hxx
index 99ed3f37af91..d24f981ae740 100644
--- a/connectivity/source/inc/dbase/DIndexIter.hxx
+++ b/connectivity/source/inc/dbase/DIndexIter.hxx
@@ -47,14 +47,14 @@ namespace connectivity
ODbaseIndex* m_pIndex;
ONDXPagePtr m_aRoot,
m_aCurLeaf;
- USHORT m_nCurNode;
+ sal_uInt16 m_nCurNode;
protected:
- ULONG Find(BOOL bFirst);
- ULONG GetCompare(BOOL bFirst);
- ULONG GetLike(BOOL bFirst);
- ULONG GetNull(BOOL bFirst);
- ULONG GetNotNull(BOOL bFirst);
+ sal_uIntPtr Find(sal_Bool bFirst);
+ sal_uIntPtr GetCompare(sal_Bool bFirst);
+ sal_uIntPtr GetLike(sal_Bool bFirst);
+ sal_uIntPtr GetNull(sal_Bool bFirst);
+ sal_uIntPtr GetNotNull(sal_Bool bFirst);
ONDXKey* GetFirstKey(ONDXPage* pPage,
const file::OOperand& rKey);
@@ -75,8 +75,8 @@ namespace connectivity
}
virtual ~OIndexIterator();
- ULONG First();
- ULONG Next();
+ sal_uIntPtr First();
+ sal_uIntPtr Next();
};
}
diff --git a/connectivity/source/inc/dbase/DIndexPage.hxx b/connectivity/source/inc/dbase/DIndexPage.hxx
index ad67a7f7ee20..2ec510a234ff 100644
--- a/connectivity/source/inc/dbase/DIndexPage.hxx
+++ b/connectivity/source/inc/dbase/DIndexPage.hxx
@@ -61,18 +61,18 @@ namespace connectivity
friend SvStream& operator << (SvStream &rStream, const ONDXPagePtr&);
friend SvStream& operator >> (SvStream &rStream, ONDXPagePtr&);
- UINT32 nPagePos; // Position in der Indexdatei
+ sal_uInt32 nPagePos; // Position in der Indexdatei
public:
- ONDXPagePtr(UINT32 nPos = 0):nPagePos(nPos){}
+ ONDXPagePtr(sal_uInt32 nPos = 0):nPagePos(nPos){}
ONDXPagePtr(const ONDXPagePtr& rRef);
ONDXPagePtr(ONDXPage* pRefPage);
ONDXPagePtr& operator=(const ONDXPagePtr& rRef);
ONDXPagePtr& operator=(ONDXPage* pPageRef);
- UINT32 GetPagePos() const {return nPagePos;}
- BOOL HasPage() const {return nPagePos != 0;}
+ sal_uInt32 GetPagePos() const {return nPagePos;}
+ sal_Bool HasPage() const {return nPagePos != 0;}
sal_Bool Is() const { return isValid(); }
void Clear()
{
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index cca6d97c41c6..56be27f69dce 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -68,26 +68,26 @@ namespace connectivity
private:
struct DBFHeader { /* Kopfsatz-Struktur */
DBFType db_typ; /* Dateityp */
- BYTE db_aedat[3]; /* Datum der letzen Aenderung */
+ sal_uInt8 db_aedat[3]; /* Datum der letzen Aenderung */
/* JJ MM TT */
sal_uInt32 db_anz; /* Anzahl der Saetze */
- USHORT db_kopf; /* laenge Kopfsatz-Struktur */
- USHORT db_slng; /* laenge der Daten-Saetze */
- BYTE db_frei[20]; /* reserviert */
+ sal_uInt16 db_kopf; /* laenge Kopfsatz-Struktur */
+ sal_uInt16 db_slng; /* laenge der Daten-Saetze */
+ sal_uInt8 db_frei[20]; /* reserviert */
};
struct DBFColumn { /* Feldbezeichner */
- BYTE db_fnm[11]; /* Feldname */
- BYTE db_typ; /* Feldtyp */
- UINT32 db_adr; /* Feldadresse */
- BYTE db_flng; /* Feldlaenge */
- BYTE db_dez; /* Dezimalstellen fuer N */
- BYTE db_frei2[14]; /* reserviert */
+ sal_uInt8 db_fnm[11]; /* Feldname */
+ sal_uInt8 db_typ; /* Feldtyp */
+ sal_uInt32 db_adr; /* Feldadresse */
+ sal_uInt8 db_flng; /* Feldlaenge */
+ sal_uInt8 db_dez; /* Dezimalstellen fuer N */
+ sal_uInt8 db_frei2[14]; /* reserviert */
};
struct DBFMemoHeader
{
DBFMemoType db_typ; /* Dateityp */
- UINT32 db_next; /* naechster freier Block */
- USHORT db_size; /* Blockgroesse: dBase 3 fest */
+ sal_uInt32 db_next; /* naechster freier Block */
+ sal_uInt16 db_size; /* Blockgroesse: dBase 3 fest */
};
::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset
@@ -107,15 +107,15 @@ namespace connectivity
void fillColumns();
String createTempFile();
void copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos);
- BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo);
- BOOL CreateMemoFile(const INetURLObject& aFile);
- BOOL HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;}
- BOOL ReadMemoHeader();
- BOOL ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable);
-
- BOOL WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr);
- BOOL WriteBuffer();
- BOOL UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
+ sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
+ sal_Bool CreateMemoFile(const INetURLObject& aFile);
+ sal_Bool HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;}
+ sal_Bool ReadMemoHeader();
+ sal_Bool ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable);
+
+ sal_Bool WriteMemo(ORowSetValue& aVariable, sal_uIntPtr& rBlockNr);
+ sal_Bool WriteBuffer();
+ sal_Bool UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> isUniqueByColumnName(sal_Int32 _nColumnPos);
void AllocBuffer();
@@ -161,19 +161,19 @@ namespace connectivity
// XRename
virtual void SAL_CALL rename( const ::rtl::OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
- BOOL DropImpl();
- BOOL CreateImpl();
+ sal_Bool DropImpl();
+ sal_Bool CreateImpl();
- virtual BOOL InsertRow(OValueRefVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
- virtual BOOL DeleteRow(const OSQLColumns& _rCols);
- virtual BOOL UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
+ virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
+ virtual sal_Bool DeleteRow(const OSQLColumns& _rCols);
+ virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor);
virtual void dropColumn(sal_Int32 _nPos);
static String getEntry(file::OConnection* _pConnection,const ::rtl::OUString& _sURL );
- static BOOL Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,sdbcx::OCollection* _pIndexes );
+ static sal_Bool Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,sdbcx::OCollection* _pIndexes );
virtual void refreshHeader();
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index 97661e3ff5d9..da60eeee0c9b 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -50,14 +50,14 @@ namespace connectivity
class ONDXKey : public ONDXKey_BASE
{
friend class ONDXNode;
- UINT32 nRecord; /* Satzzeiger */
+ sal_uInt32 nRecord; /* Satzzeiger */
ORowSetValue xValue; /* Schluesselwert */
public:
- ONDXKey(UINT32 nRec=0);
- ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec);
- ONDXKey(const rtl::OUString& aStr, UINT32 nRec = 0);
- ONDXKey(double aVal, UINT32 nRec = 0);
+ ONDXKey(sal_uInt32 nRec=0);
+ ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec);
+ ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec = 0);
+ ONDXKey(double aVal, sal_uInt32 nRec = 0);
inline ONDXKey(const ONDXKey& rKey);
@@ -66,21 +66,21 @@ namespace connectivity
virtual const ORowSetValue& getValue() const;
- UINT32 GetRecord() const { return nRecord; }
- void setRecord(UINT32 _nRec) { nRecord = _nRec; }
+ sal_uInt32 GetRecord() const { return nRecord; }
+ void setRecord(sal_uInt32 _nRec) { nRecord = _nRec; }
void ResetRecord() { nRecord = 0; }
- BOOL operator == (const ONDXKey& rKey) const;
- BOOL operator != (const ONDXKey& rKey) const;
- BOOL operator < (const ONDXKey& rKey) const;
- BOOL operator <= (const ONDXKey& rKey) const;
- BOOL operator > (const ONDXKey& rKey) const;
- BOOL operator >= (const ONDXKey& rKey) const;
+ sal_Bool operator == (const ONDXKey& rKey) const;
+ sal_Bool operator != (const ONDXKey& rKey) const;
+ sal_Bool operator < (const ONDXKey& rKey) const;
+ sal_Bool operator <= (const ONDXKey& rKey) const;
+ sal_Bool operator > (const ONDXKey& rKey) const;
+ sal_Bool operator >= (const ONDXKey& rKey) const;
- BOOL Load (SvFileStream& rStream, BOOL bText);
- BOOL Write(SvFileStream& rStream, BOOL bText);
+ sal_Bool Load (SvFileStream& rStream, sal_Bool bText);
+ sal_Bool Write(SvFileStream& rStream, sal_Bool bText);
- static BOOL IsText(sal_Int32 eType);
+ static sal_Bool IsText(sal_Int32 eType);
private:
StringCompare Compare(const ONDXKey& rKey) const;
@@ -100,18 +100,18 @@ namespace connectivity
friend SvStream& operator << (SvStream &rStream, const ONDXPagePtr&);
friend SvStream& operator >> (SvStream &rStream, ONDXPagePtr&);
- UINT32 nPagePos; // Position in der Indexdatei
+ sal_uInt32 nPagePos; // Position in der Indexdatei
public:
- ONDXPagePtr(UINT32 nPos = 0):nPagePos(nPos){}
+ ONDXPagePtr(sal_uInt32 nPos = 0):nPagePos(nPos){}
ONDXPagePtr(const ONDXPagePtr& rRef);
ONDXPagePtr(ONDXPage* pRefPage);
ONDXPagePtr& operator=(const ONDXPagePtr& rRef);
ONDXPagePtr& operator=(ONDXPage* pPageRef);
- UINT32 GetPagePos() const {return nPagePos;}
- BOOL HasPage() const {return nPagePos != 0;}
+ sal_uInt32 GetPagePos() const {return nPagePos;}
+ sal_Bool HasPage() const {return nPagePos != 0;}
// sal_Bool Is() const { return isValid(); }
};
//==================================================================
@@ -124,9 +124,9 @@ namespace connectivity
friend SvStream& operator << (SvStream &rStream, const ONDXPage&);
friend SvStream& operator >> (SvStream &rStream, ONDXPage&);
- UINT32 nPagePos; // Position in der Indexdatei
- BOOL bModified : 1;
- USHORT nCount;
+ sal_uInt32 nPagePos; // Position in der Indexdatei
+ sal_Bool bModified : 1;
+ sal_uInt16 nCount;
ONDXPagePtr aParent, // VaterSeite
aChild; // Zeiger auf rechte ChildPage
@@ -135,33 +135,33 @@ namespace connectivity
public:
// Knoten Operationen
- USHORT Count() const {return nCount;}
+ sal_uInt16 Count() const {return nCount;}
- BOOL Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0);
- BOOL Insert(USHORT nIndex, ONDXNode& rNode);
- BOOL Append(ONDXNode& rNode);
- BOOL Delete(USHORT);
- void Remove(USHORT);
- void Release(BOOL bSave = TRUE);
- void ReleaseFull(BOOL bSave = TRUE);
+ sal_Bool Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0);
+ sal_Bool Insert(sal_uInt16 nIndex, ONDXNode& rNode);
+ sal_Bool Append(ONDXNode& rNode);
+ sal_Bool Delete(sal_uInt16);
+ void Remove(sal_uInt16);
+ void Release(sal_Bool bSave = sal_True);
+ void ReleaseFull(sal_Bool bSave = sal_True);
// Aufteilen und Zerlegen
ONDXNode Split(ONDXPage& rPage);
- void Merge(USHORT nParentNodePos, ONDXPagePtr xPage);
+ void Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage);
// Zugriffsoperationen
- ONDXNode& operator[] (USHORT nPos);
- const ONDXNode& operator[] (USHORT nPos) const;
+ ONDXNode& operator[] (sal_uInt16 nPos);
+ const ONDXNode& operator[] (sal_uInt16 nPos) const;
- BOOL IsRoot() const;
- BOOL IsLeaf() const;
- BOOL IsModified() const;
- BOOL HasParent();
- BOOL HasChild() const;
+ sal_Bool IsRoot() const;
+ sal_Bool IsLeaf() const;
+ sal_Bool IsModified() const;
+ sal_Bool HasParent();
+ sal_Bool HasChild() const;
- BOOL IsFull() const;
+ sal_Bool IsFull() const;
- UINT32 GetPagePos() const {return nPagePos;}
+ sal_uInt32 GetPagePos() const {return nPagePos;}
ONDXPagePtr& GetChild(ODbaseIndex* pIndex = 0);
// Parent braucht nicht nachgeladen zu werden
@@ -173,8 +173,8 @@ namespace connectivity
void SetChild(ONDXPagePtr aCh);
void SetParent(ONDXPagePtr aPa);
- USHORT Search(const ONDXKey& rSearch);
- USHORT Search(const ONDXPage* pPage);
+ sal_uInt16 Search(const ONDXKey& rSearch);
+ sal_uInt16 Search(const ONDXPage* pPage);
void SearchAndReplace(const ONDXKey& rSearch, ONDXKey& rReplace);
protected:
@@ -183,11 +183,11 @@ namespace connectivity
virtual void QueryDelete();
- void SetModified(BOOL bMod) {bModified = bMod;}
- void SetPagePos(UINT32 nPage) {nPagePos = nPage;}
+ void SetModified(sal_Bool bMod) {bModified = bMod;}
+ void SetPagePos(sal_uInt32 nPage) {nPagePos = nPage;}
- BOOL Find(const ONDXKey&); // rek. Abstieg
- USHORT FindPos(const ONDXKey& rKey) const;
+ sal_Bool Find(const ONDXKey&); // rek. Abstieg
+ sal_uInt16 FindPos(const ONDXKey& rKey) const;
#if OSL_DEBUG_LEVEL > 1
void PrintPage();
@@ -199,11 +199,11 @@ namespace connectivity
SvStream& operator << (SvStream &rStream, const ONDXPagePtr&);
SvStream& operator >> (SvStream &rStream, ONDXPagePtr&);
- inline BOOL ONDXPage::IsRoot() const {return !aParent.Is();}
- inline BOOL ONDXPage::IsLeaf() const {return !aChild.HasPage();}
- inline BOOL ONDXPage::IsModified() const {return bModified;}
- inline BOOL ONDXPage::HasParent() {return aParent.Is();}
- inline BOOL ONDXPage::HasChild() const {return aChild.HasPage();}
+ inline sal_Bool ONDXPage::IsRoot() const {return !aParent.Is();}
+ inline sal_Bool ONDXPage::IsLeaf() const {return !aChild.HasPage();}
+ inline sal_Bool ONDXPage::IsModified() const {return bModified;}
+ inline sal_Bool ONDXPage::HasParent() {return aParent.Is();}
+ inline sal_Bool ONDXPage::HasChild() const {return aChild.HasPage();}
inline ONDXPagePtr ONDXPage::GetParent() {return aParent;}
inline void ONDXPage::SetParent(ONDXPagePtr aPa = ONDXPagePtr())
@@ -239,7 +239,7 @@ namespace connectivity
:aChild(aPagePtr),aKey(rKey) {}
// verweist der Knoten auf eine Seite
- BOOL HasChild() const {return aChild.HasPage();}
+ sal_Bool HasChild() const {return aChild.HasPage();}
// Ist ein Index angegeben, kann gegebenfalls die Seite nachgeladen werden
ONDXPagePtr& GetChild(ODbaseIndex* pIndex = NULL, ONDXPage* = NULL);
@@ -256,14 +256,14 @@ namespace connectivity
//==================================================================
// inline implementation
//==================================================================
-// inline ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec)
+// inline ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec)
// : ONDXKey_BASE(eType)
// , nRecord(nRec),xValue(rVal)
// {
// }
-// inline ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec)
+// inline ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec)
// : ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR)
// ,nRecord(nRec)
// {
@@ -271,14 +271,14 @@ namespace connectivity
// xValue = aStr;
// }
-// inline ONDXKey::ONDXKey(double aVal, UINT32 nRec)
+// inline ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
// : ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE)
// ,nRecord(nRec)
// ,xValue(aVal)
// {
// }
-// inline ONDXKey::ONDXKey(UINT32 nRec)
+// inline ONDXKey::ONDXKey(sal_uInt32 nRec)
// :nRecord(nRec)
// {
// }
@@ -301,29 +301,29 @@ namespace connectivity
return *this;
}
- inline BOOL ONDXKey::operator == (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator == (const ONDXKey& rKey) const
{
if(&rKey == this)
return sal_True;
return Compare(rKey) == COMPARE_EQUAL;
}
- inline BOOL ONDXKey::operator != (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator != (const ONDXKey& rKey) const
{
return !operator== (rKey);
}
- inline BOOL ONDXKey::operator < (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator < (const ONDXKey& rKey) const
{
return Compare(rKey) == COMPARE_LESS;
}
- inline BOOL ONDXKey::operator > (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator > (const ONDXKey& rKey) const
{
return Compare(rKey) == COMPARE_GREATER;
}
- inline BOOL ONDXKey::operator <= (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator <= (const ONDXKey& rKey) const
{
return !operator > (rKey);
}
- inline BOOL ONDXKey::operator >= (const ONDXKey& rKey) const
+ inline sal_Bool ONDXKey::operator >= (const ONDXKey& rKey) const
{
return !operator< (rKey);
}
diff --git a/connectivity/source/inc/file/FPreparedStatement.hxx b/connectivity/source/inc/file/FPreparedStatement.hxx
index 9528ca16a508..d5bbd21b191a 100644
--- a/connectivity/source/inc/file/FPreparedStatement.hxx
+++ b/connectivity/source/inc/file/FPreparedStatement.hxx
@@ -68,7 +68,7 @@ namespace connectivity
void checkAndResizeParameters(sal_Int32 parameterIndex);
void setParameter(sal_Int32 parameterIndex, const ORowSetValue& x);
- UINT32 AddParameter(connectivity::OSQLParseNode * pParameter,
+ sal_uInt32 AddParameter(connectivity::OSQLParseNode * pParameter,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol);
void scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes);
void describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable);
diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx
index 530387ceef4a..ca774b53e341 100644
--- a/connectivity/source/inc/file/FResultSet.hxx
+++ b/connectivity/source/inc/file/FResultSet.hxx
@@ -166,13 +166,13 @@ namespace connectivity
void construct();
sal_Bool evaluate();
- BOOL ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
- INT32 nOffset = 1,
- BOOL bEvaluate = TRUE,
- BOOL bRetrieveData = TRUE);
+ sal_Bool ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
+ sal_Int32 nOffset = 1,
+ sal_Bool bEvaluate = sal_True,
+ sal_Bool bRetrieveData = sal_True);
OKeyValue* GetOrderbyKeyValue(OValueRefRow& _rRow);
- BOOL IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;}
+ sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;}
// return true when the select statement is "select count(*) from table"
inline sal_Bool isCount() const { return m_bIsCount; }
@@ -187,7 +187,7 @@ namespace connectivity
using OResultSet_BASE::rBHelper;
- BOOL Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
+ sal_Bool Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData);
virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex);
// OPropertyArrayUsageHelper
@@ -300,7 +300,7 @@ namespace connectivity
// special methods
inline sal_Int32 mapColumn(sal_Int32 column);
- virtual BOOL OpenImpl();
+ virtual sal_Bool OpenImpl();
virtual void doTableSpecials(const OSQLTable& _xTable);
inline sal_Int32 getRowCountResult() const { return m_nRowCountResult; }
diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx
index 0983811b9bd2..4c6fbcd426af 100644
--- a/connectivity/source/inc/file/FStatement.hxx
+++ b/connectivity/source/inc/file/FStatement.hxx
@@ -134,8 +134,8 @@ namespace connectivity
void GetAssignValues();
void SetAssignValue(const String& aColumnName,
const String& aValue,
- BOOL bSetNull = FALSE,
- UINT32 nParameter=SQL_NO_PARAMETER);
+ sal_Bool bSetNull = sal_False,
+ sal_uInt32 nParameter=SQL_NO_PARAMETER);
void ParseAssignValues( const ::std::vector< String>& aColumnNameList,
connectivity::OSQLParseNode* pRow_Value_Constructor_Elem,xub_StrLen nIndex);
diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx
index bc4cd450f931..f21a89ea0aef 100644
--- a/connectivity/source/inc/file/FTable.hxx
+++ b/connectivity/source/inc/file/FTable.hxx
@@ -87,9 +87,9 @@ namespace connectivity
virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) = 0;
::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
- virtual BOOL InsertRow(OValueRefVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
- virtual BOOL DeleteRow(const OSQLColumns& _rCols);
- virtual BOOL UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
+ virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
+ virtual sal_Bool DeleteRow(const OSQLColumns& _rCols);
+ virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor);
virtual void dropColumn(sal_Int32 _nPos);
// refresh the header of file based tables to see changes done by someone
diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx
index c882b760765a..96f815a5cc0d 100644
--- a/connectivity/source/inc/file/fanalyzer.hxx
+++ b/connectivity/source/inc/file/fanalyzer.hxx
@@ -81,9 +81,9 @@ namespace connectivity
void dispose();
void start(OSQLParseNode* pSQLParseNode);
void clean();
- virtual BOOL hasRestriction() const;
- virtual BOOL hasFunctions() const;
- inline BOOL evaluateRestriction() { return m_aInterpreter->start(); }
+ virtual sal_Bool hasRestriction() const;
+ virtual sal_Bool hasFunctions() const;
+ inline sal_Bool evaluateRestriction() { return m_aInterpreter->start(); }
void setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std::vector<sal_Int32>& _rColumnMapping);
void setOrigColumns(const OFileColumns& rCols);
virtual OOperandAttr* createOperandAttr(sal_Int32 _nPos,
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index ed3c40614217..cdbb902e9458 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -66,7 +66,7 @@ namespace connectivity
bool m_bNeedToReadLine;
private:
void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
- BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo);
+ sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
sal_Bool readLine(sal_Int32& _rnCurrentPos);
void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2
,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName