diff options
author | Noel Grandin <noel@peralex.com> | 2012-02-10 13:47:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-02-10 17:27:27 +0100 |
commit | d4a31e6ae28825a42cb8b1935fdfd777cda41e8f (patch) | |
tree | 47bb5d5002e23f9fb21e06539d74e2fa004034c6 /sc/inc/detdata.hxx | |
parent | 90d1c9ff829c41c8384d66dfd2f6e90660517088 (diff) |
convert detdata.cxx in SC module to boost:ptr_vector
converts usage of SV_DECL_PTRARR_DEL in sc/inc/detdata.hxx and associated code
to boost::ptr_vector
Diffstat (limited to 'sc/inc/detdata.hxx')
-rw-r--r-- | sc/inc/detdata.hxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index 811dde8cd217..891c803d8b18 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -31,14 +31,10 @@ #include <svl/svarray.hxx> #include "global.hxx" -#include "address.hxx" +#include "boost/ptr_container/ptr_vector.hpp" //------------------------------------------------------------------------ - -#define SC_DETOP_GROW 4 - -//------------------------------------------------------------------------ enum ScDetOpType { SCDETOP_ADDSUCC, @@ -78,13 +74,12 @@ public: // list of operators // -typedef ScDetOpData* ScDetOpDataPtr; - -SV_DECL_PTRARR_DEL(ScDetOpArr_Impl, ScDetOpDataPtr, SC_DETOP_GROW) +typedef boost::ptr_vector<ScDetOpData> ScDetOpDataVector; -class ScDetOpList : public ScDetOpArr_Impl +class ScDetOpList { sal_Bool bHasAddError; // updated in append + ScDetOpDataVector aDetOpDataVector; public: ScDetOpList() : bHasAddError(false) {} @@ -97,9 +92,12 @@ public: sal_Bool operator==( const ScDetOpList& r ) const; // for ref-undo - void Append( ScDetOpData* pData ); + void Append( ScDetOpData* pData ); + ScDetOpData* GetObject(int i); + void DeleteAndDestroy(int i); sal_Bool HasAddError() const { return bHasAddError; } + int Count() const { return aDetOpDataVector.size(); } }; |