diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 21:30:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 22:41:56 +0000 |
commit | 9999eab5fe5e92118574468905cae0e3c8982c7f (patch) | |
tree | 2bc04015f09e30c8d8dbb000f12f08749c21be59 /svl/source/items | |
parent | b234008ba5096f251fffec4c467f2103f4ba3cc0 (diff) |
getPropertyMap can return a reference instead of a pointer
Diffstat (limited to 'svl/source/items')
-rw-r--r-- | svl/source/items/itemprop.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index 536eed6c45d3..ec6629ba510e 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -61,6 +61,7 @@ public: SfxItemPropertyMap_Impl(){} SfxItemPropertyMap_Impl( const SfxItemPropertyMap_Impl* pSource ); }; + SfxItemPropertyMap_Impl::SfxItemPropertyMap_Impl( const SfxItemPropertyMap_Impl* pSource ) { this->SfxItemPropertyHashMap_t::operator=( *pSource ); @@ -78,8 +79,8 @@ SfxItemPropertyMap::SfxItemPropertyMap( const SfxItemPropertyMapEntry* pEntries } } -SfxItemPropertyMap::SfxItemPropertyMap( const SfxItemPropertyMap* pSource ) : - m_pImpl( new SfxItemPropertyMap_Impl( pSource->m_pImpl ) ) +SfxItemPropertyMap::SfxItemPropertyMap( const SfxItemPropertyMap& rSource ) : + m_pImpl( new SfxItemPropertyMap_Impl( rSource.m_pImpl ) ) { } @@ -344,7 +345,7 @@ Reference<XPropertySetInfo> SfxItemPropertySet::getPropertySetInfo() const { if( !m_xInfo.is() ) - m_xInfo = new SfxItemPropertySetInfo( &m_aMap ); + m_xInfo = new SfxItemPropertySetInfo( m_aMap ); return m_xInfo; } @@ -353,10 +354,10 @@ struct SfxItemPropertySetInfo_Impl SfxItemPropertyMap* m_pOwnMap; }; -SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap *pMap ) : +SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap ) : m_pImpl( new SfxItemPropertySetInfo_Impl ) { - m_pImpl->m_pOwnMap = new SfxItemPropertyMap( pMap ); + m_pImpl->m_pOwnMap = new SfxItemPropertyMap( rMap ); } SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMapEntry *pEntries ) : |