summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-10-19 16:56:38 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-10-19 13:15:54 +0000
commitd24694fb1b273aeeba8717638d23d190953fb82f (patch)
tree0de041389a59d1e4ebd2717c5230b519cfc64593 /sw
parentef044f82452af7b4c844d5ed1ca05869aafe21c5 (diff)
sw: Avoid inheritance from std::list
Change-Id: Ifb45d20a1556db8d8ba01b65078b45df73bc8dcc Reviewed-on: https://gerrit.libreoffice.org/30037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accmap.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index f1b63caf76f9..0aed777c82d2 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -498,8 +498,9 @@ public:
}
};
-class SwAccessibleEventList_Impl: public std::list < SwAccessibleEvent_Impl >
+class SwAccessibleEventList_Impl
{
+ std::list<SwAccessibleEvent_Impl> maEvents;
bool mbFiring;
public:
@@ -517,6 +518,19 @@ public:
}
void MoveMissingXAccToEnd();
+
+ size_t size() const { return maEvents.size(); }
+ std::list<SwAccessibleEvent_Impl>::iterator begin() { return maEvents.begin(); }
+ std::list<SwAccessibleEvent_Impl>::iterator end() { return maEvents.end(); }
+ std::list<SwAccessibleEvent_Impl>::iterator insert( std::list<SwAccessibleEvent_Impl>::iterator aIter,
+ const SwAccessibleEvent_Impl& rEvent )
+ {
+ return maEvents.insert( aIter, rEvent );
+ }
+ std::list<SwAccessibleEvent_Impl>::iterator erase( std::list<SwAccessibleEvent_Impl>::iterator aPos )
+ {
+ return maEvents.erase( aPos );
+ }
};
// see comment in SwAccessibleMap::InvalidatePosOrSize()
@@ -529,7 +543,7 @@ void SwAccessibleEventList_Impl::MoveMissingXAccToEnd()
return;
}
SwAccessibleEventList_Impl lstEvent;
- for (iterator li = begin(); li != end(); )
+ for (auto li = begin(); li != end(); )
{
if (li->IsNoXaccParentFrame())
{
@@ -540,7 +554,7 @@ void SwAccessibleEventList_Impl::MoveMissingXAccToEnd()
++li;
}
OSL_ENSURE(size() + lstEvent.size() == nSize ,"");
- insert(end(),lstEvent.begin(),lstEvent.end());
+ maEvents.insert(end(),lstEvent.begin(),lstEvent.end());
OSL_ENSURE(size() == nSize ,"");
}
@@ -567,7 +581,7 @@ class SwAccessibleEventMap_Impl
{
public:
typedef SwAccessibleChild key_type;
- typedef SwAccessibleEventList_Impl::iterator mapped_type;
+ typedef std::list<SwAccessibleEvent_Impl>::iterator mapped_type;
typedef std::pair<const key_type,mapped_type> value_type;
typedef SwAccessibleChildFunc key_compare;
typedef std::map<key_type,mapped_type,key_compare>::iterator iterator;