diff options
author | Matthias Hofmann <borim7@web.de> | 2013-06-02 14:14:37 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-06-03 10:36:25 +0000 |
commit | e89ab73fa01e825bd55908c9ba3697cb00cead16 (patch) | |
tree | 730264f3039ac634553f8939444d15ed72b4af6e /sd/inc | |
parent | 8ea041fee44aecc6efda14c1d17f4637d3b42f11 (diff) |
remove ShapeList::getNextShape(SdrObject* pObj)
The getNextShape(pObj) method is just used for iterating over the complete
ShapeList. But the complexity for this operation is exponential.
When using getNextShape() iterating over the list have linear complexity.
In short: it is much faster.
Change-Id: I3896af2247f348153d62f2bcdd207c5a75239689
Reviewed-on: https://gerrit.libreoffice.org/4132
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'sd/inc')
-rw-r--r-- | sd/inc/shapelist.hxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx index f3c779e2b184..f828ebc61d31 100644 --- a/sd/inc/shapelist.hxx +++ b/sd/inc/shapelist.hxx @@ -48,16 +48,12 @@ namespace sd /** @return true if given shape is part of this list */ bool hasShape( SdrObject& rObject ) const; - /** returns the shape following the given shape in the list or 0 - returns the first shape if pObj is 0 */ - SdrObject* getNextShape(SdrObject* pObj) const; - - /** - */ + /** returns the shape the internal iterator points to, or 0 if + * the list end is reached. moves the internal iterator to the + * next shape. */ SdrObject* getNextShape(); - /** - */ + /** Sets the internal iterator to the shape at given index. */ void seekShape( sal_uInt32 nIndex ); /** |