summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-30 13:01:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-30 19:26:41 +0100
commita2dbaac6a802af438d82b9889d58fc6ac534ca09 (patch)
treeb2fe7aa2835b5586a027a3a58f7993f8ee62b86d
parent04311182b6fadcbdeef7aec15c7eea0240ee628c (diff)
default assignment and ctor are fine here
Change-Id: I50edc71ee8bb4398764f2e15180a0269aac233ce
-rw-r--r--vcl/inc/toolbox.h6
-rw-r--r--vcl/source/window/toolbox2.cxx72
2 files changed, 1 insertions, 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<vcl::Window> mpWindow;
+ VclPtr<vcl::Window> 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