From a2dbaac6a802af438d82b9889d58fc6ac534ca09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 30 Aug 2016 13:01:06 +0100 Subject: [PATCH] default assignment and ctor are fine here Change-Id: I50edc71ee8bb4398764f2e15180a0269aac233ce --- vcl/inc/toolbox.h | 6 +-- vcl/source/window/toolbox2.cxx | 72 ---------------------------------- 2 files changed, 1 insertion(+), 77 deletions(-) diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 7fd621e26767..e45c394e8658 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -34,7 +34,7 @@ namespace vcl { class Window; } struct ImplToolItem { - VclPtr mpWindow; + VclPtr mpWindow; //don't dispose mpWindow - we get copied around void* mpUserData; Image maImage; Image maImageOriginal; @@ -75,10 +75,6 @@ struct ImplToolItem ImplToolItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rTxt, ToolBoxItemBits nItemBits ); - ~ImplToolItem(); - - ImplToolItem( const ImplToolItem& ); - ImplToolItem& operator=(const ImplToolItem&); // returns the size of a item, taking toolbox orientation into account // the default size is the precomputed size for standard items diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 307b38702869..a584a55f84a4 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -127,78 +127,6 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, init(nItemId, nItemBits, false); } -ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : - mpWindow ( rItem.mpWindow ), - mpUserData ( rItem.mpUserData ), - maImage ( rItem.maImage ), - maImageOriginal ( rItem.maImageOriginal ), - mnImageAngle ( rItem.mnImageAngle ), - mbMirrorMode ( rItem.mbMirrorMode ), - maText ( rItem.maText ), - maQuickHelpText ( rItem.maQuickHelpText ), - maHelpText ( rItem.maHelpText ), - maCommandStr ( rItem.maCommandStr ), - maHelpId ( rItem.maHelpId ), - maRect ( rItem.maRect ), - maCalcRect ( rItem.maCalcRect ), - maMinimalItemSize ( rItem.maMinimalItemSize ), - maItemSize ( rItem.maItemSize ), - mnSepSize ( rItem.mnSepSize ), - mnDropDownArrowWidth ( rItem.mnDropDownArrowWidth ), - maContentSize ( rItem.maContentSize ), - meType ( rItem.meType ), - mnBits ( rItem.mnBits ), - meState ( rItem.meState ), - mnId ( rItem.mnId ), - mbEnabled ( rItem.mbEnabled ), - mbVisible ( rItem.mbVisible ), - mbEmptyBtn ( rItem.mbEmptyBtn ), - mbShowWindow ( rItem.mbShowWindow ), - mbBreak ( rItem.mbBreak ), - mbVisibleText ( rItem.mbVisibleText ), - mbExpand ( rItem.mbExpand ) -{ -} - -ImplToolItem::~ImplToolItem() -{ - // don't dispose mpWindow - we get copied around. -} - -ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) -{ - mpWindow = rItem.mpWindow; - mpUserData = rItem.mpUserData; - maImage = rItem.maImage; - maImageOriginal = rItem.maImageOriginal; - mnImageAngle = rItem.mnImageAngle; - mbMirrorMode = rItem.mbMirrorMode; - maText = rItem.maText; - maQuickHelpText = rItem.maQuickHelpText; - maHelpText = rItem.maHelpText; - maCommandStr = rItem.maCommandStr; - maHelpId = rItem.maHelpId; - maRect = rItem.maRect; - maCalcRect = rItem.maCalcRect; - mnSepSize = rItem.mnSepSize; - mnDropDownArrowWidth = rItem.mnDropDownArrowWidth; - maContentSize = rItem.maContentSize; - maMinimalItemSize = rItem.maMinimalItemSize; - maItemSize = rItem.maItemSize; - mbVisibleText = rItem.mbVisibleText; - mbExpand = rItem.mbExpand; - meType = rItem.meType; - mnBits = rItem.mnBits; - meState = rItem.meState; - mnId = rItem.mnId; - mbEnabled = rItem.mbEnabled; - mbVisible = rItem.mbVisible; - mbEmptyBtn = rItem.mbEmptyBtn; - mbShowWindow = rItem.mbShowWindow; - mbBreak = rItem.mbBreak; - return *this; -} - Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) { Size aSize( rDefaultSize ); // the size of 'standard' toolbox items