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 /xmlsecurity | |
parent | 4d6fc3c88902ca74f934960e7600df99605dea48 (diff) |
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy.
Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'xmlsecurity')
4 files changed, 10 insertions, 10 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 5454dbdb26b8..2defc8e6a406 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -56,8 +56,8 @@ CertificateChooser::CertificateChooser(vcl::Window* _pParent, pSignatures->set_height_request(aControlSize.Height()); m_pCertLB = VclPtr<SvSimpleTable>::Create(*pSignatures); - static long nTabs[] = { 5, 0, 20*nControlWidth/100, 50*nControlWidth/100, 60*nControlWidth/100, 70*nControlWidth/100 }; - m_pCertLB->SetTabs( &nTabs[0] ); + static long nTabs[] = { 0, 20*nControlWidth/100, 50*nControlWidth/100, 60*nControlWidth/100, 70*nControlWidth/100 }; + m_pCertLB->SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); m_pCertLB->InsertHeaderEntry(get<FixedText>("issuedto")->GetText() + "\t" + get<FixedText>("issuedby")->GetText() + "\t" + get<FixedText>("type")->GetText() + "\t" + get<FixedText>("expiration")->GetText() + "\t" + get<FixedText>("usage")->GetText()); diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 4f206d256118..0f2d0a399c60 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -249,8 +249,8 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C constexpr int DLGS_WIDTH = 287; constexpr int CS_LB_WIDTH = (DLGS_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT) - RSC_SP_DLG_INNERBORDER_LEFT; - static long nTabs[] = { 2, 0, 30*CS_LB_WIDTH/100 }; - m_pElementsLB->SetTabs( &nTabs[ 0 ] ); + static long nTabs[] = { 0, 30*CS_LB_WIDTH/100 }; + m_pElementsLB->SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); m_pElementsLB->InsertHeaderEntry( XsResId( STR_HEADERBAR ) ); // fill list box diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index aad24e69a544..d3c6d2d6c92d 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -141,8 +141,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog( m_pSignaturesLB = VclPtr<SvSimpleTable>::Create(*pSignatures); // Give the first column 6 percent, try to distribute the rest equally. - static long aTabs[] = { 6, 0, 6*nControlWidth/100, 25*nControlWidth/100, 44*nControlWidth/100, 62*nControlWidth/100, 81*nControlWidth/100 }; - m_pSignaturesLB->SetTabs(aTabs); + static long aTabs[] = { 0, 6*nControlWidth/100, 25*nControlWidth/100, 44*nControlWidth/100, 62*nControlWidth/100, 81*nControlWidth/100 }; + m_pSignaturesLB->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs); m_pSignaturesLB->InsertHeaderEntry("\t" + get<FixedText>("signed")->GetText() + "\t" + get<FixedText>("issued")->GetText() + "\t" + get<FixedText>("date")->GetText() + "\t" diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 41c597754294..91f14846d37f 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -348,8 +348,8 @@ public: if (isInitialLayout(this)) { const long nControlWidth = GetSizePixel().Width(); - long aTabLocs[] = { 3, 0, 35*nControlWidth/100, 70*nControlWidth/100 }; - SvSimpleTable::SetTabs(aTabLocs, MapUnit::MapPixel); + long aTabLocs[] = { 0, 35*nControlWidth/100, 70*nControlWidth/100 }; + SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aTabLocs), aTabLocs, MapUnit::MapPixel); } } }; @@ -368,8 +368,8 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(vcl::Window* _pPare SvSimpleTableContainer *pCertificates = get<SvSimpleTableContainer>("certificates"); m_pTrustCertLB.reset(VclPtr<TrustCertLB>::Create(*pCertificates)); - static long aTabs[] = { 3, 0, 0, 0 }; - m_pTrustCertLB->SetTabs( aTabs ); + static long aTabs[] = { 0, 0, 0 }; + m_pTrustCertLB->SetTabs( SAL_N_ELEMENTS(aTabs), aTabs ); m_pTrustCertLB->InsertHeaderEntry(get<FixedText>("to")->GetText() + "\t" + get<FixedText>("by")->GetText() + "\t" + get<FixedText>("date")->GetText()); |