summaryrefslogtreecommitdiff
path: root/vcl/workben/vcldemo.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-18 15:56:42 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-05-18 18:16:01 +1000
commit37c766dcde54412050bda323dd6f146b22232e60 (patch)
tree52dfc31b8f01f0402f40f0eaabec348108ed6ccd /vcl/workben/vcldemo.cxx
parenta00c4c5e2fb9461fef1fbce4d51c8cdf36141b9f (diff)
vcl: make vcldemo work
Change-Id: Icef2d988c37fb7b25245ad9f3f3856fa86f76a77
Diffstat (limited to 'vcl/workben/vcldemo.cxx')
-rw-r--r--vcl/workben/vcldemo.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 80c5d66f0993..3ce00edc7303 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -19,22 +19,24 @@
#include <sal/main.h>
#include <tools/extendapplicationenvironment.hxx>
+
+#include <cppuhelper/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <cppuhelper/bootstrap.hxx>
-
#include <unistd.h>
#include <stdio.h>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
+using namespace cppu;
// Forward declaration
void Main();
@@ -43,10 +45,13 @@ SAL_IMPLEMENT_MAIN()
{
tools::extendApplicationEnvironment();
- Reference< XMultiServiceFactory > xMS;
- xMS = cppu::createRegistryServiceFactory( OUString( "types.rdb" ), OUString( "applicat.rdb" ), true );
+ Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
+ Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
+
+ if( !xServiceManager.is() )
+ Application::Abort( "Failed to bootstrap" );
- comphelper::setProcessServiceFactory( xMS );
+ comphelper::setProcessServiceFactory( xServiceManager );
InitVCL();
::Main();