[Libreoffice-commits] core.git: sw/source

Takeshi Abe tabe at fixedpoint.jp
Wed Aug 27 03:30:08 PDT 2014


 sw/source/core/doc/docsort.cxx |    4 ++--
 sw/source/core/inc/docsort.hxx |    7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 75028bd82ad51c5cd09942a457ce2960ece6fef5
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Aug 27 15:10:13 2014 +0900

    fdo#75757: remove inheritance to std::vector
    
    Change-Id: I1874b5b4a059ef5fc8818b3b49ff10f2917b20ca
    Reviewed-on: https://gerrit.libreoffice.org/11135
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 219ae41..7c76282 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 f648389..27c79a1 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;
 };
 


More information about the Libreoffice-commits mailing list