summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorjsala <javier.salamanca.munoz@gmail.com>2022-06-21 21:25:50 +0200
committerHossein <hossein@libreoffice.org>2022-09-04 20:04:23 +0200
commit9e7e95a57b7c16941d9fdc59f806c1f9e4263379 (patch)
tree2311a80a98bd31b703708d946a5905d980835bca /cui/source
parent42d197ef301db68e56f7e45b6e36ace5fae04b4d (diff)
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change associated for by std::find_if in sqlbison.y Also change some integer by std::size_t Change-Id: I0d2100fbd7c22729da6ce0462c6cc093e0767fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136263 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/tipofthedaydlg.cxx2
-rw-r--r--cui/source/dialogs/toolbarmodedlg.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx
index 8e609122de50..4fb8c81267a1 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -122,7 +122,7 @@ static bool file_exists(const OUString& fileName)
void TipOfTheDayDialog::UpdateTip()
{
- constexpr sal_Int32 nNumberOfTips = SAL_N_ELEMENTS(TIPOFTHEDAY_STRINGARRAY);
+ constexpr sal_Int32 nNumberOfTips = std::size(TIPOFTHEDAY_STRINGARRAY);
if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0))
m_nCurrentTip = 0;
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx
index f1dbdeb106cb..54918e7fdcd4 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -94,12 +94,12 @@ ToolbarmodeDialog::ToolbarmodeDialog(weld::Window* pParent)
(m_xBuilder->weld_radio_button("rbButton9")) }
, m_pInfoLabel(m_xBuilder->weld_label("lbInfo"))
{
- static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == SAL_N_ELEMENTS(TOOLBARMODES_ARRAY));
+ static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == std::size(TOOLBARMODES_ARRAY));
Link<weld::Toggleable&, void> aLink = LINK(this, ToolbarmodeDialog, SelectToolbarmode);
const OUString sCurrentMode = GetCurrentMode();
- for (tools::ULong i = 0; i < std::size(m_pRadioButtons); i++)
+ for (std::size_t i = 0; i < std::size(m_pRadioButtons); ++i)
{
m_pRadioButtons[i]->connect_toggled(aLink);
if (sCurrentMode == std::get<1>(TOOLBARMODES_ARRAY[i]))
@@ -131,7 +131,7 @@ static bool file_exists(const OUString& fileName)
int ToolbarmodeDialog::GetActiveRadioButton()
{
- for (tools::ULong i = 0; i < std::size(m_pRadioButtons); i++)
+ for (std::size_t i = 0; i < std::size(m_pRadioButtons); ++i)
{
if (m_pRadioButtons[i]->get_active())
return i;