svx/source/svdraw/textchain.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
New commits: commit 3a0aa8f6dd052e55860cd992dbb7bed24d346445 Author: matteocam <matteo.campane...@gmail.com> Date: Thu Jul 23 20:23:44 2015 +0200 Write implementation of prev link accessor Change-Id: I5b66071e00a4edbeb67447938c98d9fcd92158b6 diff --git a/svx/source/svdraw/textchain.cxx b/svx/source/svdraw/textchain.cxx index ddddb70..86357c2 100644 --- a/svx/source/svdraw/textchain.cxx +++ b/svx/source/svdraw/textchain.cxx @@ -89,7 +89,21 @@ SdrTextObj *TextChain::impGetNextLink(const SdrTextObj *pTextObj) const SdrTextObj *TextChain::impGetPrevLink(const SdrTextObj *pTextObj) const { - return NULL; + SdrTextObj *pNextTextObj = NULL; + SdrPage *pPage = pTextObj->pPage; + + if ( pPage && pPage->GetObjCount() > 1) { + + sal_uInt32 nextIndex = (pTextObj->GetOrdNum()-1); + + if (nextIndex > 0) + pNextTextObj = dynamic_cast< SdrTextObj * >( pPage->GetObj( nextIndex ) ); + + return pNextTextObj; + } else { + fprintf(stderr, "Make New Object please\n"); + return NULL; + } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits