diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-08-27 15:10:13 +0900 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-27 05:29:42 -0500 |
commit | 75028bd82ad51c5cd09942a457ce2960ece6fef5 (patch) | |
tree | 3e1b911598c39fd4b4cb66f58ca7e85a1176e71b | |
parent | c6542e4f7a759b163ced45155ab6ab898be2f111 (diff) |
fdo#75757: remove inheritance to std::vector
Change-Id: I1874b5b4a059ef5fc8818b3b49ff10f2917b20ca
Reviewed-on: https://gerrit.libreoffice.org/11135
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sw/source/core/doc/docsort.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/docsort.hxx | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 219ae41263d4..7c76282869ec 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -948,8 +948,8 @@ const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) con sal_uInt16 SwMovedBoxes::GetPos(const SwTableBox* pTableBox) const { - const_iterator it = std::find(begin(), end(), pTableBox); - return it == end() ? USHRT_MAX : it - begin(); + std::vector<const SwTableBox*>::const_iterator it = std::find(mBoxes.begin(), mBoxes.end(), pTableBox); + return it == mBoxes.end() ? USHRT_MAX : it - mBoxes.begin(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx index f648389115f8..27c79a15aa7e 100644 --- a/sw/source/core/inc/docsort.hxx +++ b/sw/source/core/inc/docsort.hxx @@ -44,9 +44,14 @@ namespace com { } } -class SwMovedBoxes : public std::vector<const SwTableBox*> +class SwMovedBoxes { +private: + std::vector<const SwTableBox*> mBoxes; + public: + void push_back(const SwTableBox* &rpTableBox) {mBoxes.push_back(rpTableBox);} + sal_uInt16 GetPos(const SwTableBox* pTableBox) const; }; |