vcl: fix svptest

Change-Id: Ibaec6e027aa9fd61824ff6b4f1f71b69d217dfdc
This commit is contained in:
Chris Sherlock
2014-05-18 16:07:08 +10:00
parent 37c766dcde
commit c0d5da9123
3 changed files with 14 additions and 7 deletions

View File

@@ -120,6 +120,7 @@ $(eval $(call gb_Helper_register_executables,OOO, \
) \
$(if $(filter-out ANDROID IOS,$(OS)), \
svdemo \
svptest \
vcldemo) \
))

View File

@@ -27,6 +27,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
Executable_ui-previewer) \
$(if $(filter-out ANDROID IOS,$(OS)), \
Executable_svdemo \
Executable_svptest \
Executable_vcldemo) \
Library_vclopengl \
))

View File

@@ -19,7 +19,12 @@
#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>
@@ -34,12 +39,9 @@
#include <math.h>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/bootstrap.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace cppu;
// Forward declaration
void Main();
@@ -48,10 +50,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 );
comphelper::setProcessServiceFactory( xMS );
if( !xServiceManager.is() )
Application::Abort( "Failed to bootstrap" );
comphelper::setProcessServiceFactory( xServiceManager );
InitVCL();
::Main();