summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2000-10-25 13:38:41 +0000
committerOliver Specht <os@openoffice.org>2000-10-25 13:38:41 +0000
commitd280a556ebd4eb174781e06aeb62f9a783ae502a (patch)
treed9d85c2f3bba7fe73ba591c6cc03ff54e066405b
parent4e3e0dbbe113818fc483215c21dca49da6009745 (diff)
SwXHeadFootText::createEnumeration: don't skip tables
-rw-r--r--sw/source/core/unocore/unotext.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index a57f611e20f3..fea315246638 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unotext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2000-09-27 13:58:24 $
+ * last change: $Author: os $ $Date: 2000-10-25 14:38:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1484,18 +1484,25 @@ uno::Reference< XTextCursor > SwXHeadFootText::createTextCursorByRange(
/* -----------------19.03.99 15:44-------------------
*
* --------------------------------------------------*/
-uno::Reference< container::XEnumeration > SwXHeadFootText::createEnumeration(void) throw( uno::RuntimeException )
+uno::Reference< container::XEnumeration > SwXHeadFootText::createEnumeration(void)
+ throw( RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference< container::XEnumeration > aRef;
//wenn this ungueltig ist, dann kommt die uno::Exception aus createTextCursor()
- uno::Reference< XTextCursor > xCrsr = createTextCursor();
- uno::Reference< lang::XUnoTunnel > xTunnel(xCrsr, uno::UNO_QUERY);
- SwXTextCursor* pxCrsr = (SwXTextCursor*)xTunnel->getSomething(
- SwXTextCursor::getUnoTunnelId());
- SwUnoCrsr* pUnoCrsr = pxCrsr->GetCrsr();
- SwUnoCrsr* pNewUnoCrsr = GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint(), sal_False);
- aRef = new SwXParagraphEnumeration(this, pNewUnoCrsr, bIsHeader ? CURSOR_HEADER : CURSOR_FOOTER);
+ SwFrmFmt* pHeadFootFmt = GetFmt();
+ if(pHeadFootFmt)
+ {
+ const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt();
+ const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode();
+ SwPosition aPos(rNode);
+ SwUnoCrsr* pUnoCrsr = GetDoc()->CreateUnoCrsr(aPos, sal_False);
+ pUnoCrsr->Move(fnMoveForward, fnGoNode);
+ aRef = new SwXParagraphEnumeration(this, pUnoCrsr, bIsHeader ? CURSOR_HEADER : CURSOR_FOOTER);
+ }
+ else
+ throw RuntimeException();
+
return aRef;
}
/* -----------------19.03.99 15:50-------------------