diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-24 13:36:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-25 10:14:02 +0200 |
commit | bbf134a2b77909706492cbc41952210f89c0df71 (patch) | |
tree | bbb1585a1dd0a92a22b511d93afb2b6d62331a49 /sw/source/ui/misc | |
parent | 4d6fc3c88902ca74f934960e7600df99605dea48 (diff) |
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy.
Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/bookmark.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/glosbib.cxx | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 9a7bd9472710..309892627b47 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -349,9 +349,9 @@ void SwInsertBookmarkDlg::dispose() BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) : SvSimpleTable(rParent, 0) { - static long nTabs[] = {3, 0, 40, 150}; + static long nTabs[] = {0, 40, 150}; - SetTabs(nTabs, MapUnit::MapPixel); + SetTabs(SAL_N_ELEMENTS(nTabs), nTabs, MapUnit::MapPixel); SetSelectionMode(SelectionMode::Multiple); InsertHeaderEntry(SwResId(STR_PAGE)); InsertHeaderEntry(SwResId(STR_BOOKMARK_NAME)); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 4c84074f2e7e..dc957cb7650c 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -63,12 +63,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent, m_pGroupTLB->set_width_request(nWidth); m_pGroupTLB->set_height_request(GetTextHeight() * 10); - long nTabs[] = - { 2, // Number of Tabs - 0, nAppFontUnits - }; + long nTabs[] = { 0, nAppFontUnits }; - m_pGroupTLB->SetTabs( &nTabs[0] ); + m_pGroupTLB->SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); m_pGroupTLB->SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); m_pGroupTLB->GetModel()->SetSortMode(SortAscending); m_pNewPB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); |