diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-05 14:37:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-05 22:42:38 +0200 |
commit | ef049c4d10023f866173ea344d13e5d99d485066 (patch) | |
tree | c23f63cb5df4644de09a7184258e6b9e347a0f5e /svx | |
parent | 18446cdd6007679f227f192a606c86fe2eea1ef6 (diff) |
simplify SvxUnoDrawPool initialisation
Change-Id: Iaca5eec19935c50cc7cade4f3dab139a5232473a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154058
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index e94ccb2d7450..eb897556eff9 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -39,25 +39,8 @@ using namespace ::com::sun::star; using namespace ::cppu; -static rtl::Reference<comphelper::PropertySetInfo> const & getDefaults(SvxUnoDrawPoolDefaults nServiceId) -{ - switch (nServiceId) - { - case SvxUnoDrawPoolDefaults::Drawing: return SvxPropertySetInfoPool::getDrawingDefaults(); - case SvxUnoDrawPoolDefaults::Writer: return SvxPropertySetInfoPool::getWriterDrawingDefaults(); - default: std::abort(); - } -} - -SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel, SvxUnoDrawPoolDefaults nServiceId) -: PropertySetHelper( getDefaults(nServiceId) ), mpModel( pModel ) -{ - init(); -} - -/* deprecated */ -SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel) -: PropertySetHelper( SvxPropertySetInfoPool::getDrawingDefaults() ), mpModel( pModel ) +SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel, rtl::Reference<comphelper::PropertySetInfo> const & xDefaults) +: PropertySetHelper( xDefaults ), mpModel( pModel ) { init(); } |