[Libreoffice-commits] core.git: cui/source
Takeshi Abe
tabe at fixedpoint.jp
Mon Aug 4 04:06:50 PDT 2014
cui/source/dialogs/linkdlg.cxx | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
New commits:
commit c9be1193b0cf850aded26bd56a2ea63d02d808b1
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon Aug 4 08:42:38 2014 +0900
fdo#75757: remove inheritance to std::vector
Change-Id: Ia2f03e08199f23fd1b226db2c7e0bfade07bf0f0
Reviewed-on: https://gerrit.libreoffice.org/10719
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 27abd85..45c5801 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
More information about the Libreoffice-commits
mailing list