diff options
author | Christian Lippka <cl@openoffice.org> | 2001-06-19 13:53:22 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-06-19 13:53:22 +0000 |
commit | 957c694caef0a18b85e1ea73532ae062b6887802 (patch) | |
tree | c2e68c141c7cdc28ce0b95da5897d542241d518a /svx | |
parent | 4955786cd2af7aef46bb44ed733959da1711ef5d (diff) |
#87219# fixed glue point api to use ids not index
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 16 | ||||
-rw-r--r-- | svx/source/unodraw/gluepts.cxx | 8 |
2 files changed, 6 insertions, 18 deletions
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index cad9e3c66ba0..292b660499b5 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdoedge.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: cl $ $Date: 2001-05-31 12:55:14 $ + * last change: $Author: cl $ $Date: 2001-06-19 14:48:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2618,19 +2618,7 @@ sal_Int32 SdrEdgeObj::getGluePointIndex( sal_Bool bTail ) { nId = rConn1.GetConnectorId(); if( !rConn1.IsAutoVertex() ) - { - // for user defined glue points we have - // to get the index for this id first - const SdrGluePointList* pList = rConn1.GetObject() ? rConn1.GetObject()->GetGluePointList() : NULL; - if( NULL == pList ) - return -1; - - nId = pList->FindGluePoint((sal_uInt16)nId); - if( SDRGLUEPOINT_NOTFOUND == nId ) - return -1; - nId += 4; - } } return nId; } diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx index c94fcdd19b51..351d4258a290 100644 --- a/svx/source/unodraw/gluepts.cxx +++ b/svx/source/unodraw/gluepts.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gluepts.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: cl $ $Date: 2001-06-11 08:28:08 $ + * last change: $Author: cl $ $Date: 2001-06-19 14:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -302,7 +302,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr USHORT nId = pList->Insert( aSdrGlue ); mpObject->SendRepaintBroadcast(); - return (sal_Int32)(nId + NON_USER_DEFINED_GLUE_POINTS); + return (sal_Int32)((*pList)[nId].GetId() + NON_USER_DEFINED_GLUE_POINTS); } throw lang::IllegalArgumentException(); @@ -416,7 +416,7 @@ uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() thro *pIdentifier++ = (sal_Int32)i; for( i = 0; i < nCount; i++ ) - *pIdentifier++ = (sal_Int32) (*pList)[i].GetId(); + *pIdentifier++ = (sal_Int32) (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS; return aIdSequence; } |