summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-08-04 08:42:38 +0900
committerDavid Tardon <dtardon@redhat.com>2014-08-04 11:06:25 +0000
commitc9be1193b0cf850aded26bd56a2ea63d02d808b1 (patch)
treead3a8bafe11c95ed082868cfcb46bad8e779bf0c
parent8c0bd0deee50a5f54926afe87d849411757c2f18 (diff)
fdo#75757: remove inheritance to std::vector
Change-Id: Ia2f03e08199f23fd1b226db2c7e0bfade07bf0f0 Reviewed-on: https://gerrit.libreoffice.org/10719 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--cui/source/dialogs/linkdlg.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 27abd8541cf3..45c5801fe6a6 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -52,11 +52,14 @@
using namespace sfx2;
using namespace ::com::sun::star;
-class SvBaseLinkMemberList : private std::vector<SvBaseLink*> {
+class SvBaseLinkMemberList {
+private:
+ std::vector<SvBaseLink*> mLinks;
+
public:
~SvBaseLinkMemberList()
{
- for( const_iterator it = begin(); it != end(); ++it )
+ for( std::vector<SvBaseLink*>::const_iterator it = mLinks.begin(); it != mLinks.end(); ++it )
{
SvBaseLink* p = *it;
if( p )
@@ -64,10 +67,15 @@ public:
}
}
- using std::vector<SvBaseLink*>::size;
- using std::vector<SvBaseLink*>::operator[];
+ size_t size() const { return mLinks.size(); }
+
+ SvBaseLink *operator[](size_t i) const { return mLinks[i]; }
- void push_back(SvBaseLink* p) { std::vector<SvBaseLink*>::push_back(p); p->AddRef(); }
+ void push_back(SvBaseLink* p)
+ {
+ mLinks.push_back(p);
+ p->AddRef();
+ }
};
// attention, this array is indexed directly (0, 1, ...) in the code