summaryrefslogtreecommitdiff
path: root/cui/source/options/fontsubs.cxx
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 /cui/source/options/fontsubs.cxx
parent4d6fc3c88902ca74f934960e7600df99605dea48 (diff)
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy. Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'cui/source/options/fontsubs.cxx')
-rw-r--r--cui/source/options/fontsubs.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index b500f0107632..70051b6d69aa 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -66,8 +66,8 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
m_pCheckLB->SetSelectionMode(SelectionMode::Multiple);
m_pCheckLB->SortByCol(2);
- long aStaticTabs[] = { 4, 0, 0, 0, 0 };
- m_pCheckLB->SvSimpleTable::SetTabs(&aStaticTabs[0]);
+ long aStaticTabs[] = { 0, 0, 0, 0 };
+ m_pCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs);
OUString sHeader1(get<FixedText>("always")->GetText());
OUString sHeader2(get<FixedText>("screenonly")->GetText());
@@ -421,11 +421,8 @@ void SvxFontSubstCheckListBox::setColSizes()
nMax = std::max( nMax, nMin );
const long nDoubleMax = 2*nMax;
const long nRest = GetSizePixel().Width() - nDoubleMax;
- long aStaticTabs[] = { 4, 0, 0, 0, 0 };
- aStaticTabs[2] = nMax;
- aStaticTabs[3] = nDoubleMax;
- aStaticTabs[4] = nDoubleMax + nRest/2;
- SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
+ long aStaticTabs[] = { 0, nMax, nDoubleMax, nDoubleMax + nRest/2 };
+ SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs, MapUnit::MapPixel);
}
void SvxFontSubstCheckListBox::Resize()