diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-21 13:38:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 14:14:48 +0200 |
commit | 7fb43031b7eec663768f5a4e78e60da86379df41 (patch) | |
tree | 026dd9b5a522aec8534763af074fc4a28ccfa58d /cui/source/customize/cfg.cxx | |
parent | 61ea11e51ceeaec7bf197a076cf40d96bd65ad07 (diff) |
loplugin:constantparam
Change-Id: Ibfe70492683ff3ec208cee95d8a11155ec54f690
Reviewed-on: https://gerrit.libreoffice.org/81314
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize/cfg.cxx')
-rw-r--r-- | cui/source/customize/cfg.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index b9f08fe53149..ae4d0da10834 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1446,13 +1446,12 @@ int SvxConfigPage::AddFunction(int nTarget, bool bAllowDuplicates) } } - return InsertEntry(pNewEntryData, nTarget, /*bFront*/false); + return AppendEntry(pNewEntryData, nTarget); } -int SvxConfigPage::InsertEntry( +int SvxConfigPage::AppendEntry( SvxConfigEntry* pNewEntryData, - int nTarget, - bool bFront) + int nTarget) { SvxConfigEntry* pTopLevelSelection = GetTopLevelSelection(); @@ -1468,13 +1467,7 @@ int SvxConfigPage::InsertEntry( OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pNewEntryData))); - if (bFront) - { - pEntries->insert( pEntries->begin(), pNewEntryData ); - m_xContentsListBox->insert(0, sId); - nNewEntry = 0; - } - else if (nCurEntry == -1 || nCurEntry == m_xContentsListBox->n_children() - 1) + if (nCurEntry == -1 || nCurEntry == m_xContentsListBox->n_children() - 1) { pEntries->push_back( pNewEntryData ); m_xContentsListBox->insert(-1, sId); |