diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-21 12:31:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-21 14:58:51 +0200 |
commit | 29489b33b435683021b72cb2bce27aba8cb7a430 (patch) | |
tree | 8e4e1c59d56d5ed0d0ca4d088419067041e4553a /cui | |
parent | a4244c0f05b95ded277a3a7ed217bf0451daa996 (diff) |
loplugin:flatten
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/dbregister.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 889691422346..ba61527cdeca 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -168,20 +168,20 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet* rSet ) } OUString aUserData = GetUserData(); - if ( !aUserData.isEmpty() ) + if ( aUserData.isEmpty() ) + return; + + sal_Int32 nIdx {0}; + // restore column width + std::vector<int> aWidths { - sal_Int32 nIdx {0}; - // restore column width - std::vector<int> aWidths - { - aUserData.getToken(0, ';', nIdx).toInt32() - }; - m_xPathBox->set_column_fixed_widths(aWidths); - // restore sort direction - bool bUp = aUserData.getToken(0, ';', nIdx).toInt32() != 0; - m_xPathBox->set_sort_order(bUp); - m_xPathBox->set_sort_indicator(bUp ? TRISTATE_TRUE : TRISTATE_FALSE, COL_TYPE); - } + aUserData.getToken(0, ';', nIdx).toInt32() + }; + m_xPathBox->set_column_fixed_widths(aWidths); + // restore sort direction + bool bUp = aUserData.getToken(0, ';', nIdx).toInt32() != 0; + m_xPathBox->set_sort_order(bUp); + m_xPathBox->set_sort_indicator(bUp ? TRISTATE_TRUE : TRISTATE_FALSE, COL_TYPE); } void DbRegistrationOptionsPage::FillUserData() |