diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-11 09:51:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-29 15:38:56 +0000 |
commit | c694837aea16edb76dc19b3ca2db764375148011 (patch) | |
tree | 3d3c0337d389b28923aab32e6b14319782a1eb65 /include/basic | |
parent | 73f961ecf7439913fcd2233555187ff18eab1704 (diff) |
convert linked list to std::vector in SbxDimArray
Change-Id: I2640cfe1f9606d992f622b99ff3c607555771e23
Reviewed-on: https://gerrit.libreoffice.org/10298
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/basic')
-rw-r--r-- | include/basic/sbx.hxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index 6fa85b92dc5f..76e1bcc17a29 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -32,6 +32,7 @@ #include <basic/basicdllapi.h> #include <boost/ptr_container/ptr_vector.hpp> +#include <vector> class SvStream; class SbxBase; @@ -167,12 +168,14 @@ public: }; // SbxDimArray is an array that can dimensioned using BASIC conventions. -struct SbxDim; +struct SbxDim { // an array-dimension: + sal_Int32 nLbound, nUbound; // Limitations + sal_Int32 nSize; // Number of elements +}; class BASIC_DLLPUBLIC SbxDimArray : public SbxArray { - SbxDim* pFirst, *pLast; // Links to Dimension table - short nDim; // Number of dimensions + std::vector<SbxDim> m_vDimensions; // Dimension table BASIC_DLLPRIVATE void AddDimImpl32( sal_Int32, sal_Int32, bool bAllowSize0 ); bool mbHasFixedSize; protected: @@ -196,7 +199,7 @@ public: void Put( SbxVariable*, const short* ); SbxVariable* Get( SbxArray* ); - short GetDims() const { return nDim;} + short GetDims() const { return m_vDimensions.size();} void AddDim( short, short ); void unoAddDim( short, short ); bool GetDim( short, short&, short& ) const; |