diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-11 20:57:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-12 21:12:10 +0100 |
commit | 2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch) | |
tree | 6f676441983e9b3c8440600d09a49478353e1faf /sfx2/source/dialog | |
parent | 23cfd3d1004f5ddda8cd79878c00b6c64f20068c (diff) |
use covariant return type for SfxPoolItem::Clone
and can then remove some casting
Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc
Reviewed-on: https://gerrit.libreoffice.org/85022
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tplpitem.cxx | 4 |
3 files changed, 3 insertions, 8 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index b6f1398f13d1..a7411825050b 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -286,19 +286,16 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const SfxDocumentInfoItem& rItem ) m_aCmisProperties = rItem.m_aCmisProperties; } - SfxDocumentInfoItem::~SfxDocumentInfoItem() { ClearCustomProperties(); } - -SfxPoolItem* SfxDocumentInfoItem::Clone( SfxItemPool * ) const +SfxDocumentInfoItem* SfxDocumentInfoItem::Clone( SfxItemPool * ) const { return new SfxDocumentInfoItem( *this ); } - bool SfxDocumentInfoItem::operator==( const SfxPoolItem& rItem) const { if (!SfxStringItem::operator==(rItem)) diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index abcdca034b42..9b73516c97c2 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -90,7 +90,7 @@ SfxTabDialogItem::SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet ) { } -SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const +SfxTabDialogItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const { return new SfxTabDialogItem( *this, pToPool ); } diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 60156ad6d4f3..66f378620acb 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -45,13 +45,11 @@ bool SfxTemplateItem::operator==( const SfxPoolItem& rCmp ) const aStyle == static_cast<const SfxTemplateItem&>(rCmp).aStyle ); } - -SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const +SfxTemplateItem* SfxTemplateItem::Clone( SfxItemPool *) const { return new SfxTemplateItem(*this); } - bool SfxTemplateItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { css::frame::status::Template aTemplate; |