summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 09:19:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-31 15:50:04 +0200
commit5b8729a741bd65c2f61ae9caba7ea15a139835e5 (patch)
treec8e11588f87115b51b932af5b89bd0c68787e0a6 /filter
parentSimplify construction of a hardcoded IPv4 address (diff)
downloadcore-5b8729a741bd65c2f61ae9caba7ea15a139835e5.tar.gz
core-5b8729a741bd65c2f61ae9caba7ea15a139835e5.zip
no need to allocate SvxNumRule separately in SvxNumBulletItem
Change-Id: I7903565a468fc0fbec603c88b92cca6560a86728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116424 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx37
1 files changed, 17 insertions, 20 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 341198369bac..c1bab48ffac8 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6176,30 +6176,27 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
aNumberFormat.SetIndentAt( 0 );
}
SvxNumBulletItem aNewNumBulletItem( *pNumBulletItem );
- SvxNumRule* pRule = aNewNumBulletItem.GetNumRule();
- if ( pRule )
+ SvxNumRule& rRule = aNewNumBulletItem.GetNumRule();
+ rRule.SetLevel( mxParaSet->mnDepth, aNumberFormat );
+ for (sal_uInt16 i = 0; i < rRule.GetLevelCount(); ++i)
{
- pRule->SetLevel( mxParaSet->mnDepth, aNumberFormat );
- for (sal_uInt16 i = 0; i < pRule->GetLevelCount(); ++i)
+ if ( i != mxParaSet->mnDepth )
{
- if ( i != mxParaSet->mnDepth )
- {
- sal_uInt16 n = sanitizeForMaxPPTLevels(i);
-
- SvxNumberFormat aNumberFormat2( pRule->GetLevel( i ) );
- const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ nInstance ]->maParaLevel[ n ];
- const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ nInstance ]->maCharLevel[ n ];
- sal_uInt32 nColor;
- if ( rParaLevel.mnBuFlags & ( 1 << PPT_ParaAttr_BuHardColor ) )
- nColor = rParaLevel.mnBulletColor;
- else
- nColor = rCharLevel.mnFontColor;
- aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
- pRule->SetLevel( i, aNumberFormat2 );
- }
+ sal_uInt16 n = sanitizeForMaxPPTLevels(i);
+
+ SvxNumberFormat aNumberFormat2( rRule.GetLevel( i ) );
+ const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ nInstance ]->maParaLevel[ n ];
+ const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ nInstance ]->maCharLevel[ n ];
+ sal_uInt32 nColor;
+ if ( rParaLevel.mnBuFlags & ( 1 << PPT_ParaAttr_BuHardColor ) )
+ nColor = rParaLevel.mnBulletColor;
+ else
+ nColor = rCharLevel.mnFontColor;
+ aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
+ rRule.SetLevel( i, aNumberFormat2 );
}
- rSet.Put( aNewNumBulletItem );
}
+ rSet.Put( aNewNumBulletItem );
}
}
}