summaryrefslogtreecommitdiff
path: root/svl/source/misc/inethist.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/misc/inethist.cxx')
-rw-r--r--svl/source/misc/inethist.cxx98
1 files changed, 49 insertions, 49 deletions
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 28986aca1194..6e637f1b35a5 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -71,9 +71,9 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nMagic;
- UINT16 m_nNext;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nMagic;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
@@ -91,13 +91,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nLru;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nLru;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
- void initialize (UINT16 nLru, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nLru, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nLru = nLru;
@@ -106,20 +106,20 @@ class INetURLHistory_Impl
/** Comparison.
*/
- BOOL operator== (const hash_entry &rOther) const
+ sal_Bool operator== (const hash_entry &rOther) const
{
return (m_nHash == rOther.m_nHash);
}
- BOOL operator< (const hash_entry &rOther) const
+ sal_Bool operator< (const hash_entry &rOther) const
{
return (m_nHash < rOther.m_nHash);
}
- BOOL operator== (UINT32 nHash) const
+ sal_Bool operator== (sal_uInt32 nHash) const
{
return (m_nHash == nHash);
}
- BOOL operator< (UINT32 nHash) const
+ sal_Bool operator< (sal_uInt32 nHash) const
{
return (m_nHash < nHash);
}
@@ -131,13 +131,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nNext;
- UINT16 m_nPrev;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nPrev;
/** Initialization.
*/
- void initialize (UINT16 nThis, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nThis, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nNext = nThis;
@@ -155,34 +155,34 @@ class INetURLHistory_Impl
*/
void initialize (void);
- void downheap (hash_entry a[], UINT16 n, UINT16 k);
- void heapsort (hash_entry a[], UINT16 n);
+ void downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k);
+ void heapsort (hash_entry a[], sal_uInt16 n);
/** capacity.
*/
- UINT16 capacity (void) const
+ sal_uInt16 capacity (void) const
{
- return (UINT16)(INETHIST_SIZE_LIMIT);
+ return (sal_uInt16)(INETHIST_SIZE_LIMIT);
}
/** crc32.
*/
- UINT32 crc32 (UniString const & rData) const
+ sal_uInt32 crc32 (UniString const & rData) const
{
return rtl_crc32 (0, rData.GetBuffer(), rData.Len() * sizeof(sal_Unicode));
}
/** find.
*/
- UINT16 find (UINT32 nHash) const;
+ sal_uInt16 find (sal_uInt32 nHash) const;
/** move.
*/
- void move (UINT16 nSI, UINT16 nDI);
+ void move (sal_uInt16 nSI, sal_uInt16 nDI);
/** backlink.
*/
- void backlink (UINT16 nThis, UINT16 nTail)
+ void backlink (sal_uInt16 nThis, sal_uInt16 nTail)
{
register lru_entry &rThis = m_pList[nThis];
register lru_entry &rTail = m_pList[nTail];
@@ -195,7 +195,7 @@ class INetURLHistory_Impl
/** unlink.
*/
- void unlink (UINT16 nThis)
+ void unlink (sal_uInt16 nThis)
{
register lru_entry &rThis = m_pList[nThis];
@@ -217,7 +217,7 @@ public:
/** putUrl/queryUrl.
*/
void putUrl (const String &rUrl);
- BOOL queryUrl (const String &rUrl);
+ sal_Bool queryUrl (const String &rUrl);
};
/*========================================================================
@@ -247,7 +247,7 @@ void INetURLHistory_Impl::initialize (void)
{
m_aHead.initialize();
- USHORT i, n = capacity();
+ sal_uInt16 i, n = capacity();
for (i = 0; i < n; i++)
m_pHash[i].initialize(i);
for (i = 0; i < n; i++)
@@ -259,12 +259,12 @@ void INetURLHistory_Impl::initialize (void)
/*
* downheap.
*/
-void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
+void INetURLHistory_Impl::downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k)
{
hash_entry h = a[k];
while (k < n / 2)
{
- UINT16 i = k + k + 1;
+ sal_uInt16 i = k + k + 1;
if (((i + 1) < n) && (a[i] < a[i + 1])) i++;
if (!(h < a[i])) break;
a[k] = a[i];
@@ -276,11 +276,11 @@ void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
/*
* heapsort.
*/
-void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
+void INetURLHistory_Impl::heapsort (hash_entry a[], sal_uInt16 n)
{
hash_entry h;
- for (UINT16 k = (n - 1) / 2 + 1; k > 0; k--)
+ for (sal_uInt16 k = (n - 1) / 2 + 1; k > 0; k--)
downheap (a, n, k - 1);
while (n > 0)
@@ -295,15 +295,15 @@ void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
/*
* find.
*/
-UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
+sal_uInt16 INetURLHistory_Impl::find (sal_uInt32 nHash) const
{
- UINT16 l = 0;
- UINT16 r = capacity() - 1;
- UINT16 c = capacity();
+ sal_uInt16 l = 0;
+ sal_uInt16 r = capacity() - 1;
+ sal_uInt16 c = capacity();
while ((l < r) && (r < c))
{
- UINT16 m = (l + r) / 2;
+ sal_uInt16 m = (l + r) / 2;
if (m_pHash[m] == nHash)
return m;
@@ -318,7 +318,7 @@ UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
/*
* move.
*/
-void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
+void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
{
hash_entry e = m_pHash[nSI];
if (nSI < nDI)
@@ -345,12 +345,12 @@ void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
*/
void INetURLHistory_Impl::putUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- UINT16 nMRU = m_pHash[k].m_nLru;
+ sal_uInt16 nMRU = m_pHash[k].m_nLru;
if (nMRU != m_aHead.m_nNext)
{
// Update LRU chain.
@@ -364,9 +364,9 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
else
{
// Cache miss. Obtain least recently used.
- UINT16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
+ sal_uInt16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
- UINT16 nSI = find (m_pList[nLRU].m_nHash);
+ sal_uInt16 nSI = find (m_pList[nLRU].m_nHash);
if (!(nLRU == m_pHash[nSI].m_nLru))
{
// Update LRU chain.
@@ -379,7 +379,7 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
m_aHead.m_nNext = m_pList[m_aHead.m_nNext].m_nPrev;
// Check source and destination.
- UINT16 nDI = std::min (k, UINT16(capacity() - 1));
+ sal_uInt16 nDI = std::min (k, sal_uInt16(capacity() - 1));
if (nSI < nDI)
{
if (!(m_pHash[nDI] < h))
@@ -400,19 +400,19 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
/*
* queryUrl.
*/
-BOOL INetURLHistory_Impl::queryUrl (const String &rUrl)
+sal_Bool INetURLHistory_Impl::queryUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- return TRUE;
+ return sal_True;
}
else
{
// Cache miss.
- return FALSE;
+ return sal_False;
}
}
@@ -526,7 +526,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
/*
* QueryUrl_Impl.
*/
-BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
+sal_Bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
{
DBG_ASSERT (m_pImpl, "QueryUrl_Impl(): no Implementation");
if (m_pImpl)
@@ -536,7 +536,7 @@ BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
}
- return FALSE;
+ return sal_False;
}