summaryrefslogtreecommitdiff
path: root/cui/source/customize/macropg.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/customize/macropg.cxx
parent4d6fc3c88902ca74f934960e7600df99605dea48 (diff)
SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy. Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
Diffstat (limited to 'cui/source/customize/macropg.cxx')
-rw-r--r--cui/source/customize/macropg.cxx7
1 files changed, 3 insertions, 4 deletions
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() );