diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-10-04 18:58:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-05 14:06:33 +0200 |
commit | 4f7c0393d5dab5c0451d16a694fab963bdc98966 (patch) | |
tree | 8409534f55d0b69307d68f69ab88c76acf7d651f /sfx2 | |
parent | d2c49bfde8e4e5f17cc80f5f5cc99ebb0aec1946 (diff) |
simplify SfxAllEnumItem
It is just a data carrier for an array of values for
SID_ATTR_PATHNAME, it does not need associated enum logic.
Change-Id: I547cd5580d02eb9c261feeb3545e31910a4ed644
Reviewed-on: https://gerrit.libreoffice.org/80253
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 323c87432d55..208c23aca8b5 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -436,7 +436,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet ) case SvtPathOptions::PATH_USERCONFIG: aValue = aPathCfg.GetUserConfigPath(); break; case SvtPathOptions::PATH_WORK: aValue = aPathCfg.GetWorkPath(); break; } - aValues.InsertValue( nProp, aValue ); + aValues.SetTextByPos( nProp, aValue ); } if (rSet.Put(aValues)) @@ -728,11 +728,11 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) { DBG_ASSERT(dynamic_cast< const SfxAllEnumItem *>( pItem ) != nullptr, "AllEnumItem expected"); const SfxAllEnumItem* pEnumItem = static_cast<const SfxAllEnumItem *>(pItem); - sal_uInt32 nCount = pEnumItem->GetValueCount(); + sal_uInt32 nCount = pEnumItem->GetTextCount(); OUString aNoChangeStr( ' ' ); for( sal_uInt32 nPath=0; nPath<nCount; ++nPath ) { - const OUString& sValue = pEnumItem->GetValueTextByPos(static_cast<sal_uInt16>(nPath)); + const OUString& sValue = pEnumItem->GetTextByPos(static_cast<sal_uInt16>(nPath)); if ( sValue != aNoChangeStr ) { switch( nPath ) |