summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idl/inc/basobj.hxx50
-rw-r--r--include/tools/ref.hxx52
-rw-r--r--sc/inc/grouparealistener.hxx1
-rw-r--r--sc/inc/listenerquery.hxx1
-rw-r--r--sc/inc/markdata.hxx1
-rw-r--r--xmloff/inc/txtfldi.hxx1
6 files changed, 54 insertions, 52 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index bb788d5c6853..b4b9178c557c 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -24,6 +24,8 @@
#include <bastype.hxx>
#include <tools/pstm.hxx>
#include <functional>
+#include <vector>
+
class SvTokenStream;
class SvMetaObject;
class SvIdlDataBase;
@@ -32,6 +34,54 @@ typedef SvMetaObject * (*CreateMetaObjectType)();
#define C_PREF "C_"
+template<typename T>
+class SvRefMemberList : private std::vector<T>
+{
+private:
+ typedef typename std::vector<T> base_t;
+
+public:
+ using base_t::size;
+ using base_t::front;
+ using base_t::back;
+ using base_t::operator[];
+ using base_t::begin;
+ using base_t::end;
+ using typename base_t::iterator;
+ using typename base_t::const_iterator;
+ using base_t::rbegin;
+ using base_t::rend;
+ using typename base_t::reverse_iterator;
+ using base_t::empty;
+
+ inline ~SvRefMemberList() { clear(); }
+ inline void clear()
+ {
+ for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it )
+ {
+ T p = *it;
+ if( p )
+ p->ReleaseRef();
+ }
+ base_t::clear();
+ }
+
+ inline void push_back( T p )
+ {
+ base_t::push_back( p );
+ p->AddFirstRef();
+ }
+
+ inline T pop_back()
+ {
+ T p = base_t::back();
+ base_t::pop_back();
+ if( p )
+ p->ReleaseRef();
+ return p;
+ }
+};
+
class SvMetaObjectMemberList : public SvRefMemberList<SvMetaObject *> {};
class SvMetaObject : public SvRttiBase
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index 93b0c564c594..e27277787cb3 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -20,11 +20,8 @@
#define INCLUDED_TOOLS_REF_HXX
#include <sal/config.h>
-
#include <cassert>
-
#include <tools/toolsdllapi.h>
-#include <vector>
/**
This implements similar functionality to boost::intrusive_ptr
@@ -92,55 +89,6 @@ protected:
}
-template<typename T>
-class SvRefMemberList : private std::vector<T>
-{
-private:
- typedef typename std::vector<T> base_t;
-
-public:
- using base_t::size;
- using base_t::front;
- using base_t::back;
- using base_t::operator[];
- using base_t::begin;
- using base_t::end;
- using typename base_t::iterator;
- using typename base_t::const_iterator;
- using base_t::rbegin;
- using base_t::rend;
- using typename base_t::reverse_iterator;
- using base_t::empty;
-
- inline ~SvRefMemberList() { clear(); }
- inline void clear()
- {
- for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it )
- {
- T p = *it;
- if( p )
- p->ReleaseRef();
- }
- base_t::clear();
- }
-
- inline void push_back( T p )
- {
- base_t::push_back( p );
- p->AddFirstRef();
- }
-
- inline T pop_back()
- {
- T p = base_t::back();
- base_t::pop_back();
- if( p )
- p->ReleaseRef();
- return p;
- }
-};
-
-
/** Classes that want to be referenced-counted via SvRef<T>, should extend this base class */
class TOOLS_DLLPUBLIC SvRefBase
{
diff --git a/sc/inc/grouparealistener.hxx b/sc/inc/grouparealistener.hxx
index 180113810664..99ade314a3ca 100644
--- a/sc/inc/grouparealistener.hxx
+++ b/sc/inc/grouparealistener.hxx
@@ -14,6 +14,7 @@
#include <calcmacros.hxx>
#include <svl/listener.hxx>
+#include <vector>
class ScFormulaCell;
class ScDocument;
diff --git a/sc/inc/listenerquery.hxx b/sc/inc/listenerquery.hxx
index 796116e56d1a..afe6b8a1e090 100644
--- a/sc/inc/listenerquery.hxx
+++ b/sc/inc/listenerquery.hxx
@@ -14,6 +14,7 @@
#include <svl/listener.hxx>
#include <unordered_map>
+#include <vector>
class ScRangeList;
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index fc7aec64c6ce..20777a69367f 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -24,6 +24,7 @@
#include "scdllapi.h"
#include <set>
+#include <vector>
namespace sc {
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index b5671d704a89..ad605cac6af7 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -33,6 +33,7 @@
#include <xmloff/xmlictxt.hxx>
#include <xmloff/txtimp.hxx>
#include <rtl/ustrbuf.hxx>
+#include <vector>
namespace com { namespace sun { namespace star {
namespace xml { namespace sax { class XAttributeList; } }