From 4b0b0bef6e9288dd170b8350a53172a1d6ee0b56 Mon Sep 17 00:00:00 2001 From: mm Date: Thu, 22 Feb 2001 15:03:13 +0000 Subject: vcl possibly without main --- vcl/workben/makefile.mk | 7 ++++--- vcl/workben/svdem.cxx | 32 ++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/vcl/workben/makefile.mk b/vcl/workben/makefile.mk index a12a98182174..f942436c12b6 100644 --- a/vcl/workben/makefile.mk +++ b/vcl/workben/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1.1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: hr $ $Date: 2000-09-18 17:05:50 $ +# last change: $Author: mm $ $Date: 2001-02-22 16:03:13 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -81,7 +81,8 @@ OBJFILES= $(OBJ)$/svdem.obj APP1NOSAL= TRUE APP1TARGET= $(TARGET) APP1OBJS= $(OBJFILES) \ - $(OBJ)$/salmain.obj + +# $(OBJ)$/salmain.obj APP1STDLIBS= $(CPPULIB) \ $(TOOLSLIB) \ diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index db5666d21bbb..7d318e6b6b81 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdem.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:50 $ + * last change: $Author: mm $ $Date: 2001-02-22 16:03:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,18 +63,39 @@ #include #include +#include + +#include + // ----------------------------------------------------------------------- +void Main(); +/* class MyApp : public Application { public: - void Main(); + void Main() + { + ::Main(); + } }; MyApp aMyApp; +*/ // ----------------------------------------------------------------------- + +SAL_IMPLEMENT_MAIN() +{ + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMS; + InitVCL( xMS ); + Main(); + DeInitVCL(); + return 0; +} + + class MyWin : public WorkWindow { public: @@ -90,14 +111,13 @@ public: }; // ----------------------------------------------------------------------- - -void MyApp::Main() +void Main() { MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) ); aMainWin.Show(); - Execute(); + Application::Execute(); } // ----------------------------------------------------------------------- -- cgit v1.2.3