diff options
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 8c74fe883345..9c474131352c 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1389,8 +1389,8 @@ const SvxNumberFormat* Outliner::GetNumberFormat( sal_Int32 nPara ) const if( nDepth >= 0 ) { const SvxNumBulletItem& rNumBullet = pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET ); - if ( rNumBullet.GetNumRule()->GetLevelCount() > nDepth ) - pFmt = rNumBullet.GetNumRule()->Get( nDepth ); + if ( rNumBullet.GetNumRule().GetLevelCount() > nDepth ) + pFmt = rNumBullet.GetNumRule().Get( nDepth ); } return pFmt; diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index da1b2f6d51ec..aabe51c9efd8 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -851,7 +851,7 @@ void OutlinerView::ToggleBullets() const SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection)); const SfxPoolItem& rPoolItem = aTmpSet.GetPool()->GetDefaultItem( EE_PARA_NUMBULLET ); const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(&rPoolItem); - pDefaultBulletNumRule = pNumBulletItem ? pNumBulletItem->GetNumRule() : nullptr; + pDefaultBulletNumRule = pNumBulletItem ? &pNumBulletItem->GetNumRule() : nullptr; } } @@ -1034,17 +1034,17 @@ void OutlinerView::ApplyBulletsNumbering( const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(pPoolItem); if (pNumBulletItem) { - const sal_uInt16 nLevelCnt = std::min(pNumBulletItem->GetNumRule()->GetLevelCount(), aNewRule.GetLevelCount()); + const sal_uInt16 nLevelCnt = std::min(pNumBulletItem->GetNumRule().GetLevelCount(), aNewRule.GetLevelCount()); for ( sal_uInt16 nLevel = 0; nLevel < nLevelCnt; ++nLevel ) { - const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get(nLevel); + const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule().Get(nLevel); const SvxNumberFormat* pNewFmt = aNewRule.Get(nLevel); if (pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset() || pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace())) { - std::unique_ptr<SvxNumberFormat> pNewFmtClone(new SvxNumberFormat(*pNewFmt)); - pNewFmtClone->SetFirstLineOffset(pOldFmt->GetFirstLineOffset()); - pNewFmtClone->SetAbsLSpace(pOldFmt->GetAbsLSpace()); - aNewRule.SetLevel(nLevel, pNewFmtClone.get()); + SvxNumberFormat aNewFmtClone(*pNewFmt); + aNewFmtClone.SetFirstLineOffset(pOldFmt->GetFirstLineOffset()); + aNewFmtClone.SetAbsLSpace(pOldFmt->GetAbsLSpace()); + aNewRule.SetLevel(nLevel, &aNewFmtClone); } } } |