summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/bparr.hxx3
-rw-r--r--sw/source/core/docnode/nodes.cxx18
2 files changed, 5 insertions, 16 deletions
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 3c5ea878067e..741534d2e7b1 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -34,9 +34,8 @@ class BigPtrEntry
BlockInfo* pBlock;
sal_uInt16 nOffset;
public:
- virtual ~BigPtrEntry() {}
-protected:
BigPtrEntry() : pBlock(0), nOffset(0) {}
+ virtual ~BigPtrEntry() {}
inline sal_uLong GetPos() const;
inline BigPtrArray& GetArray() const;
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 06375d943b11..8efb97775c71 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2213,16 +2213,6 @@ void SwNodes::ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
ForEach( rStart.GetIndex(), rEnd.GetIndex(), fnForEach, pArgs );
}
-namespace {
-
-//TODO: seems to be not/wrongly used
-struct TempBigPtrEntry : public BigPtrEntry
-{
- TempBigPtrEntry() {}
-};
-
-}
-
void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
{
sal_uLong nEnd = nDelPos + nSz;
@@ -2275,11 +2265,11 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
}
}
- std::vector<TempBigPtrEntry> aTempEntries;
+ std::vector<BigPtrEntry> aTempEntries;
if( bDel )
{
sal_uLong nCnt = nSz;
- SwNode *pDel = (*this)[ nDelPos+nCnt-1 ], *pPrev = (*this)[ nDelPos+nCnt-2 ];
+ BigPtrEntry *pDel = (*this)[ nDelPos+nCnt-1 ], *pPrev = (*this)[ nDelPos+nCnt-2 ];
// set temporary object
// JP 24.08.98: this should actually be removed because one could
@@ -2292,13 +2282,13 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
{
delete pDel;
pDel = pPrev;
- sal_uLong nPrevNdIdx = pPrev->GetIndex();
+ sal_uLong nPrevNdIdx = pPrev->GetPos();
BigPtrEntry* pTempEntry = &aTempEntries[nCnt];
BigPtrArray::Replace( nPrevNdIdx+1, pTempEntry );
if( nCnt )
pPrev = (*this)[ nPrevNdIdx - 1 ];
}
- nDelPos = pDel->GetIndex() + 1;
+ nDelPos = pDel->GetPos() + 1;
}
BigPtrArray::Remove( nDelPos, nSz );