diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-05-07 19:00:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-07 20:19:32 +0200 |
commit | 13ce37a85ac73a88567c2066fac694e4fc02a6f8 (patch) | |
tree | abeb41482ad967af75ea0c156a2ed0267f0fee2e /svl | |
parent | a2729787d9bf29f9c5c05137fe016407ab596b92 (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 'svl')
-rw-r--r-- | svl/source/items/itempool.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 1d84ab00a115..24fda80d1bfe 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -773,6 +773,15 @@ SfxItemPool* SfxItemPool::GetSecondaryPool() const return pImpl->mpSecondary; } +/* get the last pool by following the GetSecondaryPool chain */ +SfxItemPool* SfxItemPool::GetLastPoolInChain() +{ + SfxItemPool* pLast = this; + while(pLast->GetSecondaryPool()) + pLast = pLast->GetSecondaryPool(); + return pLast; +} + SfxItemPool* SfxItemPool::GetMasterPool() const { return pImpl->mpMaster; |