diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-17 00:39:58 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-17 07:14:25 +0000 |
commit | f89296db5959cf009668f8aad85cfd860b9252ee (patch) | |
tree | 1e8a03414713d1df78df57935ff64eadf56b218b /vcl | |
parent | fdo#77735: Don't proceed when all cells in the range are empty. (diff) | |
download | core-f89296db5959cf009668f8aad85cfd860b9252ee.tar.gz core-f89296db5959cf009668f8aad85cfd860b9252ee.zip |
vcl: fixup svdemo
Change-Id: Ifb7cc12da349fcbcd1d3dc25b64cd2bf3fd7e819
Reviewed-on: https://gerrit.libreoffice.org/9378
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Executable_svdemo.mk | 39 | ||||
-rw-r--r-- | vcl/Module_vcl.mk | 7 | ||||
-rw-r--r-- | vcl/workben/svdem.cxx | 22 |
3 files changed, 59 insertions, 9 deletions
diff --git a/vcl/Executable_svdemo.mk b/vcl/Executable_svdemo.mk new file mode 100644 index 000000000000..893712913df4 --- /dev/null +++ b/vcl/Executable_svdemo.mk @@ -0,0 +1,39 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Executable_Executable,svdemo)) + +$(eval $(call gb_Executable_use_api,svdemo,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_external,svdemo,boost_headers)) + +$(eval $(call gb_Executable_set_include,svdemo,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ + -I$(SRCDIR)/solenv/inc \ +)) + +$(eval $(call gb_Executable_use_libraries,svdemo,\ + tl \ + sal \ + vcl \ + cppu \ + cppuhelper \ + comphelper \ +)) + +$(eval $(call gb_Executable_add_exception_objects,svdemo,\ + vcl/workben/svdem \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 254fe0d9e96e..dc8130d97432 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -23,9 +23,10 @@ $(eval $(call gb_Module_add_targets,vcl,\ CustomTarget_afm_hash \ Library_vcl \ $(if $(filter DESKTOP,$(BUILD_TYPE)), \ - StaticLibrary_vclmain \ - Executable_ui-previewer) \ - Library_vclopengl \ + StaticLibrary_vclmain \ + Executable_ui-previewer) \ + Executable_svdemo \ + Library_vclopengl \ )) $(eval $(call gb_Module_add_l10n_targets,vcl,\ diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index 8bfc84bcf3b3..1e6f681c43b9 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -19,19 +19,23 @@ #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 <cstdio> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; +using namespace cppu; // Forward declaration void Main(); @@ -40,10 +44,16 @@ SAL_IMPLEMENT_MAIN() { tools::extendApplicationEnvironment(); - Reference< XMultiServiceFactory > xMS; - xMS = cppu::createRegistryServiceFactory( "types.rdb", "applicat.rdb", true ); + Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext(); + Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY ); + + if( !xServiceManager.is() ) + { + fprintf( stderr, "Failed to bootstrap\n" ); + exit( 1 ); + } - comphelper::setProcessServiceFactory( xMS ); + comphelper::setProcessServiceFactory( xServiceManager ); InitVCL(); ::Main(); |