diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-11-12 11:55:28 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-12 14:47:00 +0100 |
commit | d73225119476de1826f648acca9e93bf6797e813 (patch) | |
tree | a8061daec36f66550b58515b4dc8131feea0ead5 /sfx2/source | |
parent | 3168c5e09f084e65a32b5865d975ea9a9524d7c3 (diff) |
use copy constructor to clone PoolItems
Change-Id: I2a45a62fd56cc5a768406c7a6e4c72456f962367
Reviewed-on: https://gerrit.libreoffice.org/44648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/objitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/frame.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx index 88760eac5e0d..65fb4a6472dc 100644 --- a/sfx2/source/doc/objitem.cxx +++ b/sfx2/source/doc/objitem.cxx @@ -36,7 +36,7 @@ bool SfxObjectShellItem::operator==( const SfxPoolItem &rItem ) const SfxPoolItem* SfxObjectShellItem::Clone( SfxItemPool *) const { - return new SfxObjectShellItem( Which(), pObjSh ); + return new SfxObjectShellItem( *this ); } bool SfxObjectShellItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const @@ -97,7 +97,7 @@ bool SfxObjectItem::operator==( const SfxPoolItem &rItem ) const SfxPoolItem* SfxObjectItem::Clone( SfxItemPool *) const { - return new SfxObjectItem( Which(), _pSh ); + return new SfxObjectItem( *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 481011ba7d3b..8d940ba05bac 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -473,7 +473,7 @@ bool SfxUsrAnyItem::operator==( const SfxPoolItem& /*rItem*/ ) const SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const { - return new SfxUsrAnyItem( Which(), aValue ); + return new SfxUsrAnyItem( *this ); } bool SfxUsrAnyItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const @@ -507,7 +507,7 @@ bool SfxUnoFrameItem::operator==( const SfxPoolItem& i_rItem ) const SfxPoolItem* SfxUnoFrameItem::Clone( SfxItemPool* ) const { - return new SfxUnoFrameItem( Which(), m_xFrame ); + return new SfxUnoFrameItem( *this ); } bool SfxUnoFrameItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 6c2f5fb37757..816a0aafbca3 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1499,7 +1499,7 @@ bool SfxViewFrameItem::operator==( const SfxPoolItem &rItem ) const SfxPoolItem* SfxViewFrameItem::Clone( SfxItemPool *) const { - return new SfxViewFrameItem( pFrame); + return new SfxViewFrameItem( *this ); } void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh ) |