summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-09-19 20:40:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-20 08:55:56 +0200
commit494358661a05ce548d09e51703f72cd2c012437b (patch)
treeca7d15cb6f7b318e78f352b9d86c2805423087cc /editeng
parent9819f4221ced92fced1760d75019d399c9a3383c (diff)
no need to allocate SfxItemSet separately in SvxOutlinerForwarder
Change-Id: I6042993749b5e0b841e82e3b6930e656b88c7fd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unoforou.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 21ffb0df2976..7edf6923dec1 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -94,18 +94,18 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditE
SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib ) const
{
- if( mpAttribsCache && ( EditEngineAttribs::All == nOnlyHardAttrib ) )
+ if( moAttribsCache && ( EditEngineAttribs::All == nOnlyHardAttrib ) )
{
// have we the correct set in cache?
if( maAttribCacheSelection == rSel )
{
// yes! just return the cache
- return *mpAttribsCache;
+ return *moAttribsCache;
}
else
{
// no, we need delete the old cache
- mpAttribsCache.reset();
+ moAttribsCache.reset();
}
}
@@ -117,7 +117,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA
if( EditEngineAttribs::All == nOnlyHardAttrib )
{
- mpAttribsCache.reset(new SfxItemSet( aSet ));
+ moAttribsCache.emplace( aSet );
maAttribCacheSelection = rSel;
}
@@ -130,31 +130,31 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA
SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_Int32 nPara ) const
{
- if( mpParaAttribsCache )
+ if( moParaAttribsCache )
{
// have we the correct set in cache?
if( nPara == mnParaAttribsCache )
{
// yes! just return the cache
- return *mpParaAttribsCache;
+ return *moParaAttribsCache;
}
else
{
// no, we need delete the old cache
- mpParaAttribsCache.reset();
+ moParaAttribsCache.reset();
}
}
- mpParaAttribsCache.reset(new SfxItemSet( rOutliner.GetParaAttribs( nPara ) ));
+ moParaAttribsCache.emplace( rOutliner.GetParaAttribs( nPara ) );
mnParaAttribsCache = nPara;
EditEngine& rEditEngine = const_cast<EditEngine&>(rOutliner.GetEditEngine());
SfxStyleSheet* pStyle = rEditEngine.GetStyleSheet( nPara );
if( pStyle )
- mpParaAttribsCache->SetParent( &(pStyle->GetItemSet() ) );
+ moParaAttribsCache->SetParent( &(pStyle->GetItemSet() ) );
- return *mpParaAttribsCache;
+ return *moParaAttribsCache;
}
void SvxOutlinerForwarder::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
@@ -247,8 +247,8 @@ SfxItemState SvxOutlinerForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWh
void SvxOutlinerForwarder::flushCache()
{
- mpAttribsCache.reset();
- mpParaAttribsCache.reset();
+ moAttribsCache.reset();
+ moParaAttribsCache.reset();
}
LanguageType SvxOutlinerForwarder::GetLanguage( sal_Int32 nPara, sal_Int32 nIndex ) const