summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2000-11-30 10:44:28 +0000
committerMichael Brauer <mib@openoffice.org>2000-11-30 10:44:28 +0000
commita2f64ca085ce2527a9aaa637ccdcc0a78c5b0ccf (patch)
treec54b8a3b54c91750e55ee647c3c8980b2b00d4f7
parentd5781817f29b39c242331585c6d7db801cd85d22 (diff)
#80926#: paragraph enumeration crashed if it ended with a table
-rw-r--r--sw/source/core/unocore/unoobj.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 67397f096fc9..5879c298afdd 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoobj.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: dvo $ $Date: 2000-11-30 11:30:49 $
+ * last change: $Author: mib $ $Date: 2000-11-30 11:44:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3463,15 +3463,14 @@ sal_Bool SwXParagraphEnumeration::hasMoreElements(void) throw( uno::RuntimeExcep
pNewCrsr->SetRemainInSection( sal_False );
//was mache ich, wenn ich schon in einer Tabelle stehe?
- SwStartNode* pSttNode = pUnoCrsr->GetNode()->FindStartNode();
- SwStartNodeType eType = pSttNode->GetStartNodeType();
- if(CURSOR_TBLTEXT != eCursorType &&
- SwTableBoxStartNode == eType)
+ SwTableNode* pTblNode = pNewCrsr->GetNode()->FindTableNode();
+ if(CURSOR_TBLTEXT != eCursorType && pTblNode)
{
- // wir haben es mit einer Tabelle zu tun
- FASTBOOL bMoved = pNewCrsr->MoveTable( fnTableCurr, fnTableEnd );
+ pNewCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex();
+ bRet = pNewCrsr->Move(fnMoveForward, fnGoNode);
}
- bRet = pNewCrsr->MovePara(fnParaNext, fnParaStart);
+ else
+ bRet = pNewCrsr->MovePara(fnParaNext, fnParaStart);
delete pNewCrsr;
}
}
@@ -3501,7 +3500,6 @@ uno::Any SwXParagraphEnumeration::nextElement(void)
if(pTblNode)
{
// wir haben es mit einer Tabelle zu tun - also ans Ende
- FASTBOOL bMoved = pUnoCrsr->MoveTable( fnTableCurr, fnTableEnd );
pUnoCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex();
if(!pUnoCrsr->Move(fnMoveForward, fnGoNode))
{