From 332b42860ed5503f4661d38e2745191b7039c275 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Mar 2013 14:47:13 +0200 Subject: fdo#46808, convert xforms::XForms to new style the service already existed, it just needed an IDL file Change-Id: I4410dbd1e047e5e7e83c84f0b0de7155cc4fa41c --- sw/source/core/doc/docxforms.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index 11d264b44eb4..e3d9601d0df1 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -53,13 +54,6 @@ bool SwDoc::isXForms() const return mxXForms.is(); } -static Reference lcl_createInstance( const sal_Char* pServiceName ) -{ - OSL_ENSURE( pServiceName != NULL, "no service name" ); - return comphelper::getProcessServiceFactory()->createInstance( - OUString::createFromAscii( pServiceName ) ); -} - void SwDoc::initXForms( bool bCreateDefaultModel ) { OSL_ENSURE( ! isXForms(), "please initialize only once" ); @@ -67,9 +61,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) try { // create XForms components - mxXForms.set( lcl_createInstance( "com.sun.star.xforms.XForms" ), - UNO_QUERY ); - OSL_ENSURE( mxXForms.is(), "can't create XForms container" ); + mxXForms = xforms::XForms::create( comphelper::getProcessComponentContext() ); // change our module identifier, to be able to have a dedicated UI Reference< XModule > xModule; -- cgit