summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-10-08 08:45:29 +0200
committerobo <obo@openoffice.org>2010-10-08 08:45:29 +0200
commit0975085ee0237894b1011001fe513090e974babc (patch)
treeb28574ddc97ad1984c1e6bb67cd7713a29576c34
parent6dd15e6df47bf325b181d7d5f4b3f6d6173078ff (diff)
parent3bf1d26b7070cacb6fd50d360d8c1a9c8b489612 (diff)
-rw-r--r--binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx b/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
index 52faa9102..f89938a33 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
@@ -273,7 +273,13 @@ static bool lcl_IsItemSet(const SwCntntNode & rNode, USHORT which)
SwEndNode* pEndNd = new SwEndNode( aEndIdx, *pSttNd );
pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
- pLine->GetTabBoxes().C40_INSERT( SwTableBox, pPrvBox, nInsPos + n );
+
+ SwTableBoxes & rTabBoxes = pLine->GetTabBoxes();
+ USHORT nRealInsPos = nInsPos + n;
+ if (nRealInsPos > rTabBoxes.Count())
+ nRealInsPos = rTabBoxes.Count();
+
+ rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos );
if( NO_NUMBERING == pTxtColl->GetOutlineLevel()
//FEATURE::CONDCOLL