[Libreoffice-commits] core.git: idl/inc include/tools sc/inc xmloff/inc
Noel Grandin
noel at peralex.com
Tue Oct 27 09:26:08 UTC 2015
idl/inc/basobj.hxx | 50 +++++++++++++++++++++++++++++++++++++++++
include/tools/ref.hxx | 52 -------------------------------------------
sc/inc/grouparealistener.hxx | 1
sc/inc/listenerquery.hxx | 1
sc/inc/markdata.hxx | 1
xmloff/inc/txtfldi.hxx | 1
6 files changed, 54 insertions(+), 52 deletions(-)
New commits:
commit 834cbda1ec3f8b4fd5e64da4f8ff2f9072e35989
Author: Noel Grandin <noel at peralex.com>
Date: Tue Oct 27 09:53:18 2015 +0200
move SvRefMemberList into idl
since it's only usage is there
Change-Id: I882ddd3e08ab37cf7b3cca8121463598ea3d3bc4
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index bb788d5..b4b9178 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 93b0c56..e272777 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 1801138..99ade31 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 796116e..afe6b8a 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 fc7aec6..20777a6 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 b5671d7..ad605ca 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; } }
More information about the Libreoffice-commits
mailing list