summaryrefslogtreecommitdiff
path: root/vcl/workben/svptest.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-18 16:07:08 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-05-18 18:16:01 +1000
commitc0d5da912302ed14469ba3ed0900d346122d34b0 (patch)
treecb471eaead97a1a34e110f5963327e2a171920a5 /vcl/workben/svptest.cxx
parent37c766dcde54412050bda323dd6f146b22232e60 (diff)
vcl: fix svptest
Change-Id: Ibaec6e027aa9fd61824ff6b4f1f71b69d217dfdc
Diffstat (limited to 'vcl/workben/svptest.cxx')
-rw-r--r--vcl/workben/svptest.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 0078e7bbfc45..134a4fd097ee 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -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 );
+
+ if( !xServiceManager.is() )
+ Application::Abort( "Failed to bootstrap" );
- comphelper::setProcessServiceFactory( xMS );
+ comphelper::setProcessServiceFactory( xServiceManager );
InitVCL();
::Main();