summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-24 13:36:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-25 10:14:02 +0200
commitbbf134a2b77909706492cbc41952210f89c0df71 (patch)
treebbb1585a1dd0a92a22b511d93afb2b6d62331a49 /basctl
parent4d6fc3c88902ca74f934960e7600df99605dea48 (diff)
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy. Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx8
-rw-r--r--basctl/source/basicide/moduldl2.cxx10
2 files changed, 7 insertions, 11 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index a506a68e40b3..27da2dc9d828 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1598,12 +1598,8 @@ WatchWindow::WatchWindow (Layout* pParent)
aHeaderBar->InsertItem( ITEM_ID_VALUE, IDEResId(RID_STR_WATCHVALUE), nValueTabWidth );
aHeaderBar->InsertItem( ITEM_ID_TYPE, IDEResId(RID_STR_WATCHTYPE), nTypeTabWidth );
- long tabs[ 4 ];
- tabs[ 0 ] = 3; // two tabs
- tabs[ 1 ] = 0;
- tabs[ 2 ] = nVarTabWidth;
- tabs[ 3 ] = nVarTabWidth + nValueTabWidth;
- aTreeListBox->SvHeaderTabListBox::SetTabs( tabs, MapUnit::MapPixel );
+ long aTabPositions[] = { 0, nVarTabWidth, nVarTabWidth + nValueTabWidth };
+ aTreeListBox->SvHeaderTabListBox::SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel );
aTreeListBox->InitHeaderBar( aHeaderBar.get() );
aTreeListBox->SetNodeDefaultImages( );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 0722118559be..644b1593352c 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -151,9 +151,9 @@ CheckBox::CheckBox(vcl::Window* pParent, WinBits nStyle)
, eMode(ObjectMode::Module)
, m_aDocument(ScriptDocument::getApplicationScriptDocument())
{
- long const aTabs_[] = { 1, 12 }; // TabPos needs at least one...
- // 12 because of the CheckBox
- SetTabs( aTabs_ );
+ long const aTabPositions[] = { 12 }; // TabPos needs at least one...
+ // 12 because of the CheckBox
+ SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions );
Init();
}
@@ -484,8 +484,8 @@ LibPage::LibPage(vcl::Window * pParent)
m_pLibBox->EnableInplaceEditing(true);
m_pLibBox->SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP );
- long const aTabs[] = { 2, 30, 120 };
- m_pLibBox->SetTabs( aTabs, MapUnit::MapPixel );
+ long const aTabPositions[] = { 30, 120 };
+ m_pLibBox->SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel );
FillListBox();
m_pBasicsBox->SelectEntryPos( 0 );