[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Thu Jul 23 11:24:46 PDT 2015
svx/source/svdraw/textchain.cxx | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
New commits:
commit 3a0aa8f6dd052e55860cd992dbb7bed24d346445
Author: matteocam <matteo.campanelli at 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;
+ }
}
More information about the Libreoffice-commits
mailing list