diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-25 15:37:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-25 15:54:21 +0200 |
commit | 0da4e600e6df511edc20aa21353911f907e161d8 (patch) | |
tree | e38c679ce7b62b898cfc5ebd3cdc79d04b818d61 /sw/inc/textboxhelper.hxx | |
parent | af60018734751c589d7b76b6a755ac7c2dee3a40 (diff) |
Let SwTextBoxHelper::findTextBoxes() return a set
The intention was to have a container where it's fast to look elements
up, and list is a linked list, so it doesn't fit.
Change-Id: I3196c8dee96ecd4a6f464b74fd5141b27f1773b8
Diffstat (limited to 'sw/inc/textboxhelper.hxx')
-rw-r--r-- | sw/inc/textboxhelper.hxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 8b4856415245..f2aab3bb2b41 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -10,7 +10,6 @@ #ifndef INCLUDED_SW_INC_TEXTBOXHELPER_HXX #define INCLUDED_SW_INC_TEXTBOXHELPER_HXX -#include <list> #include <map> #include <set> #include <vector> @@ -68,13 +67,13 @@ public: static Rectangle getTextRectangle(SwFrmFmt* pShape, bool bAbsolute = true); /// Look up TextFrames in a document, which are in fact TextBoxes. - static std::list<SwFrmFmt*> findTextBoxes(const SwDoc* pDoc); + static std::set<SwFrmFmt*> findTextBoxes(const SwDoc* pDoc); /// Build a textbox -> shape format map. static std::map<SwFrmFmt*, SwFrmFmt*> findShapes(const SwDoc* pDoc); /// Count number of shapes in the document, excluding TextBoxes. - static sal_Int32 getCount(SdrPage* pPage, std::list<SwFrmFmt*>& rTextBoxes); + static sal_Int32 getCount(SdrPage* pPage, std::set<SwFrmFmt*>& rTextBoxes); /// Get a shape by index, excluding TextBoxes. - static css::uno::Any getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::list<SwFrmFmt*>& rTextBoxes) throw(css::lang::IndexOutOfBoundsException); + static css::uno::Any getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set<SwFrmFmt*>& rTextBoxes) throw(css::lang::IndexOutOfBoundsException); /// Saves the current shape -> textbox links in a map, so they can be restored later. static void saveLinks(const SwFrmFmts& rFormats, std::map<const SwFrmFmt*, const SwFrmFmt*>& rLinks); |