summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
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