From 609c35d943b001cb1d598709289cfa0b2bb48f01 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 8 Oct 2013 15:40:43 +0100 Subject: CID#1079271 uninitialized member variables Change-Id: I4bf9e0c7a548c0f22ce670803bc8334277f80c9e --- vcl/source/window/menu.cxx | 55 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index c51d7e5a82ee..ab693ea00a00 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -135,22 +135,45 @@ struct MenuItemData SalMenuItem* pSalMenuItem; // access to native menu - MenuItemData() : - pSubMenu(NULL), pAutoSubMenu(NULL), nItemImageAngle(0), pSalMenuItem ( NULL ) - {} - MenuItemData( const OUString& rStr, const Image& rImage ) : - pSubMenu(NULL), - pAutoSubMenu(NULL), - aText( rStr ), - aImage( rImage ), - nItemImageAngle(0), - pSalMenuItem ( NULL ) - {} - ~MenuItemData(); - bool HasCheck() const - { - return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) ); - } + MenuItemData() + : nId(0) + , eType(MENUITEM_DONTKNOW) + , nBits(0) + , pSubMenu(NULL) + , pAutoSubMenu(NULL) + , nUserValue(0) + , bChecked(false) + , bEnabled(false) + , bVisible(false) + , bIsTemporary(false) + , bMirrorMode(false) + , nItemImageAngle(0) + , pSalMenuItem(NULL) + { + } + MenuItemData( const OUString& rStr, const Image& rImage ) + : nId(0) + , eType(MENUITEM_DONTKNOW) + , nBits(0) + , pSubMenu(NULL) + , pAutoSubMenu(NULL) + , aText(rStr) + , nUserValue(0) + , aImage(rImage) + , bChecked(false) + , bEnabled(false) + , bVisible(false) + , bIsTemporary(false) + , bMirrorMode(false) + , nItemImageAngle(0) + , pSalMenuItem(NULL) + { + } + ~MenuItemData(); + bool HasCheck() const + { + return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) ); + } }; MenuItemData::~MenuItemData() -- cgit