Kaydet (Commit) bda88f07 authored tarafından Mike Kaganski's avatar Mike Kaganski

Deduplicate code

Change-Id: Ic11e481688401559c2e26cffd625d3b6e3bf2f03
Reviewed-on: https://gerrit.libreoffice.org/57219
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 221c239c
......@@ -158,11 +158,7 @@ public:
}
template<class T> const T* GetItem( TypedWhichId<T> nWhich, bool bSearchInParent = true ) const
{
const SfxPoolItem* pItem = GetItem(sal_uInt16(nWhich), bSearchInParent);
const T* pCastedItem = dynamic_cast<const T*>(pItem);
assert(!pItem || pCastedItem); // if it exists, must have the correct type
return pCastedItem;
return GetItem<T>(sal_uInt16(nWhich), bSearchInParent);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment