svl: Avoid unnecessary indirection in SfxItemPropertySetInfo
Change-Id: I56db3db23361590b5d2c09bc8f6f23a02ccd7f60 Reviewed-on: https://gerrit.libreoffice.org/59570 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
2b5812e019
commit
40e2c08856
@@ -181,14 +181,12 @@ public:
|
|||||||
const SfxItemPropertyMap& getPropertyMap() const {return m_aMap;}
|
const SfxItemPropertyMap& getPropertyMap() const {return m_aMap;}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SfxItemPropertySetInfo_Impl;
|
|
||||||
|
|
||||||
// workaround for incremental linking bugs in MSVC2015
|
// workaround for incremental linking bugs in MSVC2015
|
||||||
class SAL_DLLPUBLIC_TEMPLATE SfxItemPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
|
class SAL_DLLPUBLIC_TEMPLATE SfxItemPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
|
||||||
|
|
||||||
class SVL_DLLPUBLIC SfxItemPropertySetInfo : public SfxItemPropertySetInfo_Base
|
class SVL_DLLPUBLIC SfxItemPropertySetInfo : public SfxItemPropertySetInfo_Base
|
||||||
{
|
{
|
||||||
std::unique_ptr<SfxItemPropertySetInfo_Impl> m_pImpl;
|
SfxItemPropertyMap m_aOwnMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap );
|
SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap );
|
||||||
|
@@ -290,41 +290,33 @@ Reference<XPropertySetInfo> const & SfxItemPropertySet::getPropertySetInfo() con
|
|||||||
return m_xInfo;
|
return m_xInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SfxItemPropertySetInfo_Impl
|
|
||||||
{
|
|
||||||
SfxItemPropertyMap* m_pOwnMap;
|
|
||||||
};
|
|
||||||
|
|
||||||
SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap )
|
SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap )
|
||||||
: m_pImpl( new SfxItemPropertySetInfo_Impl )
|
: m_aOwnMap( rMap )
|
||||||
{
|
{
|
||||||
m_pImpl->m_pOwnMap = new SfxItemPropertyMap( rMap );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMapEntry *pEntries )
|
SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMapEntry *pEntries )
|
||||||
: m_pImpl( new SfxItemPropertySetInfo_Impl )
|
: m_aOwnMap( pEntries )
|
||||||
{
|
{
|
||||||
m_pImpl->m_pOwnMap = new SfxItemPropertyMap( pEntries );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< Property > SAL_CALL SfxItemPropertySetInfo::getProperties( )
|
Sequence< Property > SAL_CALL SfxItemPropertySetInfo::getProperties( )
|
||||||
{
|
{
|
||||||
return m_pImpl->m_pOwnMap->getProperties();
|
return m_aOwnMap.getProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
SfxItemPropertySetInfo::~SfxItemPropertySetInfo()
|
SfxItemPropertySetInfo::~SfxItemPropertySetInfo()
|
||||||
{
|
{
|
||||||
delete m_pImpl->m_pOwnMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Property SAL_CALL SfxItemPropertySetInfo::getPropertyByName( const OUString& rName )
|
Property SAL_CALL SfxItemPropertySetInfo::getPropertyByName( const OUString& rName )
|
||||||
{
|
{
|
||||||
return m_pImpl->m_pOwnMap->getPropertyByName( rName );
|
return m_aOwnMap.getPropertyByName( rName );
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SAL_CALL SfxItemPropertySetInfo::hasPropertyByName( const OUString& rName )
|
sal_Bool SAL_CALL SfxItemPropertySetInfo::hasPropertyByName( const OUString& rName )
|
||||||
{
|
{
|
||||||
return m_pImpl->m_pOwnMap->hasPropertyByName( rName );
|
return m_aOwnMap.hasPropertyByName( rName );
|
||||||
}
|
}
|
||||||
|
|
||||||
SfxExtItemPropertySetInfo::SfxExtItemPropertySetInfo( const SfxItemPropertyMapEntry *pMap,
|
SfxExtItemPropertySetInfo::SfxExtItemPropertySetInfo( const SfxItemPropertyMapEntry *pMap,
|
||||||
|
Reference in New Issue
Block a user