diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-24 08:37:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-24 10:53:05 +0200 |
commit | 57de1a3c279d4ecfaa020626296f7e667765e5a3 (patch) | |
tree | f7d49701357ae4ccb4729bbf9fd50ceac6801393 /sw/source/filter/writer/writer.cxx | |
parent | 90e3b47b52f26420425a7417d2f51b6a386282d9 (diff) |
simplify call sites of SfxItemPool::Put
use template to make return type match input type, so we don't need to
cast at the call sites
Change-Id: I1e65f362c67f74c9a230cdbc1db12545b28eb499
Reviewed-on: https://gerrit.libreoffice.org/71216
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/writer/writer.cxx')
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 8b5c2406b181..c374d261ce65 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -420,10 +420,10 @@ void Writer::AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ) { SvxFontItem aFont( rFont ); aFont.SetWhich( RES_CHRATR_FONT ); - pItem = static_cast<const SvxFontItem*>(&rPool.Put( aFont )); + pItem = &rPool.Put( aFont ); } else - pItem = static_cast<const SvxFontItem*>(&rPool.Put( rFont )); + pItem = &rPool.Put( rFont ); if( 1 < pItem->GetRefCount() ) rPool.Remove( *pItem ); |