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 /svx | |
parent | 4d6fc3c88902ca74f934960e7600df99605dea48 (diff) |
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy.
Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index be1e113c70c3..1e32dbf43ac3 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -431,8 +431,8 @@ void SvxTPView::dispose() void SvxTPView::InsertWriterHeader() { - const long pTabs[] = { 4 /* Length of rest of the array */, 10, 20, 70, 120 }; - m_pViewData->SetTabs(pTabs); + const long aTabPositions[] = { 10, 20, 70, 120 }; + m_pViewData->SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions); OUString aStrTab('\t'); OUString aString = get<FixedText>("action")->GetText() @@ -448,8 +448,8 @@ void SvxTPView::InsertWriterHeader() void SvxTPView::InsertCalcHeader() { - const long pTabs[] = { 5 /* Length of rest of the array */, 10, 65, 120, 170, 220 }; - m_pViewData->SetTabs(pTabs); + const long aTabPositions[] = { 10, 65, 120, 170, 220 }; + m_pViewData->SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions); OUString aStrTab('\t'); OUString aString = get<FixedText>("action")->GetText() diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 040afecf3b37..b3be3f22f2e5 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -860,8 +860,8 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) pFileListLBContainer->set_height_request(aSize.Height()); m_pFileListLB = VclPtr<RecovDocList>::Create(*pFileListLBContainer); - static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 }; - m_pFileListLB->SetTabs( &nTabs[0] ); + static long aTabPositions[] = { 0, 40*RECOV_CONTROLWIDTH/100 }; + m_pFileListLB->SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions ); m_pFileListLB->InsertHeaderEntry(get<FixedText>("nameft")->GetText() + "\t" + get<FixedText>("statusft")->GetText()); PluginProgress* pProgress = new PluginProgress(m_pProgrParent, pCore->getComponentContext()); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 3afc291316e1..cdaabee98f10 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2887,8 +2887,8 @@ namespace svxform pNamespacesListContainer->set_height_request(aControlSize.Height()); m_pNamespacesList = VclPtr<SvSimpleTable>::Create(*pNamespacesListContainer, 0); - static long aStaticTabs[]= { 3, 0, 35, 200 }; - m_pNamespacesList->SvSimpleTable::SetTabs( aStaticTabs ); + static long aTabPositions[]= { 0, 35, 200 }; + m_pNamespacesList->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions ); OUString sHeader = get<FixedText>("prefix")->GetText(); sHeader += "\t"; sHeader += get<FixedText>("url")->GetText(); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index cc160da590ae..0be78a576402 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -367,8 +367,8 @@ void DictionaryList::setColSizes() long nPos3 = nWidth - nWidth3; long nRemainder = nWidth - (nWidth1 + nWidth2 + nWidth3); - long aStaticTabs[] = { 3, 0, nWidth1 + (nRemainder/2), nPos3 }; - SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel); + long aTabPositions[] = { 0, nWidth1 + (nRemainder/2), nPos3 }; + SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel); } void DictionaryList::Resize() @@ -410,8 +410,8 @@ void DictionaryList::init(const Reference< linguistic2::XConversionDictionary>& rHeaderBar.InsertItem( 2, aColumn2, nWidth2, nBits ); rHeaderBar.InsertItem( 3, aColumn3, nWidth3, nBits ); - long pTabs[] = { 3, 0, nWidth1, nWidth1 + nWidth2 }; - SetTabs( &pTabs[0], MapUnit::MapPixel ); + long aTabPositions[] = { 0, nWidth1, nWidth1 + nWidth2 }; + SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel ); } void ChineseDictionaryDialog::initDictionaryControl(DictionaryList *pList, |