summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-25 12:37:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-30 08:39:16 +0200
commit39c7e09ca5cb9b6dab143483bd6cb72fcad8307e (patch)
treee1a2d99e9bf9365cf3925c4f65e24bfaa81967c3 /include/svtools
parentb0631cc1454d99cbaa948e54c3b0c246bd27bf1c (diff)
loplugin:useuniqueptr in SvTabListBox
Change-Id: I02117072df781f5aa86eafadaf3611999762a3c5 Reviewed-on: https://gerrit.libreoffice.org/53605 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/svtabbx.hxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 6f9a44e54246..3fba520202ec 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -47,8 +47,7 @@ struct TabListBoxEventData
class SVT_DLLPUBLIC SvTabListBox : public SvTreeListBox
{
private:
- SvLBoxTab* pTabList;
- sal_uInt16 nTabCount;
+ std::vector<SvLBoxTab> mvTabList;
OUString aCurEntry;
protected:
@@ -66,7 +65,7 @@ public:
virtual ~SvTabListBox() override;
virtual void dispose() override;
void SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit = MapUnit::MapAppFont);
- sal_uInt16 TabCount() const { return nTabCount; }
+ sal_uInt16 TabCount() const { return mvTabList.size(); }
using SvTreeListBox::GetTab;
long GetTab( sal_uInt16 nTab ) const;
void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MapUnit::MapAppFont );
@@ -108,8 +107,8 @@ public:
inline long SvTabListBox::GetTab( sal_uInt16 nTab ) const
{
- DBG_ASSERT( nTab < nTabCount, "GetTabPos:Invalid Tab" );
- return pTabList[nTab].GetPos();
+ DBG_ASSERT( nTab < mvTabList.size(), "GetTabPos:Invalid Tab" );
+ return mvTabList[nTab].GetPos();
}
// class SvHeaderTabListBox ---------------------------------------------------