From 7f33ed417b2e29e5470724ea76967f64699a2662 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 Jan 2011 15:06:54 +0100 Subject: removetooltypes01: #i112600# Remove tools types from sw --- sw/qa/core/Test-BigPtrArray.cxx | 22 +++++++++++----------- sw/qa/core/bigpointerarray-new.cxx | 14 +++++++------- sw/qa/core/bigpointerarray-new.hxx | 20 ++++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) (limited to 'sw/qa') diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx index 4b5394a77d3c..4e828bb980b9 100644 --- a/sw/qa/core/Test-BigPtrArray.cxx +++ b/sw/qa/core/Test-BigPtrArray.cxx @@ -68,7 +68,7 @@ namespace /* private */ count_ = newCount; } - ULONG Position() const + sal_uLong Position() const { return GetPos(); } @@ -77,7 +77,7 @@ namespace /* private */ int count_; }; - BOOL AddToCount(const ElementPtr& rElem, void* pArgs) + sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs) { BigPtrEntryMock* const pbem = static_cast(rElem); pbem->setCount(pbem->getCount() + *((int*)pArgs)); @@ -94,7 +94,7 @@ namespace /* private */ #endif } - void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries) + void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries) { for (int i = 0; i < numEntries; i++) bparr.Insert(new BigPtrEntryMock(i), bparr.Count()); @@ -162,7 +162,7 @@ public: for (int i = 0; i < NUM_ENTRIES; i++) { - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); bparr.Insert(new BigPtrEntryMock(i), 0); CPPUNIT_ASSERT_MESSAGE ( @@ -203,7 +203,7 @@ public: fillBigPtrArray(bparr, NUM_ENTRIES); dumpBigPtrArray(bparr); - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2); @@ -277,7 +277,7 @@ public: fillBigPtrArray(bparr, NUM_ENTRIES); dumpBigPtrArray(bparr); - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count()); CPPUNIT_ASSERT_MESSAGE @@ -309,7 +309,7 @@ public: for (int i = 0; i < NUM_ENTRIES; i++) { - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); delete bparr[0]; // release content bparr.Remove(0); // remove item from container @@ -352,7 +352,7 @@ public: for (int i = NUM_ENTRIES - 1; i >= 0; i--) { - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); delete bparr[i]; bparr.Remove(i); @@ -394,7 +394,7 @@ public: while (bparr.Count()) { - ULONG oldCount = bparr.Count(); + sal_uLong oldCount = bparr.Count(); int oldElement = static_cast(bparr[bparr.Count() / 2])->getCount(); delete bparr[bparr.Count() / 2]; @@ -437,8 +437,8 @@ public: while(bparr.Count()) { - ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count(); - ULONG oldCount = bparr.Count(); + sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count(); + sal_uLong oldCount = bparr.Count(); for (int i = 0; i < nRemove; i++) delete bparr[i]; diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx index 28501f4c3f4a..a769a8e3fae0 100644 --- a/sw/qa/core/bigpointerarray-new.cxx +++ b/sw/qa/core/bigpointerarray-new.cxx @@ -36,19 +36,19 @@ BigPtrArray::BigPtrArray() //container_.reserve(1000); } -ULONG BigPtrArray::Count() const +sal_uLong BigPtrArray::Count() const { return container_.size(); } -void BigPtrArray::Move(ULONG fromPos, ULONG toPos) +void BigPtrArray::Move(sal_uLong fromPos, sal_uLong toPos) { DBG_ASSERT(fromPos < container_.size() && toPos < container_.size(), "BigPtrArray.Move precondition violation"); Insert(container_[fromPos], toPos); Remove(toPos < fromPos ? fromPos + 1 : fromPos, 1); } -void BigPtrArray::ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs) +void BigPtrArray::ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs) { DBG_ASSERT(fromPos < toPos && fromPos < container_.size() && toPos < container_.size(), "BigPtrArray::ForEach precondition violation"); Container_t::const_iterator iter = container_.begin() + fromPos; @@ -65,13 +65,13 @@ void BigPtrArray::ForEach(FnForEach fn, void* pArgs) fn(*iter, pArgs); } -ElementPtr BigPtrArray::operator[](ULONG pos) const +ElementPtr BigPtrArray::operator[](sal_uLong pos) const { DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation"); return container_[pos]; } -void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos) +void BigPtrArray::Insert(const ElementPtr& rElem, sal_uLong pos) { DBG_ASSERT(pos <= container_.size(), "BigPtrArray::Insert precondition violation"); @@ -87,14 +87,14 @@ void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos) } } -void BigPtrArray::Remove( ULONG pos, ULONG n ) +void BigPtrArray::Remove( sal_uLong pos, sal_uLong n ) { DBG_ASSERT((pos < container_.size()) && ((container_.begin() + pos + n) < container_.end()), "BigPtrArray.Remove precondition violation") container_.erase(container_.begin() + pos, container_.begin() + pos + n); FixElementIndizes(container_.begin(), container_.end()); } -void BigPtrArray::Replace(ULONG pos, const ElementPtr& rElem) +void BigPtrArray::Replace(sal_uLong pos, const ElementPtr& rElem) { DBG_ASSERT(pos < container_.size(), "BigPtrArray::Replace precondition violation"); rElem->pBigPtrArray_ = this; diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx index 9e639ad96f16..af6805880fe8 100644 --- a/sw/qa/core/bigpointerarray-new.hxx +++ b/sw/qa/core/bigpointerarray-new.hxx @@ -41,7 +41,7 @@ class BigPtrEntry { friend class BigPtrArray; BigPtrArray* pBigPtrArray_; - ULONG pos_; + sal_uLong pos_; protected: BigPtrEntry() : pBigPtrArray_(0), pos_(0) @@ -50,7 +50,7 @@ protected: virtual ~BigPtrEntry() {} - ULONG GetPos() const + sal_uLong GetPos() const { return pos_; } @@ -62,7 +62,7 @@ protected: }; typedef BigPtrEntry* ElementPtr; -typedef BOOL (*FnForEach)(const ElementPtr&, void* pArgs); +typedef sal_Bool (*FnForEach)(const ElementPtr&, void* pArgs); /** A container abstraction */ @@ -79,7 +79,7 @@ public: /** Return the number of entries inserted into the array */ - ULONG Count() const; + sal_uLong Count() const; /** Insert an Element into the array at a certain position @@ -93,7 +93,7 @@ public: @pre (pos >= 0 && pos <= BigPtrArray.Count()) @post (((oldCount + 1) == BigPtrArray.Count()) && BigPtrArray[pos] == rElem) */ - void Insert(const ElementPtr& rElem, ULONG pos); + void Insert(const ElementPtr& rElem, sal_uLong pos); /** Remove a specified number of elements starting at a certain position. @@ -106,7 +106,7 @@ public: @pre (pos < BigPtrArray.Count() && n <= BigPtrArray.Count()) @post ((oldCount - n) == BigPtrArray.Count()) */ - void Remove(ULONG pos, ULONG n = 1); + void Remove(sal_uLong pos, sal_uLong n = 1); /** Move an entry from a certain position to another on. @@ -116,7 +116,7 @@ public: @param to [in] */ - void Move(ULONG fromPos, ULONG toPos); + void Move(sal_uLong fromPos, sal_uLong toPos); /** Replace an entry at a certain position @@ -129,7 +129,7 @@ public: @pre pos < BigPtrArray.Count() @post (oldCount == BigPtrArray.Count() && BigPtrArray[pos] == rElem) */ - void Replace(ULONG pos, const ElementPtr& rElem); + void Replace(sal_uLong pos, const ElementPtr& rElem); /** Get the entry at a certain index @@ -138,7 +138,7 @@ public: @pre pos < BigPtrArray.Count() */ - ElementPtr operator[](ULONG pos) const; + ElementPtr operator[](sal_uLong pos) const; /** */ @@ -146,7 +146,7 @@ public: /** */ - void ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs = NULL); + void ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs = NULL); private: -- cgit v1.2.3