summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-27 14:11:30 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-28 10:01:32 -0500
commit8369a21642c3f7abd3b3784ee1a27b5cc02562e0 (patch)
treeecf5d692d9132945c2e66b5877f90dfe6d59f3a3 /svtools/inc
parentc391ebbf8c8472911af52bbf3ff028ccee5155be (diff)
Use std::vector over c-style pointer array.
Change-Id: I91ab1fb269070deb8389cf4e8473a223c1bbca1d
Diffstat (limited to 'svtools/inc')
-rw-r--r--svtools/inc/svtools/treelistbox.hxx2
-rw-r--r--svtools/inc/svtools/viewdataentry.hxx11
2 files changed, 9 insertions, 4 deletions
diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx
index 0aa4177bbd30..1a591fd5ad76 100644
--- a/svtools/inc/svtools/treelistbox.hxx
+++ b/svtools/inc/svtools/treelistbox.hxx
@@ -145,7 +145,7 @@ public:
const Size& GetSize(const SvTreeListBox* pView, const SvTreeListEntry* pEntry) const;
const Size& GetSize(const SvViewDataEntry* pData, sal_uInt16 nItemPos) const
{
- const SvViewDataItem* pIData = pData->pItemData + nItemPos;
+ const SvViewDataItem* pIData = pData->GetItem(nItemPos);
return pIData->maSize;
}
diff --git a/svtools/inc/svtools/viewdataentry.hxx b/svtools/inc/svtools/viewdataentry.hxx
index 4e14bc50faab..fa1969e1c24d 100644
--- a/svtools/inc/svtools/viewdataentry.hxx
+++ b/svtools/inc/svtools/viewdataentry.hxx
@@ -24,6 +24,8 @@
#include "tools/solar.h"
#include "tools/gen.hxx"
+#include <vector>
+
// Entryflags that are attached to the View
#define SVLISTENTRYFLAG_SELECTED 0x0001
#define SVLISTENTRYFLAG_EXPANDED 0x0002
@@ -65,12 +67,15 @@ public:
// changed (because it's an array)
class SvViewDataEntry : public SvViewData
{
+ std::vector<SvViewDataItem> maItems;
public:
- SvViewDataItem* pItemData; // An array of SvViewDataItems
- sal_uInt16 nItmCnt; // Item count for delete operator
-
SvViewDataEntry();
virtual ~SvViewDataEntry();
+
+ void Init(size_t nSize);
+
+ const SvViewDataItem* GetItem(size_t nPos) const;
+ SvViewDataItem* GetItem(size_t nPos);
};
#endif