summaryrefslogtreecommitdiff
path: root/unotools/source/config
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-26 10:54:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-26 20:50:16 +0200
commit78adf246d5e99d0f5d91d2e03c1379b154289d8d (patch)
tree941eac00c997ef26b897c61a02b148f94f36ab5f /unotools/source/config
parentd14ab85a4446279e24aa6b6d5e8bfedb48ccdfe1 (diff)
return SvtCompatibilityEntry from SvtCompatibilityOptions::GetList
instead of converting back and forth Change-Id: Iec913494ccad65ebff76bf7b6cf5b2440fbade42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119514 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config')
-rw-r--r--unotools/source/config/compatibility.cxx26
1 files changed, 4 insertions, 22 deletions
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index c3ac4b6c532a..9c11393d0408 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -125,7 +125,7 @@ class SvtCompatibilityOptions_Impl : public ConfigItem
void SetDefault( SvtCompatibilityEntry::Index rIdx, bool rValue );
bool GetDefault( SvtCompatibilityEntry::Index rIdx ) const;
- Sequence< Sequence< PropertyValue > > GetList() const;
+ const std::vector< SvtCompatibilityEntry > & GetOptions() const { return m_aOptions; }
/*-****************************************************************************************************
@short called for notify of configmanager
@@ -238,25 +238,6 @@ bool SvtCompatibilityOptions_Impl::GetDefault( SvtCompatibilityEntry::Index rIdx
return m_aDefOptions.getValue<bool>( rIdx );
}
-Sequence< Sequence< PropertyValue > > SvtCompatibilityOptions_Impl::GetList() const
-{
- Sequence< PropertyValue > lProperties( SvtCompatibilityEntry::getElementCount() );
- Sequence< Sequence< PropertyValue > > lResult( m_aOptions.size() );
-
- for ( int i = static_cast<int>(SvtCompatibilityEntry::Index::Name); i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID); ++i )
- lProperties[i].Name = SvtCompatibilityEntry::getName( SvtCompatibilityEntry::Index(i) );
-
- sal_Int32 j = 0;
- for ( const auto& rItem : m_aOptions )
- {
- for ( int i = static_cast<int>(SvtCompatibilityEntry::Index::Name); i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID); ++i )
- lProperties[i].Value = rItem.getValue( SvtCompatibilityEntry::Index(i) );
- lResult[ j++ ] = lProperties;
- }
-
- return lResult;
-}
-
void SvtCompatibilityOptions_Impl::Notify( const Sequence< OUString >& )
{
SAL_WARN( "unotools.config", "SvtCompatibilityOptions_Impl::Notify() Not implemented yet! I don't know how I can handle a dynamical list of unknown properties ..." );
@@ -359,10 +340,11 @@ bool SvtCompatibilityOptions::GetDefault( SvtCompatibilityEntry::Index rIdx ) co
return m_pImpl->GetDefault( rIdx );
}
-Sequence< Sequence< PropertyValue > > SvtCompatibilityOptions::GetList() const
+std::vector< SvtCompatibilityEntry > SvtCompatibilityOptions::GetList() const
{
MutexGuard aGuard( GetOwnStaticMutex() );
- return m_pImpl->GetList();
+
+ return m_pImpl->GetOptions();
}
namespace