From bcc28948d0fd7b4f005a13db923c3e853d74817c Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (Allotropia)" Date: Wed, 9 Jun 2021 13:33:26 +0200 Subject: [PATCH] tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWN See task, slowly trying to reduce usages of that flag Change-Id: I50dc8e21e2f5e82e21bf335d63d07cee1ee18d01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116913 Reviewed-by: Julien Nabet Reviewed-by: Armin Le Grand Tested-by: Jenkins --- cui/source/options/optpath.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index e1f638faa673..e0f940219016 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -77,14 +77,14 @@ namespace { struct PathUserData_Impl { SvtPathOptions::Paths nRealId; - SfxItemState eState; + bool bItemStateSet; OUString sUserPath; OUString sWritablePath; bool bReadOnly; explicit PathUserData_Impl(SvtPathOptions::Paths nId) : nRealId(nId) - , eState(SfxItemState::UNKNOWN) + , bItemStateSet(false) , bReadOnly(false) { } @@ -227,7 +227,7 @@ bool SvxPathTabPage::FillItemSet( SfxItemSet* ) { PathUserData_Impl* pPathImpl = reinterpret_cast(m_xPathBox->get_id(i).toInt64()); SvtPathOptions::Paths nRealId = pPathImpl->nRealId; - if (pPathImpl->eState == SfxItemState::SET) + if (pPathImpl->bItemStateSet ) SetPathList( nRealId, pPathImpl->sUserPath, pPathImpl->sWritablePath ); } return true; @@ -403,7 +403,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, weld::Button&, void) } } m_xPathBox->set_text(rEntry, Convert_Impl(sTemp), 1); - pPathImpl->eState = SfxItemState::SET; + pPathImpl->bItemStateSet = true; pPathImpl->sUserPath = sUserPath.makeStringAndClear(); pPathImpl->sWritablePath = sWritablePath; } @@ -448,7 +448,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) return; m_xPathBox->set_text(nEntry, Convert_Impl(sNewPathStr), 1); - pPathImpl->eState = SfxItemState::SET; + pPathImpl->bItemStateSet = true; pPathImpl->sWritablePath = sNewPathStr; if ( SvtPathOptions::Paths::Work == pPathImpl->nRealId ) { @@ -530,7 +530,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void) m_xPathBox->set_text(nEntry, Convert_Impl(sFullPath), 1); // save modified flag - pPathImpl->eState = SfxItemState::SET; + pPathImpl->bItemStateSet = true; pPathImpl->sUserPath = sUser; pPathImpl->sWritablePath = sWritable; }