diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 5 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 7 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 10 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/certpath.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/dbregister.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 11 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/optdict.cxx | 14 | ||||
-rw-r--r-- | cui/source/options/optfltr.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 15 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/webconninfo.cxx | 9 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 16 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 7 |
15 files changed, 63 insertions, 79 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 70ed7d80ecb6..f752506c4fe1 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -782,9 +782,8 @@ static const sal_uInt16 KEYCODE_ARRAY_SIZE = SAL_N_ELEMENTS(KEYCODE_ARRAY); // seems to be needed to layout the list box, which shows all // assignable shortcuts -static long AccCfgTabs[] = +static const long AccCfgTabs[] = { - 2, // Number of Tabs 0, 120 // Function }; @@ -943,7 +942,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const // initialize Entriesbox m_pEntriesBox->SetStyle(m_pEntriesBox->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); m_pEntriesBox->SetSelectionMode(SelectionMode::Single); - m_pEntriesBox->SetTabs(&AccCfgTabs[0]); + m_pEntriesBox->SetTabs(SAL_N_ELEMENTS(AccCfgTabs), AccCfgTabs); m_pEntriesBox->Resize(); // OS: Hack for right selection m_pEntriesBox->SetSpaceBetweenEntries(0); m_pEntriesBox->SetDragDropMode(DragDropMode::NONE); diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 40ac11c6c2ac..ac57cdd86611 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -65,9 +65,8 @@ SvxMacroTabPage_Impl::SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) } // attention, this array is indexed directly (0, 1, ...) in the code -static long nTabs[] = +static const long nTabs[] = { - 2, // Number of Tabs 0, 90 }; @@ -698,8 +697,8 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla rListBox.SetSelectHdl( LINK( this, SvxMacroTabPage_, SelectEvent_Impl )); rListBox.SetSelectionMode( SelectionMode::Single ); - rListBox.SetTabs( &nTabs[0] ); - Size aSize( nTabs[ 2 ], 0 ); + rListBox.SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); + Size aSize( nTabs[ 1 ], 0 ); rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() ); aSize.setWidth( 1764 ); // don't know what, so 42^2 is best to use... rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() ); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index ff0a1dfa3a3c..261de3cf79cf 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -79,7 +79,7 @@ public: // attention, this array is indexed directly (0, 1, ...) in the code static long nTabs[] = - { 4, // Number of Tabs + { 0, 77, 144, 209 }; @@ -110,13 +110,13 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b get(m_pPbBreakLink, "BREAK_LINK"); m_pTbLinks->SetSelectionMode( SelectionMode::Multiple ); - m_pTbLinks->SetTabs( &nTabs[0] ); + m_pTbLinks->SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); FixedText *pFtFiles = get<FixedText>("FILES"); - pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); + pFtFiles->set_width_request(LogicToPixel(Size(nTabs[1] - nTabs[0] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); FixedText *pFtLinks = get<FixedText>("LINKS"); - pFtLinks->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); + pFtLinks->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); FixedText *pFtTypes = get<FixedText>("TYPE"); - pFtTypes->set_width_request(LogicToPixel(Size(nTabs[4] - nTabs[3] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); + pFtTypes->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); m_pTbLinks->Resize(); // OS: hack for correct selection // UpdateTimer for DDE-/Grf-links, which are waited for diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index ca431ff2ffcc..d703b914acf7 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -188,8 +188,8 @@ SvxMultiPathDialog::SvxMultiPathDialog(vcl::Window* pParent) pRadioLBContainer->set_height_request(aSize.Height()); m_pRadioLB = VclPtr<svx::SvxRadioButtonListBox>::Create(*pRadioLBContainer, 0); - static long aStaticTabs[]= { 2, 0, 12 }; - m_pRadioLB->SvSimpleTable::SetTabs( aStaticTabs ); + static long aStaticTabs[]= { 0, 12 }; + m_pRadioLB->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); OUString sHeader(get<FixedText>("pathlist")->GetText()); m_pRadioLB->SetQuickHelpText( sHeader ); sHeader = "\t" + sHeader; diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index a52b895b7f8c..59d0d8834b0c 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -36,12 +36,8 @@ CertPathDialog::CertPathDialog(vcl::Window* pParent) m_sAddDialogText = get<FixedText>("certdir")->GetText(); m_sManual = get<FixedText>("manual")->GetText(); - static long aStaticTabs[]= - { - 3, 0, 15, 75 - }; - - m_pCertPathList->SvSimpleTable::SetTabs( aStaticTabs ); + static long aStaticTabs[] = { 0, 15, 75 }; + m_pCertPathList->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); OUString sProfile(get<FixedText>("profile")->GetText()); OUString sDirectory(get<FixedText>("dir")->GetText()); diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 200436cf5e10..fb9c836b2d87 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -140,7 +140,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons LogicToPixel( aSz, MapMode( MapUnit::MapAppFont ) ).Width(), HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); - static long aTabs[] = {3, 0, TAB_WIDTH1, TAB_WIDTH1 + TAB_WIDTH2 }; + static long aTabs[] = {0, TAB_WIDTH1, TAB_WIDTH1 + TAB_WIDTH2 }; Size aHeadSize = rBar.GetSizePixel(); m_pPathBox->SetStyle( m_pPathBox->GetStyle()|nBits ); @@ -149,7 +149,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons m_pPathBox->SetSelectionMode( SelectionMode::Single ); m_pPathBox->SetPosSizePixel( Point( 0, aHeadSize.Height() ), Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) ); - m_pPathBox->SvSimpleTable::SetTabs( aTabs ); + m_pPathBox->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aTabs), aTabs ); m_pPathBox->SetHighlightRange(); m_pPathBox->SetHelpId( HID_DBPATH_CTL_PATH ); 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() diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index f6d966fd4293..32f7a010447e 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -165,21 +165,19 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI m_pPrefBox->InsertHeaderEntry(get<FixedText>("type")->GetText()); m_pPrefBox->InsertHeaderEntry(get<FixedText>("value")->GetText()); - long aTabs[] = {4,0,0,0,0}; - float fWidth = approximate_char_width(); - aTabs[1] = 0; - aTabs[2] = aTabs[1] + fWidth * 65; - aTabs[3] = aTabs[2] + fWidth * 20; - aTabs[4] = aTabs[3] + fWidth * 8; + long aTabs[] = {0,0,0,0}; + aTabs[1] = fWidth * 65; + aTabs[2] = aTabs[1] + fWidth * 20; + aTabs[3] = aTabs[2] + fWidth * 8; m_options.AlgorithmType2 = util::SearchAlgorithms2::ABSOLUTE; m_options.transliterateFlags |= TransliterationFlags::IGNORE_CASE; m_options.searchFlag |= (util::SearchFlags::REG_NOT_BEGINOFLINE | util::SearchFlags::REG_NOT_ENDOFLINE); - m_pPrefBox->SetTabs(aTabs, MapUnit::MapPixel); + m_pPrefBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel); m_pPrefBox->SetAlternatingRowColors( true ); } diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 31194b4ab9db..b5f7665ebfa0 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -44,10 +44,7 @@ using namespace linguistic; // static ---------------------------------------------------------------- -static long nStaticTabs[]= -{ - 2,10,71,120 -}; +static const long nStaticTabs[] = { 10, 71 }; // static function ------------------------------------------------------- @@ -220,7 +217,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( aDics = LinguMgr::GetDictionaryList()->getDictionaries(); pWordsLB->SetSelectHdl(LINK(this, SvxEditDictionaryDialog, SelectHdl)); - pWordsLB->SetTabs(nStaticTabs); + pWordsLB->SetTabs(SAL_N_ELEMENTS(nStaticTabs), nStaticTabs); //! we use an algorithm of our own to insert elements sorted pWordsLB->SetStyle(pWordsLB->GetStyle()|/*WB_SORT|*/WB_HSCROLL|WB_CLIPCHILDREN); @@ -483,9 +480,10 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) pReplaceFT->SetText(CuiResId(RID_SVXSTR_OPT_GRAMMAR_BY)); } + sal_uInt16 nTabsCount; if(bIsNegative || !bLangNone) { - nStaticTabs[0]=2; + nTabsCount=2; // make controls for replacement text active if(!pReplaceFT->IsVisible()) @@ -499,7 +497,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) } else { - nStaticTabs[0]=1; + nTabsCount=1; // deactivate controls for replacement text if(pReplaceFT->IsVisible()) @@ -513,7 +511,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) } - pWordsLB->SetTabs(nStaticTabs); + pWordsLB->SetTabs(nTabsCount, nStaticTabs); pWordsLB->Clear(); Sequence< Reference< XDictionaryEntry > > aEntries( xDic->getEntries() ); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 86d4cc437151..9ec7a56ed481 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -162,8 +162,8 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet m_pCheckLB = VclPtr<MSFltrSimpleTable>::Create(*m_pCheckLBContainer); - static long aStaticTabs[] = { 3, 0, 20, 40 }; - m_pCheckLB->SvSimpleTable::SetTabs( aStaticTabs ); + static long aStaticTabs[] = { 0, 20, 40 }; + m_pCheckLB->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); OUString sHeader = sHeader1 + "\t" + sHeader2 + "\t"; m_pCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 0ffe56682abe..9940db3014f7 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -94,11 +94,11 @@ public: std::max(GetSizePixel().Width() - (nCheckWidth + nVersionWidth + nFeatureWidth), 6 + std::max(rBar.GetTextWidth(rBar.GetItemText(2)), GetTextWidth("Sun Microsystems Inc."))); - long aStaticTabs[]= { 4, 0, 0, 0, 0, 0 }; - aStaticTabs[2] = nCheckWidth; - aStaticTabs[3] = aStaticTabs[2] + nVendorWidth; - aStaticTabs[4] = aStaticTabs[3] + nVersionWidth; - SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel); + long aStaticTabs[]= { 0, 0, 0, 0 }; + aStaticTabs[1] = nCheckWidth; + aStaticTabs[2] = aStaticTabs[1] + nVendorWidth; + aStaticTabs[3] = aStaticTabs[2] + nVersionWidth; + SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs, MapUnit::MapPixel); } virtual void Resize() override { @@ -137,9 +137,8 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet& pJavaListContainer->set_height_request(aControlSize.Height()); m_pJavaList = VclPtr<SvxJavaListBox>::Create(*pJavaListContainer, m_sAccessibilityText); - long const aStaticTabs[]= { 4, 0, 0, 0, 0 }; - - m_pJavaList->SvSimpleTable::SetTabs( aStaticTabs ); + long const aStaticTabs[]= { 0, 0, 0, 0 }; + m_pJavaList->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); OUString sHeader ( "\t" + get<FixedText>("vendor")->GetText() + "\t" + get<FixedText>("version")->GetText() + diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 90388aa1522b..59c93cf9d216 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -223,10 +223,10 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet) long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_TYPE)); long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_PATH)); - long aTabs[] = {3, 0, 0, 0}; - aTabs[2] = nWidth1 + 12; - aTabs[3] = aTabs[2] + nWidth2 + 12; - pPathBox->SetTabs(aTabs, MapUnit::MapPixel); + long aTabs[] = {0, 0, 0}; + aTabs[1] = nWidth1 + 12; + aTabs[2] = aTabs[1] + nWidth2 + 12; + pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel); pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) ); pPathBox->SetSelectHdl( LINK( this, SvxPathTabPage, PathSelect_Impl ) ); @@ -360,10 +360,10 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) } - long aTabs[] = {3, 0, 0, 0}; - aTabs[2] = nWidth1 + 12; - aTabs[3] = aTabs[2] + nWidth2 + 12; - pPathBox->SetTabs(aTabs, MapUnit::MapPixel); + long aTabs[] = {0, 0, 0}; + aTabs[1] = nWidth1 + 12; + aTabs[2] = aTabs[1] + nWidth2 + 12; + pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel); PathSelect_Impl( nullptr ); } diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 0582a3e50f51..b057d77721c2 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -92,9 +92,8 @@ void PasswordTable::setColWidths() long nWebSiteWidth = std::max( 12 + rBar.GetTextWidth(rBar.GetItemText(1)), GetSizePixel().Width() - nUserNameWidth); - long aStaticTabs[]= { 2, 0, 0 }; - aStaticTabs[2] = nWebSiteWidth; - SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel); + long aStaticTabs[]= { 0, nWebSiteWidth }; + SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs, MapUnit::MapPixel); } // class WebConnectionInfoDialog ----------------------------------------- @@ -111,8 +110,8 @@ WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent) SvSimpleTableContainer *pPasswordsLBContainer = get<SvSimpleTableContainer>("logins"); m_pPasswordsLB = VclPtr<PasswordTable>::Create(*pPasswordsLBContainer, 0); - long const aStaticTabs[]= { 2, 0, 0 }; - m_pPasswordsLB->SetTabs( aStaticTabs ); + long const aStaticTabs[]= { 0, 0 }; + m_pPasswordsLB->SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); m_pPasswordsLB->InsertHeaderItem( 1, get<FixedText>("website")->GetText(), HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); m_pPasswordsLB->InsertHeaderItem( 2, get<FixedText>("username")->GetText(), diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 4c50310887cc..5c6357e519ca 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -443,12 +443,12 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( vcl::Window* pParent, m_pCheckLB->SetSelectHdl(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl)); m_pCheckLB->SetDoubleClickHdl(LINK(this, OfaSwAutoFmtOptionsPage, DoubleClickEditHdl)); - static long aStaticTabs[]= + static long const aStaticTabs[]= { - 3, 0, 20, 40 + 0, 20, 40 }; - m_pCheckLB->SvSimpleTable::SetTabs(aStaticTabs); + m_pCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs); OUString sHeader = get<vcl::Window>("m")->GetText() + "\t" + get<vcl::Window>("t")->GetText() + "\t"; m_pCheckLB->InsertHeaderEntry(sHeader, HEADERBAR_APPEND, @@ -884,8 +884,8 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( vcl::Window* pParent, pCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 ); pCharClass = new CharClass( aLanguageTag ); - static long aTabs[] = { 2 /* Tab-Count */, 1, 61 }; - m_pReplaceTLB->SetTabs( &aTabs[0] ); + static long const aTabs[] = { 1, 61 }; + m_pReplaceTLB->SetTabs( SAL_N_ELEMENTS(aTabs), aTabs ); m_pReplaceTLB->SetStyle( m_pReplaceTLB->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN ); m_pReplaceTLB->SetSelectHdl( LINK(this, OfaAutocorrReplacePage, SelectHdl) ); @@ -1842,14 +1842,14 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet) if ( bShowSWOptions ) { - static long aStaticTabs[]= + static long const aStaticTabs[]= { - 3, 0, 20, 40 + 0, 20, 40 }; m_pSwCheckLB->SetStyle(m_pSwCheckLB->GetStyle() | WB_HSCROLL| WB_VSCROLL); - m_pSwCheckLB->SvSimpleTable::SetTabs(aStaticTabs); + m_pSwCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs); OUString sHeader = get<vcl::Window>("m")->GetText() + "\t" + get<vcl::Window>("t")->GetText() + "\t"; m_pSwCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index a3e37471bd9b..c164baff3f79 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -78,9 +78,8 @@ static sal_uInt16 aPageRg[] = { }; // attention, this array is indexed directly (0, 1, ...) in the code -static long nTabs[] = +static long const nTabs[] = { - 2, // Number of Tabs 0, 90 }; @@ -392,8 +391,8 @@ void SfxMacroTabPage::InitAndSetHandler() mpImpl->pMacroLB->SetSelectHdl( LINK( this, SfxMacroTabPage, SelectMacro_Impl )); rListBox.SetSelectionMode( SelectionMode::Single ); - rListBox.SetTabs( &nTabs[0] ); - Size aSize( nTabs[ 2 ], 0 ); + rListBox.SetTabs( SAL_N_ELEMENTS(nTabs), nTabs ); + Size aSize( nTabs[ 1 ], 0 ); rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() ); aSize.setWidth( 1764 ); // don't know what, so 42^2 is best to use... rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() ); |