diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-18 15:56:42 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-18 18:16:01 +1000 |
commit | 37c766dcde54412050bda323dd6f146b22232e60 (patch) | |
tree | 52dfc31b8f01f0402f40f0eaabec348108ed6ccd /vcl | |
parent | Resolves: #i113481# query script invocation from the current frame... (diff) | |
download | core-37c766dcde54412050bda323dd6f146b22232e60.tar.gz core-37c766dcde54412050bda323dd6f146b22232e60.zip |
vcl: make vcldemo work
Change-Id: Icef2d988c37fb7b25245ad9f3f3856fa86f76a77
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Module_vcl.mk | 4 | ||||
-rw-r--r-- | vcl/workben/svdem.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 19 |
3 files changed, 15 insertions, 10 deletions
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 35a08bbb85f7..641d06163fb7 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -25,7 +25,9 @@ $(eval $(call gb_Module_add_targets,vcl,\ $(if $(filter DESKTOP,$(BUILD_TYPE)), \ StaticLibrary_vclmain \ Executable_ui-previewer) \ - $(if $(filter-out ANDROID IOS,$(OS)),Executable_svdemo) \ + $(if $(filter-out ANDROID IOS,$(OS)), \ + Executable_svdemo \ + Executable_vcldemo) \ Library_vclopengl \ )) diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index 5cc7d9c1ea40..3224694f4c26 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -31,8 +31,6 @@ #include <vcl/wrkwin.hxx> #include <vcl/msgbox.hxx> -#include <cstdio> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace cppu; 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(); |