summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-05-07 19:00:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-07 20:19:32 +0200
commit13ce37a85ac73a88567c2066fac694e4fc02a6f8 (patch)
treeabeb41482ad967af75ea0c156a2ed0267f0fee2e /chart2/source/view
parenta2729787d9bf29f9c5c05137fe016407ab596b92 (diff)
add utility method to get last pool in chain
Change-Id: If21defdf1b59219e3b81d803423713972412da7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 14bd6b55cfcb..916087e6c69a 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -62,17 +62,8 @@ DrawModelWrapper::DrawModelWrapper()
pMasterPool->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
pMasterPool->SetPoolDefaultItem(makeSvx3DPercentDiagonalItem (5));
- SfxItemPool* pPool = pMasterPool;
// append chart pool to end of pool chain
- for (;;)
- {
- SfxItemPool* pSecondary = pPool->GetSecondaryPool();
- if (!pSecondary)
- break;
-
- pPool = pSecondary;
- }
- pPool->SetSecondaryPool(m_pChartItemPool);
+ pMasterPool->GetLastPoolInChain()->SetSecondaryPool(m_pChartItemPool);
pMasterPool->FreezeIdRanges();
SetTextDefaults();