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 /sfx2 | |
parent | 4d6fc3c88902ca74f934960e7600df99605dea48 (diff) |
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy.
Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 79e59754ea9e..ff3dcb81ef6b 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -171,10 +171,8 @@ void SfxVersionsTabListBox_Impl::setColSizes() } } - long aStaticTabs[] = { 3, 0, 0, 0 }; - aStaticTabs[2] = nMax; - aStaticTabs[3] = nMax + nMaxAuthorWidth; - SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel); + long aTabPositions[] = { 0, nMax, nMax + nMaxAuthorWidth }; + SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel); } SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose ) @@ -215,10 +213,8 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN ); m_pVersionBox->SetSelectionMode( SelectionMode::Single ); - long nTabs_Impl[] = { 3, 0, 0, 0 }; - - - m_pVersionBox->SvSimpleTable::SetTabs(&nTabs_Impl[0]); + long aTabPositions[] = { 0, 0, 0 }; + m_pVersionBox->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions); OUString sHeader1(get<FixedText>("datetime")->GetText()); OUString sHeader2(get<FixedText>("savedby")->GetText()); OUString sHeader3(get<FixedText>("comments")->GetText()); @@ -517,9 +513,8 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame ) m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN ); m_pVersionBox->SetSelectionMode( SelectionMode::Single ); - long nTabs_Impl[] = { 3, 0, 0, 0 }; - - m_pVersionBox->SvSimpleTable::SetTabs(&nTabs_Impl[0]); + long aTabPositions[] = { 0, 0, 0 }; + m_pVersionBox->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions); OUString sHeader1(get<FixedText>("datetime")->GetText()); OUString sHeader2(get<FixedText>("savedby")->GetText()); OUString sHeader3(get<FixedText>("comments")->GetText()); |