summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorPatrick Luby <pluby@openoffice.org>2001-02-20 23:32:30 +0000
committerPatrick Luby <pluby@openoffice.org>2001-02-20 23:32:30 +0000
commit58b2d319141bca6d13cc4f1fb4d81369a7f378e8 (patch)
tree8fc1c7adf22e76ff9869161dcdf196ff023bc95d /svtools
parent1c723ac19949d88a958fa092af85fc39264ee46d (diff)
Corrected order of deletion when running without arguments. Before, the BmpWin instance would be deleted before its children (aMB and aPB).
Diffstat (limited to 'svtools')
-rw-r--r--svtools/bmpmaker/bmp.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx
index 889afe9e6390..b9b8582d7630 100644
--- a/svtools/bmpmaker/bmp.cxx
+++ b/svtools/bmpmaker/bmp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bmp.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: pluby $ $Date: 2001-01-11 23:54:53 $
+ * last change: $Author: pluby $ $Date: 2001-02-21 00:32:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -314,24 +314,26 @@ void BmpApp::Main( )
else
{
ResMgr* pAppResMgr = new ResMgr( String( RTL_CONSTASCII_USTRINGPARAM( "bmp.res" ) ), NULL, NULL );
- MenuBar aMB;
- PopupMenu aPB;
+ MenuBar* pMB = new MenuBar();
+ PopupMenu* pPB = new PopupMenu();
Resource::SetResManager( pAppResMgr );
- aMB.InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~ImageList" ) ) );
- aPB.InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~Erstellen..." ) ) );
- aPB.InsertSeparator();
- aPB.InsertItem( 2, String( RTL_CONSTASCII_USTRINGPARAM( "~Beenden" ) ) );
+ pMB->InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~ImageList" ) ) );
+ pPB->InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~Erstellen..." ) ) );
+ pPB->InsertSeparator();
+ pPB->InsertItem( 2, String( RTL_CONSTASCII_USTRINGPARAM( "~Beenden" ) ) );
- aMB.SetPopupMenu( 1, &aPB );
- aMB.SetSelectHdl( LINK( this, BmpApp, Select ) );
+ pMB->SetPopupMenu( 1, pPB );
+ pMB->SetSelectHdl( LINK( this, BmpApp, Select ) );
pBmpWin = new BmpWin( NULL, WB_APP | WB_STDWORK );
- pBmpWin->SetMenuBar( &aMB );
+ pBmpWin->SetMenuBar( pMB );
pBmpWin->Show();
Execute();
+ delete pPB;
+ delete pMB;
delete pBmpWin;
}